New testcase for a bug in instcombine
authorChris Lattner <sabre@nondot.org>
Mon, 3 Nov 2003 18:33:44 +0000 (18:33 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 3 Nov 2003 18:33:44 +0000 (18:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9680 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll [new file with mode: 0644]

diff --git a/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll b/test/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
new file mode 100644 (file)
index 0000000..051add8
--- /dev/null
@@ -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
+}