Dan Gohman | f17a25c | 2007-07-18 16:29:46 +0000 | [diff] [blame] | 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-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \ |
| 5 | ; RUN: grep -v {icmp sle} | not grep #uses |
| 6 | |
| 7 | bool %le(int %A, int %B) { |
| 8 | %c1 = setgt int %A, %B; |
| 9 | %tmp = select bool %c1, int 1, int 0; |
| 10 | %c2 = setlt int %A, %B; |
| 11 | %result = select bool %c2, int -1, int %tmp; |
| 12 | %c3 = setle int %result, 0; |
| 13 | ret bool %c3; |
| 14 | } |
| 15 | |