1 ; RUN: opt < %s -scalar-evolution -analyze -disable-output | grep {Loop bb: backedge-taken count is (-1 + (-1 \\* %x) + %y)}
4 define i32 @f(i32 %x, i32 %y) {
6 %tmp63 = icmp ult i32 %x, %y ; <i1> [#uses=1]
7 br i1 %tmp63, label %bb.preheader, label %bb8
9 bb.preheader: ; preds = %entry
12 bb: ; preds = %bb3, %bb.preheader
13 %x_addr.0 = phi i32 [ %tmp2, %bb3 ], [ %x, %bb.preheader ] ; <i32> [#uses=1]
14 %tmp2 = add i32 %x_addr.0, 1 ; <i32> [#uses=3]
18 %tmp6 = icmp ult i32 %tmp2, %y ; <i1> [#uses=1]
19 br i1 %tmp6, label %bb, label %bb8.loopexit
21 bb8.loopexit: ; preds = %bb3
24 bb8: ; preds = %bb8.loopexit, %entry
25 %x_addr.1 = phi i32 [ %x, %entry ], [ %tmp2, %bb8.loopexit ] ; <i32> [#uses=1]
28 return: ; preds = %bb8