New testcase that the raiseallocations pass should be able to handle.
authorChris Lattner <sabre@nondot.org>
Sun, 7 Dec 2003 01:25:36 +0000 (01:25 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Dec 2003 01:25:36 +0000 (01:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10304 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll [new file with mode: 0644]

diff --git a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll
new file mode 100644 (file)
index 0000000..3b700ff
--- /dev/null
@@ -0,0 +1,10 @@
+; This situation can occur due to the funcresolve pass.
+;
+; RUN: llvm-as < %s | opt -raiseallocs | llvm-dis | not grep call
+
+declare void %free(sbyte*)
+
+void %test(int *%P) {
+  call void(int*)* cast (void(sbyte*)* %free to void(int*)*)(int* %P)
+  ret void
+}