summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-03 18:33:44 +0000
committerChris Lattner <sabre@nondot.org>2003-11-03 18:33:44 +0000
commitab13ae8c46f3b74ce692749194a56c03f51c4fc3 (patch)
tree191e4951b0a4ebfa309cc1a15ee4551938e29662
parent5ea326a23b0cf74e3f1f96b8846b43437a00cd2a (diff)
downloadllvm-ab13ae8c46f3b74ce692749194a56c03f51c4fc3.tar.gz
llvm-ab13ae8c46f3b74ce692749194a56c03f51c4fc3.tar.bz2
llvm-ab13ae8c46f3b74ce692749194a56c03f51c4fc3.tar.xz
New testcase for a bug in instcombine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9680 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll b/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
new file mode 100644
index 0000000000..051add8c0b
--- /dev/null
+++ b/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
@@ -0,0 +1,13 @@
+; The cast in this testcase is not eliminatable on a 32-bit target!
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | grep cast
+
+target endian = little
+target pointersize = 32
+
+declare void %foo(...)
+
+void %test(long %X) {
+ %Y = cast long %X to int*
+ call void (...)* %foo(int* %Y)
+ ret void
+}