summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/IntPtrCast.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/IntPtrCast.ll b/test/Transforms/InstCombine/IntPtrCast.ll
new file mode 100644
index 0000000000..c30498279d
--- /dev/null
+++ b/test/Transforms/InstCombine/IntPtrCast.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep cast
+target pointersize = 32
+
+int *%test(int *%P) {
+ %V = cast int* %P to int
+ %P2 = cast int %V to int*
+ ret int* %P2
+}