brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 9cf3e06 Raw
40 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 52; RUN: opt -passes='print<scalar-evolution>' \3; RUN:  -scalar-evolution-classify-expressions=0 -disable-output %s 2>&1 | FileCheck %s4 5define void @infer_via_ranges(ptr %arr, i32 %n) {6; CHECK-LABEL: 'infer_via_ranges'7; CHECK-NEXT:  Determining loop execution counts for: @infer_via_ranges8; CHECK-NEXT:  Loop %loop: <multiple exits> backedge-taken count is ((-1 + %n) umin %n)9; CHECK-NEXT:    exit count for loop: %n10; CHECK-NEXT:    exit count for in.bounds: (-1 + %n)11; CHECK-NEXT:  Loop %loop: constant max backedge-taken count is i32 -214748364812; CHECK-NEXT:  Loop %loop: symbolic max backedge-taken count is ((-1 + %n) umin %n)13; CHECK-NEXT:    symbolic max exit count for loop: %n14; CHECK-NEXT:    symbolic max exit count for in.bounds: (-1 + %n)15; CHECK-NEXT:  Loop %loop: Trip multiple is 116;17 entry:18  %first.itr.check = icmp sgt i32 %n, 019  %start = sub i32 %n, 120  br i1 %first.itr.check, label %loop, label %exit21 22 loop:23  %idx = phi i32 [ %start, %entry ] , [ %idx.dec, %in.bounds ]24  %idx.dec = sub i32 %idx, 125  %abc = icmp sge i32 %idx, 026  br i1 %abc, label %in.bounds, label %out.of.bounds27 28 in.bounds:29  %addr = getelementptr i32, ptr %arr, i32 %idx30  store i32 0, ptr %addr31  %next = icmp sgt i32 %idx.dec, -132  br i1 %next, label %loop, label %exit33 34 out.of.bounds:35  ret void36 37 exit:38  ret void39}40