1 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
2 ; RUN: opt < %s -analyze -enable-new-pm=0 -scalar-evolution -scalar-evolution-classify-expressions=0 | FileCheck %s
3 ; RUN: opt < %s -disable-output "-passes=print<scalar-evolution>" -scalar-evolution-classify-expressions=0 2>&1 | FileCheck %s
5 @mode_table = global [4 x i32] zeroinitializer ; <[4 x i32]*> [#uses=1]
9 ; CHECK-NEXT: Determining loop execution counts for: @f
10 ; CHECK-NEXT: Loop %bb: <multiple exits> Unpredictable backedge-taken count.
11 ; CHECK-NEXT: exit count for bb: ***COULDNOTCOMPUTE***
12 ; CHECK-NEXT: exit count for bb2: 1
13 ; CHECK-NEXT: Loop %bb: max backedge-taken count is 1
14 ; CHECK-NEXT: Loop %bb: Unpredictable predicated backedge-taken count.
17 tail call i32 @fegetround( ) ; <i32>:0 [#uses=1]
20 bb: ; preds = %bb4, %entry
21 %mode.0 = phi i8 [ 0, %entry ], [ %indvar.next, %bb4 ] ; <i8> [#uses=4]
22 zext i8 %mode.0 to i32 ; <i32>:1 [#uses=1]
23 getelementptr [4 x i32], [4 x i32]* @mode_table, i32 0, i32 %1 ; <i32*>:2 [#uses=1]
24 load i32, i32* %2, align 4 ; <i32>:3 [#uses=1]
25 icmp eq i32 %3, %0 ; <i1>:4 [#uses=1]
26 br i1 %4, label %bb1, label %bb2
32 icmp eq i8 %mode.0, 1 ; <i1>:5 [#uses=1]
33 br i1 %5, label %bb5, label %bb4
36 %indvar.next = add i8 %mode.0, 1 ; <i8> [#uses=1]
40 tail call void @raise_exception( ) noreturn
44 declare i32 @fegetround()
46 declare void @raise_exception() noreturn