2008-03-01 09:15:35 +00:00
|
|
|
; RUN: llvm-as < %s | opt -adce | llvm-dis | not grep call
|
2005-02-17 19:27:44 +00:00
|
|
|
|
|
|
|
; The call is not live just because the PHI uses the call retval!
|
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
define i32 @test(i32 %X) {
|
|
|
|
; <label>:0
|
|
|
|
br label %Done
|
2005-02-17 19:27:44 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
DeadBlock: ; No predecessors!
|
|
|
|
%Y = call i32 @test( i32 0 ) ; <i32> [#uses=1]
|
|
|
|
br label %Done
|
2005-02-17 19:27:44 +00:00
|
|
|
|
2008-03-01 09:15:35 +00:00
|
|
|
Done: ; preds = %DeadBlock, %0
|
|
|
|
%Z = phi i32 [ %X, %0 ], [ %Y, %DeadBlock ] ; <i32> [#uses=1]
|
|
|
|
ret i32 %Z
|
2005-02-17 19:27:44 +00:00
|
|
|
}
|
2008-03-01 09:15:35 +00:00
|
|
|
|