diff options
Diffstat (limited to 'test/Transforms/InstCombine/sub-xor.ll')
| -rw-r--r-- | test/Transforms/InstCombine/sub-xor.ll | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/sub-xor.ll b/test/Transforms/InstCombine/sub-xor.ll index 279e4aca9de4..1d14852bc803 100644 --- a/test/Transforms/InstCombine/sub-xor.ll +++ b/test/Transforms/InstCombine/sub-xor.ll @@ -35,3 +35,13 @@ define i32 @test3(i32 %x) nounwind { ; CHECK-NEXT: sub i32 73, %and ; CHECK-NEXT: ret } + +define i32 @test4(i32 %x) nounwind { + %sub = xor i32 %x, 2147483648 + %add = add i32 %sub, 42 + ret i32 %add + +; CHECK: @test4 +; CHECK-NEXT: add i32 %x, -2147483606 +; CHECK-NEXT: ret +} |
