Home | History | Annotate | Download | only in ScalarEvolution
      1 ; RUN: opt < %s -analyze -scalar-evolution 2>&1 |  FileCheck %s
      2 ; XFAIL: *
      3 
      4 ; CHECK: (((-1 * %i0) + (100005 smax %i0)) /u 5)
      5 
      6 define i32 @foo0(i32 %i0) nounwind {
      7 entry:
      8 	br label %bb1
      9 
     10 bb:		; preds = %bb1
     11 	%0 = add i32 %j.0, 1		; <i32> [#uses=1]
     12 	%1 = add i32 %i.0, 5		; <i32> [#uses=1]
     13 	br label %bb1
     14 
     15 bb1:		; preds = %bb, %entry
     16 	%j.0 = phi i32 [ 0, %entry ], [ %0, %bb ]		; <i32> [#uses=2]
     17 	%i.0 = phi i32 [ %i0, %entry ], [ %1, %bb ]		; <i32> [#uses=2]
     18 	%2 = icmp sgt i32 %i.0, 100000		; <i1> [#uses=1]
     19 	br i1 %2, label %return, label %bb
     20 
     21 return:		; preds = %bb1
     22 	ret i32 %j.0
     23 }
     24