1 ; This test ensures that "strength reduction" of conditional expressions are
2 ; working. Basically this boils down to converting setlt,gt,le,ge instructions
3 ; into equivalent setne,eq instructions.
5 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
6 ; RUN: grep -v {icmp eq} | grep -v {icmp ne} | not grep icmp
10 %B = setge uint %A, 1 ; setne %A, 0
14 bool %test2(uint %A) {
15 %B = setgt uint %A, 0 ; setne %A, 0
19 bool %test3(sbyte %A) {
20 %B = setge sbyte %A, -127 ; setne %A, -128
24 bool %test4(sbyte %A) {
25 %B = setle sbyte %A, 126 ; setne %A, 127
29 bool %test5(sbyte %A) {
30 %B = setlt sbyte %A, 127 ; setne %A, 127