Enhance DSE to handle the case where a free call makes more than

one store dead. This is especially noticeable in
SingleSource/Benchmarks/Shootout/objinst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118875 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2010-11-12 02:19:17 +00:00
parent 02df7e90cf
commit 720a2ed6d9
2 changed files with 38 additions and 12 deletions
@@ -24,3 +24,17 @@ define void @test2({i32, i32}* %P) {
ret void
}
; CHECK: @test4
; CHECK-NOT: store
; CHECK: ret void
define void @test4() {
%m = call i8* @malloc(i64 24)
store i8 0, i8* %m
%m1 = getelementptr i8* %m, i64 1
store i8 1, i8* %m1
call void @free(i8* %m)
ret void
}
declare void @free(i8*)
declare i8* @malloc(i64)