Home | History | Annotate | Download | only in ScalarEvolution
      1 ; RUN: opt < %s -analyze -scalar-evolution |& not grep smax
      2 ; PR2070
      3 
      4 define i32 @a(i32 %x) nounwind  {
      5 entry:
      6 	icmp sgt i32 %x, 1		; <i1>:0 [#uses=1]
      7 	br i1 %0, label %bb.nph, label %bb2
      8 
      9 bb.nph:		; preds = %entry
     10 	br label %bb
     11 
     12 bb:		; preds = %bb1, %bb.nph
     13 	%z.02 = phi i32 [ %1, %bb1 ], [ 1, %bb.nph ]		; <i32> [#uses=1]
     14 	%i.01 = phi i32 [ %2, %bb1 ], [ 1, %bb.nph ]		; <i32> [#uses=2]
     15 	mul i32 %z.02, %i.01		; <i32>:1 [#uses=2]
     16 	add i32 %i.01, 1		; <i32>:2 [#uses=2]
     17 	br label %bb1
     18 
     19 bb1:		; preds = %bb
     20 	icmp slt i32 %2, %x		; <i1>:3 [#uses=1]
     21 	br i1 %3, label %bb, label %bb1.bb2_crit_edge
     22 
     23 bb1.bb2_crit_edge:		; preds = %bb1
     24 	%.lcssa = phi i32 [ %1, %bb1 ]		; <i32> [#uses=1]
     25 	br label %bb2
     26 
     27 bb2:		; preds = %bb1.bb2_crit_edge, %entry
     28 	%z.0.lcssa = phi i32 [ %.lcssa, %bb1.bb2_crit_edge ], [ 1, %entry ]		; <i32> [#uses=1]
     29 	ret i32 %z.0.lcssa
     30 }
     31