mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user