blob: 4ed064c674cbd7acf738eac73b02144799b607da [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; 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
7bool %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