2010-10-19 02:04:47 +08:00
|
|
|
; RUN: opt < %s -basicaa -dse -S | not grep DEAD
|
2004-07-25 15:57:50 +08:00
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define void @test(i32* %Q, i32* %P) {
|
|
|
|
%DEAD = load i32* %Q ; <i32> [#uses=1]
|
|
|
|
store i32 %DEAD, i32* %P
|
|
|
|
free i32* %P
|
|
|
|
ret void
|
2004-07-25 15:57:50 +08:00
|
|
|
}
|
2008-12-06 08:53:22 +08:00
|
|
|
|
|
|
|
define void @test2({i32, i32}* %P) {
|
|
|
|
%Q = getelementptr {i32, i32} *%P, i32 0, i32 1
|
|
|
|
store i32 4, i32* %Q
|
|
|
|
free {i32,i32}* %P
|
|
|
|
ret void
|
|
|
|
}
|