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.
6 ; RUN: as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep-not set
8 bool "test1"(uint %A) {
9 %B = setge uint %A, 1 ; setne %A, 0
13 bool "test2"(uint %A) {
14 %B = setgt uint %A, 0 ; setne %A, 0
18 bool "test3"(sbyte %A) {
19 %B = setge sbyte %A, -127 ; setne %A, -128
23 bool %test4(sbyte %A) {
24 %B = setle sbyte %A, 126 ; setne %A, 127
28 bool %test5(sbyte %A) {
29 %B = setlt sbyte %A, 127 ; setne %A, 127