aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2008-05-17 09:03:26 +0000
committerNick Lewycky <nicholas@mxc.ca>2008-05-17 09:03:26 +0000
commitd24ae8703f2da048b351d6c9c83d1412439e737c (patch)
tree3516a81c3f26952b520be2210e95926b1494ca84 /test/Transforms
parentfc1efbbfbcd707c29bdab8a1adf7b649f42e9600 (diff)
Constant fold inttoptr and ptrtoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51216 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/2008-05-17-FoldIntToPtr.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-05-17-FoldIntToPtr.ll b/test/Transforms/InstCombine/2008-05-17-FoldIntToPtr.ll
new file mode 100644
index 0000000000..1d93294fe4
--- /dev/null
+++ b/test/Transforms/InstCombine/2008-05-17-FoldIntToPtr.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep {ret i1 false}
+; PR2329
+
+define i1 @f() {
+ %x = icmp eq i8* inttoptr (i32 1 to i8*), inttoptr (i32 2 to i8*)
+ ret i1 %x
+}
+