1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 4 2; RUN: opt -disable-output "-passes=print<scalar-evolution>" -scalar-evolution-classify-expressions=0 < %s 2>&1 | FileCheck %s 3 4define void @f(i32 %n, ptr %ptr) { 5; 6; CHECK-LABEL: 'f' 7; CHECK-NEXT: Determining loop execution counts for: @f 8; CHECK-NEXT: Loop %loop: <multiple exits> Unpredictable backedge-taken count. 9; CHECK-NEXT: exit count for loop: i32 0 10; CHECK-NEXT: exit count for be: ***COULDNOTCOMPUTE*** 11; CHECK-NEXT: Loop %loop: constant max backedge-taken count is i32 0 12; CHECK-NEXT: Loop %loop: symbolic max backedge-taken count is i32 0 13; CHECK-NEXT: symbolic max exit count for loop: i32 0 14; CHECK-NEXT: symbolic max exit count for be: ***COULDNOTCOMPUTE*** 15; 16entry: 17 br label %loop 18 19loop: 20 %iv = phi i32 [ 0, %entry ], [ %iv.inc, %be ] 21 %iv.inc = add i32 %iv, 1 22 %unswitch_cond_root = icmp ne i32 %iv.inc, 42 23 %us.0 = and i1 %unswitch_cond_root, %unswitch_cond_root 24 %us.1 = and i1 %us.0, %us.0 25 %us.2 = and i1 %us.1, %us.1 26 %us.3 = and i1 %us.2, %us.2 27 %us.4 = and i1 %us.3, %us.3 28 %us.5 = and i1 %us.4, %us.4 29 %us.6 = and i1 %us.5, %us.5 30 %us.7 = and i1 %us.6, %us.6 31 %us.8 = and i1 %us.7, %us.7 32 %us.9 = and i1 %us.8, %us.8 33 %us.10 = and i1 %us.9, %us.9 34 %us.11 = and i1 %us.10, %us.10 35 %us.12 = and i1 %us.11, %us.11 36 %us.13 = and i1 %us.12, %us.12 37 %us.14 = and i1 %us.13, %us.13 38 %us.15 = and i1 %us.14, %us.14 39 %us.16 = and i1 %us.15, %us.15 40 %us.17 = and i1 %us.16, %us.16 41 %us.18 = and i1 %us.17, %us.17 42 %us.19 = and i1 %us.18, %us.18 43 %us.20 = and i1 %us.19, %us.19 44 %us.21 = and i1 %us.20, %us.20 45 %us.22 = and i1 %us.21, %us.21 46 %us.23 = and i1 %us.22, %us.22 47 %us.24 = and i1 %us.23, %us.23 48 %us.25 = and i1 %us.24, %us.24 49 %us.26 = and i1 %us.25, %us.25 50 %us.27 = and i1 %us.26, %us.26 51 %us.28 = and i1 %us.27, %us.27 52 %us.29 = and i1 %us.28, %us.28 53 br i1 %us.29, label %leave, label %be 54 55be: 56 store volatile i32 0, ptr %ptr 57 %becond = icmp ult i32 %iv.inc, %n 58 br i1 %becond, label %leave, label %loop 59 60leave: 61 ret void 62} 63