new testcase
[oota-llvm.git] / test / Transforms / InstCombine / JavaCompare.ll
1 ; This is the sequence of stuff that the Java front-end expands for a single 
2 ; <= comparison.  Check to make sure we turn it into a <= (only)
3
4 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep -v setle | not grep '#uses'
5
6 bool %le(int %A, int %B) {
7         %c1 = setgt int %A, %B;
8         %tmp = select bool %c1, int 1, int 0;
9         %c2 = setlt int %A, %B;
10         %result = select bool %c2, int -1, int %tmp;
11         %c3 = setle int %result, 0;
12         ret bool %c3;
13 }
14