OSDN Git Service

[SystemZ] Fix LLVM crash on unoptimized code
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 30 Mar 2015 13:46:59 +0000 (13:46 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Mon, 30 Mar 2015 13:46:59 +0000 (13:46 +0000)
commit5738b771769436d79b747a74500c5fe4fd84a6ea
tree31c13315c1c4aac1f1630721256cfbc3fc985979
parentb42e01326de23130bd333ad6ceb6b21f7458ad5c
[SystemZ] Fix LLVM crash on unoptimized code

Compiling the following function with -O0 would crash, since LLVM would
hit an assertion in getTestUnderMaskCond:

  int test(unsigned long x)
  {
    return x >= 0 && x <= 15;
  }

Fixed by detecting the case in the caller of getTestUnderMaskCond.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233541 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/int-cmp-50.ll [new file with mode: 0644]