1 ; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 2>&1 | FileCheck %s
3 ; CHECK: Loop %bb: backedge-taken count is (7 + (-1 * %argc))
5 define i32 @main(i32 %argc, ptr %argv) nounwind {
7 %0 = icmp ugt i32 %argc, 7 ; <i1> [#uses=1]
8 br i1 %0, label %bb2, label %bb.nph
10 bb.nph: ; preds = %entry
13 bb: ; preds = %bb.nph, %bb1
14 %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb1 ] ; <i32> [#uses=2]
15 %argc_addr.04 = add i32 %indvar, %argc ; <i32> [#uses=1]
16 tail call void (...) @Test() nounwind
17 %1 = add i32 %argc_addr.04, 1 ; <i32> [#uses=1]
21 %phitmp = icmp ugt i32 %1, 7 ; <i1> [#uses=1]
22 %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
23 br i1 %phitmp, label %bb1.bb2_crit_edge, label %bb
25 bb1.bb2_crit_edge: ; preds = %bb1
28 bb2: ; preds = %bb1.bb2_crit_edge, %entry
32 declare void @Test(...)