diff options
Diffstat (limited to 'test/Transforms/InstCombine/malloc-free-delete.ll')
-rw-r--r-- | test/Transforms/InstCombine/malloc-free-delete.ll | 12 |
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 317786f..8455300 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 } |