40 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 52; RUN: opt < %s -passes="print<scalar-evolution>" -disable-output \3; RUN: -scalar-evolution-classify-expressions=0 2>&1 | FileCheck %s4; PR15975 6define i32 @f(i32 %x, i32 %y) {7; CHECK-LABEL: 'f'8; CHECK-NEXT: Determining loop execution counts for: @f9; CHECK-NEXT: Loop %bb: backedge-taken count is (-1 + (-1 * %x) + %y)10; CHECK-NEXT: Loop %bb: constant max backedge-taken count is i32 -111; CHECK-NEXT: Loop %bb: symbolic max backedge-taken count is (-1 + (-1 * %x) + %y)12; CHECK-NEXT: Loop %bb: Trip multiple is 113;14entry:15 %tmp63 = icmp ult i32 %x, %y ; <i1> [#uses=1]16 br i1 %tmp63, label %bb.preheader, label %bb817 18bb.preheader: ; preds = %entry19 br label %bb20 21bb: ; preds = %bb3, %bb.preheader22 %x_addr.0 = phi i32 [ %tmp2, %bb3 ], [ %x, %bb.preheader ] ; <i32> [#uses=1]23 %tmp2 = add i32 %x_addr.0, 1 ; <i32> [#uses=3]24 br label %bb325 26bb3: ; preds = %bb27 %tmp6 = icmp ult i32 %tmp2, %y ; <i1> [#uses=1]28 br i1 %tmp6, label %bb, label %bb8.loopexit29 30bb8.loopexit: ; preds = %bb331 br label %bb832 33bb8: ; preds = %bb8.loopexit, %entry34 %x_addr.1 = phi i32 [ %x, %entry ], [ %tmp2, %bb8.loopexit ] ; <i32> [#uses=1]35 br label %return36 37return: ; preds = %bb838 ret i32 %x_addr.139}40