diff options
Diffstat (limited to 'test/Transforms/InstCombine/xor2.ll')
-rw-r--r-- | test/Transforms/InstCombine/xor2.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/xor2.ll b/test/Transforms/InstCombine/xor2.ll index 67f05ef..19804c1 100644 --- a/test/Transforms/InstCombine/xor2.ll +++ b/test/Transforms/InstCombine/xor2.ll @@ -51,3 +51,17 @@ define i32 @test4(i32 %A, i32 %B) { ; CHECK: %1 = ashr i32 %A, %B ; CHECK: ret i32 %1 } + +; PR6773 +define i32 @test5(i32 %x, i32 %y, i32 %z) nounwind readnone { + %and = and i32 %y, %x + %not = xor i32 %x, -1 + %and2 = and i32 %z, %not + %xor = xor i32 %and2, %and + ret i32 %xor +; CHECK: @test5 +; CHECK-NEXT: xor i32 +; CHECK-NEXT: and i32 +; CHECK-NEXT: xor i32 +; CHECK-NEXT: ret i32 +} |