[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)
commitb8d76fb7ca255e7885d754a4df8c4715a4aa7a3f
tree699a64fff46ed906b5c0e84b267b8e58bf5d9c2c
parent58bb263eed58b8b3cd8b92794a58fe9344e476f1
[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.

llvm-svn: 233541
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
llvm/test/CodeGen/SystemZ/int-cmp-50.ll [new file with mode: 0644]