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