brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.2 KiB · 2b91ac1 Raw
60 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 @x(ptr %cond) {5; CHECK-LABEL: 'x'6; CHECK-NEXT:  Classifying expressions for: @x7; CHECK-NEXT:    %idx = phi i8 [ 0, %entry ], [ %idx.inc, %loop ]8; CHECK-NEXT:    --> {0,+,1}<nuw><nsw><%loop> U: [0,-128) S: [0,-128) Exits: <<Unknown>> LoopDispositions: { %loop: Computable }9; CHECK-NEXT:    %idx.inc = add nsw i8 %idx, 110; CHECK-NEXT:    --> {1,+,1}<nuw><%loop> U: [1,0) S: [1,0) Exits: <<Unknown>> LoopDispositions: { %loop: Computable }11; CHECK-NEXT:    %c = load volatile i1, ptr %cond, align 112; CHECK-NEXT:    --> %c U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %loop: Variant }13; CHECK-NEXT:  Determining loop execution counts for: @x14; CHECK-NEXT:  Loop %loop: Unpredictable backedge-taken count.15; CHECK-NEXT:  Loop %loop: Unpredictable constant max backedge-taken count.16; CHECK-NEXT:  Loop %loop: Unpredictable symbolic max backedge-taken count.17;18  entry:19  br label %loop20 21  loop:22  %idx = phi i8 [ 0, %entry ], [ %idx.inc, %loop ]23 24  %idx.inc = add nsw i8 %idx, 125 26  %c = load volatile i1, ptr %cond27  br i1 %c, label %loop, label %exit28 29  exit:30  ret void31}32 33define void @y(ptr %addr) {34; CHECK-LABEL: 'y'35; CHECK-NEXT:  Classifying expressions for: @y36; CHECK-NEXT:    %idx = phi i8 [ -5, %entry ], [ %idx.inc, %loop ]37; CHECK-NEXT:    --> {-5,+,1}<nsw><%loop> U: [-5,6) S: [-5,6) Exits: 5 LoopDispositions: { %loop: Computable }38; CHECK-NEXT:    %idx.inc = add i8 %idx, 139; CHECK-NEXT:    --> {-4,+,1}<nsw><%loop> U: [-4,7) S: [-4,7) Exits: 6 LoopDispositions: { %loop: Computable }40; CHECK-NEXT:  Determining loop execution counts for: @y41; CHECK-NEXT:  Loop %loop: backedge-taken count is i8 1042; CHECK-NEXT:  Loop %loop: constant max backedge-taken count is i8 1043; CHECK-NEXT:  Loop %loop: symbolic max backedge-taken count is i8 1044; CHECK-NEXT:  Loop %loop: Trip multiple is 1145;46  entry:47  br label %loop48 49  loop:50  %idx = phi i8 [-5, %entry ], [ %idx.inc, %loop ]51 52  %idx.inc = add i8 %idx, 153 54  %continue = icmp slt i8 %idx.inc, 655  br i1 %continue, label %loop, label %exit56 57  exit:58  ret void59}60