Lines Matching +full:- +full:iv
1 ; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
4 ; CHECK-LABEL: Classifying expressions for: @test0
5 ; CHECK: Loop %loop: max backedge-taken count is 32
10 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
11 %iv.shift = lshr i32 %iv, 1
12 %exit.cond = icmp eq i32 %iv, 0
20 ; CHECK-LABEL: Classifying expressions for: @test1
21 ; CHECK: Loop %loop: max backedge-taken count is 32
26 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
27 %iv.shift = shl i32 %iv, 1
28 %exit.cond = icmp eq i32 %iv, 0
36 ; CHECK-LABEL: Determining loop execution counts for: @test2
37 ; CHECK: Loop %loop: Unpredictable max backedge-taken count.
39 ; Unpredictable because %iv could "stabilize" to either -1 or 0,
45 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
46 %iv.shift = ashr i32 %iv, 1
47 %exit.cond = icmp eq i32 %iv, 0
55 ; CHECK-LABEL: Determining loop execution counts for: @test3
56 ; CHECK: Loop %loop: max backedge-taken count is 32
62 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
63 %iv.shift = ashr i32 %iv, 1
64 %exit.cond = icmp eq i32 %iv, 0
72 ; CHECK-LABEL: Classifying expressions for: @test4
73 ; CHECK-LABEL: Loop %loop: max backedge-taken count is 32
79 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
80 %iv.shift = ashr i32 %iv, 1
81 %exit.cond = icmp eq i32 %iv, -1
89 ; CHECK-LABEL: Determining loop execution counts for: @test5
90 ; CHECK: Loop %loop: Unpredictable max backedge-taken count.
92 ; %iv will "stabilize" to -1, so this is an infinite loop
98 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
99 %iv.shift = ashr i32 %iv, 1
100 %exit.cond = icmp eq i32 %iv, 0
108 ; CHECK-LABEL: Determining loop execution counts for: @test6
109 ; CHECK: Loop %loop: Unpredictable max backedge-taken count.
116 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
117 %iv.shift = lshr i32 %iv, %shift.amt
118 %exit.cond = icmp eq i32 %iv, 0
126 ; CHECK-LABEL: Classifying expressions for: @test7
127 ; CHECK: Loop %loop: max backedge-taken count is 32
133 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
134 %iv.shift = lshr i32 %iv, 1
135 %exit.cond = icmp eq i32 %iv.shift, 0
143 ; CHECK-LABEL: Classifying expressions for: @test8
144 ; CHECK: Loop %loop: Unpredictable max backedge-taken count.
146 ; In this test case, %iv.test stabilizes to 127, not -1, so the loop
153 %iv = phi i32 [ %init, %entry ], [ %iv.shift, %loop ]
154 %iv.shift = ashr i32 %iv, 1
155 %iv.test = lshr i32 %iv, 1
156 %exit.cond = icmp eq i32 %iv.test, -1
164 !1 = !{i32 -5000, i32 -1}