aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/malloc-free-delete.ll
blob: 2ed5ec6996d61c00d696086072da0726a5ea40cb (plain)
1
2
3
4
5
6
7
8
9
10
11
; RUN: opt < %s -instcombine -S | grep {ret i32 0}
; RUN: opt < %s -instcombine -S | not grep malloc
; PR1201
define i32 @main(i32 %argc, i8** %argv) {
        %c_19 = alloca i8*              ; <i8**> [#uses=2]
        %malloc_206 = malloc i8, i32 10         ; <i8*> [#uses=1]
        store i8* %malloc_206, i8** %c_19
        %tmp_207 = load i8** %c_19              ; <i8*> [#uses=1]
        free i8* %tmp_207
        ret i32 0
}