aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-10-17 20:12:58 +0000
committerDevang Patel <dpatel@apple.com>2007-10-17 20:12:58 +0000
commitea682b31f376052c18d65117f1cfc78425008b75 (patch)
treee6c98b3ee1e06cc7c8a675d9f8d2ad6c235d44df /test/Transforms
parentbb02d34fa42730b45e3f9fd2e52a9da3450493cf (diff)
downloadexternal_llvm-ea682b31f376052c18d65117f1cfc78425008b75.zip
external_llvm-ea682b31f376052c18d65117f1cfc78425008b75.tar.gz
external_llvm-ea682b31f376052c18d65117f1cfc78425008b75.tar.bz2
Do not raise free() call that is called through invoke instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll b/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll
new file mode 100644
index 0000000..513cf6f
--- /dev/null
+++ b/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll
@@ -0,0 +1,17 @@
+; RUN: llvm-as <%s | opt -raiseallocs -stats -disable-output |& \
+; RUN: not grep {Number of allocations raised}
+define void @foo() {
+entry:
+ %buffer = alloca i16*
+ %tmp = load i16** %buffer, align 8
+ invoke i32(...)* @free(i16* %tmp)
+ to label %invcont unwind label %unwind
+invcont:
+ br label %finally
+unwind:
+ br label %finally
+finally:
+ ret void
+}
+declare i32 @free(...)
+