Home | History | Annotate | Download | only in ScalarEvolution
      1 ; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
      2 ; PR2003
      3 
      4 ; CHECK: umax
      5 
      6 define i32 @foo(i32 %n) {
      7 entry:
      8         br label %header
      9 header:
     10         %i = phi i32 [ 100, %entry ], [ %i.inc, %next ]
     11         %cond = icmp ult i32 %i, %n
     12         br i1 %cond, label %next, label %return
     13 next:
     14         %i.inc = add i32 %i, 1
     15         br label %header
     16 return:
     17         ret i32 %i
     18 }
     19 
     20