Reapply the "or" half of r108136, which seems to be less problematic.
[oota-llvm.git] / test / Transforms / InstCombine / or.ll
index c3526b77f6a5b15948bade8fe8c4a77a7980ff12..0246925bd82a31b6bcc49c95322a1707387882db 100644 (file)
@@ -350,3 +350,16 @@ define <4 x i32> @test32(<4 x i1> %and.i1352, <4 x i32> %vecinit6.i176, <4 x i32
 ; CHECK: or <4 x i32> %and.i, %and.i129
 }
 
+; PR6773
+define i32 @test33(i32 %x, i32 %y, i32 %z) nounwind readnone {
+  %and = and i32 %y, %x
+  %not = xor i32 %x, -1
+  %and2 = and i32 %z, %not
+  %or = or i32 %and2, %and
+  ret i32 %or
+; CHECK: @test33
+; CHECK-NEXT: xor i32
+; CHECK-NEXT: and i32
+; CHECK-NEXT: xor i32
+; CHECK-NEXT: ret i32
+}