blob: 292ea99b6b5d3be69c3cb744798ce5c7e6126719 [file] [log] [blame]
Wojciech Matyjewicza5718fc2008-02-12 15:09:36 +00001; RUN: llvm-as < %s | opt -scalar-evolution -analyze | grep {Loop loop: ( 100 + ( -100 smax %n)) iterations!}
2; 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}