1 ; RUN: opt < %s "-passes=print<scalar-evolution>" -disable-output 2>&1 | FileCheck %s
4 ; CHECK: Loop %bb: backedge-taken count is (-1 + (-1 * %x) + %y)
6 define i32 @f(i32 %x, i32 %y) {
8 %tmp63 = icmp ult i32 %x, %y ; <i1> [#uses=1]
9 br i1 %tmp63, label %bb.preheader, label %bb8
11 bb.preheader: ; preds = %entry
14 bb: ; preds = %bb3, %bb.preheader
15 %x_addr.0 = phi i32 [ %tmp2, %bb3 ], [ %x, %bb.preheader ] ; <i32> [#uses=1]
16 %tmp2 = add i32 %x_addr.0, 1 ; <i32> [#uses=3]
20 %tmp6 = icmp ult i32 %tmp2, %y ; <i1> [#uses=1]
21 br i1 %tmp6, label %bb, label %bb8.loopexit
23 bb8.loopexit: ; preds = %bb3
26 bb8: ; preds = %bb8.loopexit, %entry
27 %x_addr.1 = phi i32 [ %x, %entry ], [ %tmp2, %bb8.loopexit ] ; <i32> [#uses=1]
30 return: ; preds = %bb8