1; RUN: opt < %s -analyze -enable-new-pm=0 -scalar-evolution 2>&1 | FileCheck %s 2; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" 2>&1 2>&1 | FileCheck %s 3 4; CHECK: Loop %bb: backedge-taken count is (7 + (-1 * %argc)) 5 6define i32 @main(i32 %argc, i8** %argv) nounwind { 7entry: 8 %0 = icmp ugt i32 %argc, 7 ; <i1> [#uses=1] 9 br i1 %0, label %bb2, label %bb.nph 10 11bb.nph: ; preds = %entry 12 br label %bb 13 14bb: ; preds = %bb.nph, %bb1 15 %indvar = phi i32 [ 0, %bb.nph ], [ %indvar.next, %bb1 ] ; <i32> [#uses=2] 16 %argc_addr.04 = add i32 %indvar, %argc ; <i32> [#uses=1] 17 tail call void (...) @Test() nounwind 18 %1 = add i32 %argc_addr.04, 1 ; <i32> [#uses=1] 19 br label %bb1 20 21bb1: ; preds = %bb 22 %phitmp = icmp ugt i32 %1, 7 ; <i1> [#uses=1] 23 %indvar.next = add i32 %indvar, 1 ; <i32> [#uses=1] 24 br i1 %phitmp, label %bb1.bb2_crit_edge, label %bb 25 26bb1.bb2_crit_edge: ; preds = %bb1 27 br label %bb2 28 29bb2: ; preds = %bb1.bb2_crit_edge, %entry 30 ret i32 0 31} 32 33declare void @Test(...) 34