diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-01 23:09:08 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-01 23:09:08 +0000 |
commit | ec12d050197781d2a0a57097baa464763d3f696c (patch) | |
tree | ffbe7c3aeb477bcedced7150097d85d7ba6c5500 /test/Transforms/InstCombine/cast_ptr.ll | |
parent | 85c1c964dc5b73085f2b2dce1cfc171fa9b765e2 (diff) |
add a simple instcombine xform, simplify another one to use hasAllZeroIndices()
instead of hand rolling a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92403 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/cast_ptr.ll')
-rw-r--r-- | test/Transforms/InstCombine/cast_ptr.ll | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/cast_ptr.ll b/test/Transforms/InstCombine/cast_ptr.ll index 6a00e83978..5160af006e 100644 --- a/test/Transforms/InstCombine/cast_ptr.ll +++ b/test/Transforms/InstCombine/cast_ptr.ll @@ -36,3 +36,12 @@ define i1 @test3(i8* %a) { %r = icmp eq i32 %tmpa, ptrtoint (i8* @global to i32) ret i1 %r } + +define i1 @test4(i32 %A) { + %B = inttoptr i32 %A to i8* + %C = icmp eq i8* %B, null + ret i1 %C +; CHECK: @test4 +; CHECK-NEXT: %C = icmp eq i32 %A, 0 +; CHECK-NEXT: ret i1 %C +} |