From 120fb19e1b394fba0fbd2ba9ddedfa8531925f11 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 7 Dec 2003 01:25:36 +0000 Subject: [PATCH] New testcase that the raiseallocations pass should be able to handle. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10304 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../RaiseAllocations/FreeCastConstantExpr.ll | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll diff --git a/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll new file mode 100644 index 00000000000..3b700ffd457 --- /dev/null +++ b/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll @@ -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 +}