summaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2010-01-02 16:14:56 +0000
committerNick Lewycky <nicholas@mxc.ca>2010-01-02 16:14:56 +0000
commitf994bf00b5d1b0b74e70cfcf65414b8aa401d3ea (patch)
tree00ab94ad946d4c0182a02d9e1c1cd9bcad70be3d /test/Transforms
parent546d63176eecb2786f9fcd587ccb2c1ef604278b (diff)
downloadexternal_llvm-f994bf00b5d1b0b74e70cfcf65414b8aa401d3ea.zip
external_llvm-f994bf00b5d1b0b74e70cfcf65414b8aa401d3ea.tar.gz
external_llvm-f994bf00b5d1b0b74e70cfcf65414b8aa401d3ea.tar.bz2
Fix logic error in previous commit. The != case needs to become an or, not an
and. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92419 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/or.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll
index 33058b5..44228ba 100644
--- a/test/Transforms/InstCombine/or.ll
+++ b/test/Transforms/InstCombine/or.ll
@@ -293,3 +293,17 @@ define i1 @test28(i32 %A, i32 %B) {
; CHECK: icmp ne i32 {{.*}}, 0
; CHECK: ret i1
}
+
+define i1 @test29(i32* %A, i32* %B) {
+ %C1 = ptrtoint i32* %A to i32
+ %C2 = ptrtoint i32* %B to i32
+ %D = or i32 %C1, %C2
+ %E = icmp ne i32 %D, 0
+ ret i1 %E
+; CHECK: @test29
+; CHECK: icmp ne i32* %A, null
+; CHECK: icmp ne i32* %B, null
+; CHECK: or i1
+; CHECK: ret i1
+}
+