summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms')
-rw-r--r--llvm/test/Transforms/InstCombine/malloc-free-delete.ll6
-rw-r--r--llvm/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll10
-rw-r--r--llvm/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll17
-rw-r--r--llvm/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll11
-rw-r--r--llvm/test/Transforms/RaiseAllocations/dg.exp3
5 files changed, 4 insertions, 43 deletions
diff --git a/llvm/test/Transforms/InstCombine/malloc-free-delete.ll b/llvm/test/Transforms/InstCombine/malloc-free-delete.ll
index fd91e447bdd..a4b7496ef40 100644
--- a/llvm/test/Transforms/InstCombine/malloc-free-delete.ll
+++ b/llvm/test/Transforms/InstCombine/malloc-free-delete.ll
@@ -1,11 +1,13 @@
-; RUN: opt < %s -instcombine -S | grep {ret i32 0}
-; RUN: opt < %s -instcombine -globaldce -S | not grep malloc
+; RUN: opt < %s -instcombine -globaldce -S | FileCheck %s
; PR1201
define i32 @main(i32 %argc, i8** %argv) {
%c_19 = alloca i8* ; <i8**> [#uses=2]
%malloc_206 = malloc i8, i32 10 ; <i8*> [#uses=1]
+; CHECK-NOT: malloc
store i8* %malloc_206, i8** %c_19
%tmp_207 = load i8** %c_19 ; <i8*> [#uses=1]
free i8* %tmp_207
+; CHECK-NOT: free
ret i32 0
+; CHECK: ret i32 0
}
diff --git a/llvm/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll b/llvm/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll
deleted file mode 100644
index 75e02e84fac..00000000000
--- a/llvm/test/Transforms/RaiseAllocations/2004-11-08-FreeUseCrash.ll
+++ /dev/null
@@ -1,10 +0,0 @@
-; RUN: opt < %s -raiseallocs -disable-output
-
-define void @main() {
- %tmp.13 = call i32 (...)* @free( i32 32 ) ; <i32> [#uses=1]
- %tmp.14 = inttoptr i32 %tmp.13 to i32* ; <i32*> [#uses=0]
- ret void
-}
-
-declare i32 @free(...)
-
diff --git a/llvm/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll b/llvm/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll
deleted file mode 100644
index 675bb3d829f..00000000000
--- a/llvm/test/Transforms/RaiseAllocations/2007-10-17-InvokeFree.ll
+++ /dev/null
@@ -1,17 +0,0 @@
-; RUN: opt < %s -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(...)
-
diff --git a/llvm/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll b/llvm/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll
deleted file mode 100644
index 1cf072910a6..00000000000
--- a/llvm/test/Transforms/RaiseAllocations/FreeCastConstantExpr.ll
+++ /dev/null
@@ -1,11 +0,0 @@
-; This situation can occur due to the funcresolve pass.
-;
-; RUN: opt < %s -raiseallocs -S | not grep call
-
-declare void @free(i8*)
-
-define void @test(i32* %P) {
- call void bitcast (void (i8*)* @free to void (i32*)*)( i32* %P )
- ret void
-}
-
diff --git a/llvm/test/Transforms/RaiseAllocations/dg.exp b/llvm/test/Transforms/RaiseAllocations/dg.exp
deleted file mode 100644
index f2005891a59..00000000000
--- a/llvm/test/Transforms/RaiseAllocations/dg.exp
+++ /dev/null
@@ -1,3 +0,0 @@
-load_lib llvm.exp
-
-RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]]
OpenPOWER on IntegriCloud