blob: 74e826847b35376b7c54f8711b089a4f5133b7ab [file] [log] [blame]
Dan Gohmanabe991f2008-09-14 17:21:12 +00001; RUN: llvm-as < %s | opt -scalar-evolution -analyze | grep {Loop loop: (100 + (-100 smax %n)) iterations!}
Wojciech Matyjewicza5718fc2008-02-12 15:09:36 +00002; PR2002
3
4define void @foo(i8 %n) {
5entry:
6 br label %loop
7loop:
8 %i = phi i8 [ -100, %entry ], [ %i.inc, %next ]
9 %cond = icmp slt i8 %i, %n
10 br i1 %cond, label %next, label %return
11next:
12 %i.inc = add i8 %i, 1
13 br label %loop
14return:
15 ret void
16}