Home | History | Annotate | Download | only in SCCP
      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 %LPad
     12 Ok:		; preds = %Inv
     13 	br label %Cont
     14 LPad:
     15         %val = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
     16                  catch i8* null
     17         br label %Cont
     18 Cont:		; preds = %Ok, %Inv, %Entry
     19 	%X = phi i32 [ 0, %Entry ], [ 1, %Ok ], [ 0, %LPad ]		; <i32> [#uses=1]
     20 	ret i32 %X
     21 }
     22 
     23 declare i32 @__gxx_personality_v0(...)
     24