1; RUN: opt < %s -analyze -enable-new-pm=0 -scalar-evolution -scalar-evolution-max-iterations=0 | FileCheck %s
2; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" -scalar-evolution-max-iterations=0 2>&1 | FileCheck %s
3; PR2088
4
5; CHECK: backedge-taken count is 113
6
7define void @fun() {
8entry:
9        br label %loop
10loop:
11        %i = phi i8 [ 0, %entry ], [ %i.next, %loop ]
12        %i.next = add i8 %i, 18
13        %cond = icmp ne i8 %i.next, 4
14        br i1 %cond, label %loop, label %exit
15exit:
16        ret void
17}
18