diff options
author | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
---|---|---|
committer | rdivacky <rdivacky@FreeBSD.org> | 2009-10-14 17:57:32 +0000 |
commit | cd749a9c07f1de2fb8affde90537efa4bc3e7c54 (patch) | |
tree | b21f6de4e08b89bb7931806bab798fc2a5e3a686 /test/Transforms/InstCombine/xor2.ll | |
parent | 72621d11de5b873f1695f391eb95f0b336c3d2d4 (diff) | |
download | FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.zip FreeBSD-src-cd749a9c07f1de2fb8affde90537efa4bc3e7c54.tar.gz |
Update llvm to r84119.
Diffstat (limited to 'test/Transforms/InstCombine/xor2.ll')
-rw-r--r-- | test/Transforms/InstCombine/xor2.ll | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/test/Transforms/InstCombine/xor2.ll b/test/Transforms/InstCombine/xor2.ll index efb3146..23a9915 100644 --- a/test/Transforms/InstCombine/xor2.ll +++ b/test/Transforms/InstCombine/xor2.ll @@ -1,17 +1,43 @@ ; This test makes sure that these instructions are properly eliminated. ; -; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep {xor } +; RUN: opt < %s -instcombine -S | FileCheck %s ; PR1253 define i1 @test0(i32 %A) { +; CHECK: @test0 +; CHECK: %C = icmp slt i32 %A, 0 %B = xor i32 %A, -2147483648 %C = icmp sgt i32 %B, -1 ret i1 %C } define i1 @test1(i32 %A) { +; CHECK: @test1 +; CHECK: %C = icmp slt i32 %A, 0 %B = xor i32 %A, 12345 %C = icmp slt i32 %B, 0 ret i1 %C } +; PR1014 +define i32 @test2(i32 %tmp1) { +; CHECK: @test2 +; CHECK-NEXT: or i32 %tmp1, 8 +; CHECK-NEXT: and i32 +; CHECK-NEXT: ret i32 + %ovm = and i32 %tmp1, 32 + %ov3 = add i32 %ovm, 145 + %ov110 = xor i32 %ov3, 153 + ret i32 %ov110 +} + +define i32 @test3(i32 %tmp1) { +; CHECK: @test3 +; CHECK-NEXT: or i32 %tmp1, 8 +; CHECK-NEXT: and i32 +; CHECK-NEXT: ret i32 + %ovm = or i32 %tmp1, 145 + %ov31 = and i32 %ovm, 177 + %ov110 = xor i32 %ov31, 153 + ret i32 %ov110 +} |