1 ; RUN: opt < %s -analyze -scalar-evolution |& \
2 ; RUN: grep {Loop %bb: backedge-taken count is (7 + (-1 \\* %argc))}
4 define i32 @main(i32 %argc, i8** %argv) nounwind {
6 %0 = icmp ugt i32 %argc, 7 ; <i1> [#uses=1]
7 br i1 %0, label %bb2, label %bb.nph
9 bb.nph: ; preds = %entry
12 bb: ; preds = %bb.nph, %bb1
13 %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb1 ] ; <i32> [#uses=2]
14 %argc_addr.04 = add i32 %indvar, %argc ; <i32> [#uses=1]
15 tail call void (...)* @Test() nounwind
16 %1 = add i32 %argc_addr.04, 1 ; <i32> [#uses=1]
20 %phitmp = icmp ugt i32 %1, 7 ; <i1> [#uses=1]
21 %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1]
22 br i1 %phitmp, label %bb1.bb2_crit_edge, label %bb
24 bb1.bb2_crit_edge: ; preds = %bb1
27 bb2: ; preds = %bb1.bb2_crit_edge, %entry
31 declare void @Test(...)