New testcase for a bug in instcombine
llvm-svn: 9680
diff --git a/llvm/test/Regression/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll b/llvm/test/Regression/Transforms/InstCombine/2003-11-03-VarargsCallBug.ll
new file mode 100644
index 0000000..051add8
--- /dev/null
+++ b/llvm/test/Regression/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
+}