482084bb182b29693fbc7e46ef6db8f64992c6fc
[oota-llvm.git] / test / Transforms / InstCombine / malloc-free-delete.ll
1 ; RUN: opt %s -instcombine | llvm-dis | grep {ret i32 0}
2 ; RUN: opt %s -instcombine | llvm-dis | 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 }