; This test makes sure that these instructions are properly eliminated.
;
-; RUN: llvm-as < %s | opt -instcombine -disable-output &&
-; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep set
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep icmp
%X = uninitialized global int
%R = or bool %C, %Z
ret bool %R
}
+
+int %test23(int %a) {
+ %tmp.1 = and int %a, 1
+ %tmp.2 = seteq int %tmp.1, 0
+ %tmp.3 = cast bool %tmp.2 to int ;; xor tmp1, 1
+ ret int %tmp.3
+}
+
+int %test24(uint %a) {
+ %tmp1 = and uint %a, 4
+ %tmp.1 = shr uint %tmp1, ubyte 2
+ %tmp.2 = seteq uint %tmp.1, 0
+ %tmp.3 = cast bool %tmp.2 to int ;; xor tmp1, 1
+ ret int %tmp.3
+}
+