Fix InstCombine/2007-10-31-StringCrash.ll by removing an obvious
[oota-llvm.git] / test / Transforms / InstCombine / xor.ll
index ad28660756a0f64e3df4601be7f1e10b70d5f3df..e2011499ccba2ae1c77829a6f4eb9eb82dc4eb97 100644 (file)
@@ -1,8 +1,8 @@
 ; This test makes sure that these instructions are properly eliminated.
 ;
-
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine -disable-output &&
-; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep 'xor '
+; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | \
+; RUN:    not grep {xor }
+; END.
 
 %G1 = global uint 0
 %G2 = global uint 0
@@ -181,3 +181,18 @@ int %test26(int %a, int %b) {
         ret int %tmp4
 }
 
+
+int %test27(int %b, int %c, int %d) {
+        %tmp2 = xor int %d, %b
+        %tmp5 = xor int %d, %c
+        %tmp = icmp eq int %tmp2, %tmp5
+        %tmp6 = zext bool %tmp to int
+        ret int %tmp6
+}
+
+int %test28(int %indvar) {
+        %tmp7 = add int %indvar, -2147483647
+        %tmp214 = xor int %tmp7, -2147483648
+        ret int %tmp214
+}
+