brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 3725bd9 Raw
44 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s3 4define void @f(i1 %c) {5; CHECK-LABEL: 'f'6; CHECK-NEXT:  Classifying expressions for: @f7; CHECK-NEXT:    %start = select i1 %c, i32 100, i32 08; CHECK-NEXT:    --> %start U: [0,101) S: [0,101)9; CHECK-NEXT:    %step = select i1 %c, i32 -1, i32 110; CHECK-NEXT:    --> %step U: [1,0) S: [-2,2)11; CHECK-NEXT:    %iv = phi i32 [ %start, %entry ], [ %iv.dec, %loop ]12; CHECK-NEXT:    --> {%start,+,%step}<nsw><%loop> U: [0,101) S: [0,101) Exits: ((99 * %step)<nsw> + %start) LoopDispositions: { %loop: Computable }13; CHECK-NEXT:    %iv.tc = phi i32 [ 0, %entry ], [ %iv.tc.inc, %loop ]14; CHECK-NEXT:    --> {0,+,1}<nuw><nsw><%loop> U: [0,100) S: [0,100) Exits: 99 LoopDispositions: { %loop: Computable }15; CHECK-NEXT:    %iv.tc.inc = add i32 %iv.tc, 116; CHECK-NEXT:    --> {1,+,1}<nuw><nsw><%loop> U: [1,101) S: [1,101) Exits: 100 LoopDispositions: { %loop: Computable }17; CHECK-NEXT:    %iv.dec = add nsw i32 %iv, %step18; CHECK-NEXT:    --> {(%step + %start),+,%step}<nw><%loop> U: [-200,201) S: [-200,201) Exits: ((100 * %step)<nsw> + %start) LoopDispositions: { %loop: Computable }19; CHECK-NEXT:    %iv.sext = sext i32 %iv to i6420; CHECK-NEXT:    --> {(zext i32 %start to i64),+,(sext i32 %step to i64)}<nsw><%loop> U: [0,101) S: [0,101) Exits: ((zext i32 %start to i64) + (99 * (sext i32 %step to i64))<nsw>) LoopDispositions: { %loop: Computable }21; CHECK-NEXT:  Determining loop execution counts for: @f22; CHECK-NEXT:  Loop %loop: backedge-taken count is i32 9923; CHECK-NEXT:  Loop %loop: constant max backedge-taken count is i32 9924; CHECK-NEXT:  Loop %loop: symbolic max backedge-taken count is i32 9925; CHECK-NEXT:  Loop %loop: Trip multiple is 10026;27entry:28  %start = select i1 %c, i32 100, i32 029  %step =  select i1 %c, i32 -1,  i32 130  br label %loop31 32loop:33  %iv = phi i32 [ %start, %entry ], [ %iv.dec, %loop ]34  %iv.tc = phi i32 [ 0, %entry ], [ %iv.tc.inc, %loop ]35  %iv.tc.inc = add i32 %iv.tc, 136  %iv.dec = add nsw i32 %iv, %step37  %iv.sext = sext i32 %iv to i6438  %be = icmp ne i32 %iv.tc.inc, 10039  br i1 %be, label %loop, label %leave40 41leave:42  ret void43}44