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: if as < %s | opt -instcombine | dis | grep -v seteq | grep -v setne | grep set
11 bool "test1"(uint %A) {
12 %B = setge uint %A, 1 ; setne %A, 0
16 bool "test2"(uint %A) {
17 %B = setgt uint %A, 0 ; setne %A, 0
21 bool "test3"(sbyte %A) {
22 %B = setge sbyte %A, -127 ; setne %A, -128
26 bool %test4(sbyte %A) {
27 %B = setle sbyte %A, 126 ; setne %A, 127
31 bool %test5(sbyte %A) {
32 %B = setlt sbyte %A, 127 ; setne %A, 127