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