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