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