summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/malloc-free-delete.ll
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-06-17 03:14:27 +0000
committerChris Lattner <sabre@nondot.org>2011-06-17 03:14:27 +0000
commit26b0000166ca3d00f2a1990b43a1f45cdac4e9b6 (patch)
treef6a7581ff89c965fe0b0d3fabc5b780a695c1ce5 /test/Transforms/InstCombine/malloc-free-delete.ll
parentcd4e0b593db6dfdb5cedbde47ea6603058b8ac6c (diff)
downloadllvm-26b0000166ca3d00f2a1990b43a1f45cdac4e9b6.tar.gz
llvm-26b0000166ca3d00f2a1990b43a1f45cdac4e9b6.tar.bz2
llvm-26b0000166ca3d00f2a1990b43a1f45cdac4e9b6.tar.xz
manually upgrade a bunch of tests to modern syntax, and remove some that
are either unreduced or only test old syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine/malloc-free-delete.ll')
-rw-r--r--test/Transforms/InstCombine/malloc-free-delete.ll12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/Transforms/InstCombine/malloc-free-delete.ll b/test/Transforms/InstCombine/malloc-free-delete.ll
index 317786fc56..8455300c98 100644
--- a/test/Transforms/InstCombine/malloc-free-delete.ll
+++ b/test/Transforms/InstCombine/malloc-free-delete.ll
@@ -1,14 +1,14 @@
; RUN: opt < %s -instcombine -S | FileCheck %s
; PR1201
define i32 @main(i32 %argc, i8** %argv) {
- %c_19 = alloca i8*
- %malloc_206 = malloc i8, i32 10
+ %c_19 = alloca i8*
+ %malloc_206 = tail call i8* @malloc(i32 mul (i32 ptrtoint (i8* getelementptr (i8* null, i32 1) to i32), i32 10))
+ store i8* %malloc_206, i8** %c_19
+ %tmp_207 = load i8** %c_19
+ tail call void @free(i8* %tmp_207)
+ ret i32 0
; CHECK-NOT: malloc
- store i8* %malloc_206, i8** %c_19
- %tmp_207 = load i8** %c_19
- free i8* %tmp_207
; CHECK-NOT: free
- ret i32 0
; CHECK: ret i32 0
}