1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 08:23:21 +01:00
llvm-mirror/test/Transforms/InstCombine/malloc-free-delete.ll

14 lines
445 B
LLVM
Raw Normal View History

; RUN: opt < %s -instcombine -globaldce -S | FileCheck %s
2007-04-14 02:19:36 +02:00
; 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
2007-04-14 02:19:36 +02:00
store i8* %malloc_206, i8** %c_19
%tmp_207 = load i8** %c_19 ; <i8*> [#uses=1]
free i8* %tmp_207
; CHECK-NOT: free
2007-04-14 02:19:36 +02:00
ret i32 0
; CHECK: ret i32 0
2007-04-14 02:19:36 +02:00
}