A bunch of misc fixes to SCCPSolver::ResolvedUndefsIn, including a fix to stop
[oota-llvm.git] / test / Transforms / SCCP / 2003-08-26-InvokeHandling.ll
1 ; The PHI cannot be eliminated from this testcase, SCCP is mishandling invoke's!
2 ; RUN: opt < %s -sccp -S | grep phi
3
4 declare void @foo()
5
6 define i32 @test(i1 %cond) {
7 Entry:
8         br i1 %cond, label %Inv, label %Cont
9 Inv:            ; preds = %Entry
10         invoke void @foo( )
11                         to label %Ok unwind label %Cont
12 Ok:             ; preds = %Inv
13         br label %Cont
14 Cont:           ; preds = %Ok, %Inv, %Entry
15         %X = phi i32 [ 0, %Entry ], [ 1, %Ok ], [ 0, %Inv ]             ; <i32> [#uses=1]
16         ret i32 %X
17 }
18