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
4 define i32 @pr34538() local_unnamed_addr #0 {
5 ; CHECK-LABEL: 'pr34538'
6 ; CHECK-NEXT: Determining loop execution counts for: @pr34538
7 ; CHECK-NEXT: Loop %do.body: backedge-taken count is i32 10000
8 ; CHECK-NEXT: Loop %do.body: constant max backedge-taken count is i32 10000
9 ; CHECK-NEXT: Loop %do.body: symbolic max backedge-taken count is i32 10000
10 ; CHECK-NEXT: Loop %do.body: Trip multiple is 10001
15 do.body: ; preds = %do.body, %entry
16 %start.0 = phi i32 [ 0, %entry ], [ %inc.start.0, %do.body ]
17 %cmp = icmp slt i32 %start.0, 10000
18 %inc = zext i1 %cmp to i32
19 %inc.start.0 = add nsw i32 %start.0, %inc
20 br i1 %cmp, label %do.body, label %do.end
22 do.end: ; preds = %do.body
29 ; CHECK-NEXT: Determining loop execution counts for: @foo
30 ; CHECK-NEXT: Loop %do.body: backedge-taken count is i32 5000
31 ; CHECK-NEXT: Loop %do.body: constant max backedge-taken count is i32 5000
32 ; CHECK-NEXT: Loop %do.body: symbolic max backedge-taken count is i32 5000
33 ; CHECK-NEXT: Loop %do.body: Trip multiple is 5001
38 do.body: ; preds = %do.body, %entry
39 %start.0 = phi i32 [ 0, %entry ], [ %inc.start.0, %do.body ]
40 %cmp = icmp slt i32 %start.0, 10000
41 %select_ext = select i1 %cmp, i32 2 , i32 1
42 %inc.start.0 = add nsw i32 %start.0, %select_ext
43 br i1 %cmp, label %do.body, label %do.end
45 do.end: ; preds = %do.body