llvm.org GIT mirror llvm / 8aca037
[Test] Precommit test for D69006 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375190 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Reames 1 year, 4 days ago
1 changed file(s) with 317 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
1 ; RUN: opt -analyze -scalar-evolution < %s | FileCheck %s
2
3 define void @umin_sext_x_zext_x(i32 %len) {
4 ; CHECK-LABEL: 'umin_sext_x_zext_x'
5 ; CHECK-NEXT: Classifying expressions for: @umin_sext_x_zext_x
6 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
7 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
8 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
9 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
10 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
11 ; CHECK-NEXT: --> {0,+,1}<%loop> U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
12 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
13 ; CHECK-NEXT: --> {1,+,1}<%loop> U: [1,4294967297) S: [1,4294967297) Exits: (1 + ((zext i32 %len to i64) umin (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
14 ; CHECK-NEXT: %and = and i1 %cmp1, %cmp2
15 ; CHECK-NEXT: --> %and U: full-set S: full-set Exits: <> LoopDispositions: { %loop: Variant }
16 ; CHECK-NEXT: Determining loop execution counts for: @umin_sext_x_zext_x
17 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
18 ; CHECK-NEXT: Loop %loop: max backedge-taken count is 4294967295
19 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
20 ; CHECK-NEXT: Predicates:
21 ; CHECK: Loop %loop: Trip multiple is 1
22 ;
23 entry:
24 %len.zext = zext i32 %len to i64
25 %len.sext = sext i32 %len to i64
26 br label %loop
27 loop:
28 %iv = phi i64 [0, %entry], [%iv.next, %loop]
29 %iv.next = add i64 %iv, 1
30 %cmp1 = icmp ult i64 %iv, %len.zext
31 %cmp2 = icmp ult i64 %iv, %len.sext
32 %and = and i1 %cmp1, %cmp2
33 br i1 %and, label %loop, label %exit
34 exit:
35 ret void
36 }
37
38 define void @ule_sext_x_zext_x(i32 %len) {
39 ; CHECK-LABEL: 'ule_sext_x_zext_x'
40 ; CHECK-NEXT: Classifying expressions for: @ule_sext_x_zext_x
41 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
42 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
43 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
44 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
45 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
46 ; CHECK-NEXT: --> {0,+,1}<%loop> U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
47 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
48 ; CHECK-NEXT: --> {1,+,1}<%loop> U: [1,4294967297) S: [1,4294967297) Exits: (1 + ((zext i32 %len to i64) umin (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
49 ; CHECK-NEXT: %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
50 ; CHECK-NEXT: --> ((zext i32 %len to i64) umin (sext i32 %len to i64)) U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
51 ; CHECK-NEXT: Determining loop execution counts for: @ule_sext_x_zext_x
52 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
53 ; CHECK-NEXT: Loop %loop: max backedge-taken count is 4294967295
54 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
55 ; CHECK-NEXT: Predicates:
56 ; CHECK: Loop %loop: Trip multiple is 1
57 ;
58 entry:
59 %len.zext = zext i32 %len to i64
60 %len.sext = sext i32 %len to i64
61 br label %loop
62 loop:
63 %iv = phi i64 [0, %entry], [%iv.next, %loop]
64 %iv.next = add i64 %iv, 1
65 %cmp1 = icmp ule i64 %len.zext, %len.sext
66 %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
67 %cmp2 = icmp ult i64 %iv, %sel
68 br i1 %cmp2, label %loop, label %exit
69 exit:
70 ret void
71 }
72
73 define void @uge_sext_x_zext_x(i32 %len) {
74 ; CHECK-LABEL: 'uge_sext_x_zext_x'
75 ; CHECK-NEXT: Classifying expressions for: @uge_sext_x_zext_x
76 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
77 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
78 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
79 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
80 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
81 ; CHECK-NEXT: --> {0,+,1}<%loop> U: full-set S: full-set Exits: ((zext i32 %len to i64) umax (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
82 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
83 ; CHECK-NEXT: --> {1,+,1}<%loop> U: full-set S: full-set Exits: (1 + ((zext i32 %len to i64) umax (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
84 ; CHECK-NEXT: %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
85 ; CHECK-NEXT: --> ((zext i32 %len to i64) umax (sext i32 %len to i64)) U: full-set S: full-set Exits: ((zext i32 %len to i64) umax (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
86 ; CHECK-NEXT: Determining loop execution counts for: @uge_sext_x_zext_x
87 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) umax (sext i32 %len to i64))
88 ; CHECK-NEXT: Loop %loop: max backedge-taken count is -1
89 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) umax (sext i32 %len to i64))
90 ; CHECK-NEXT: Predicates:
91 ; CHECK: Loop %loop: Trip multiple is 1
92 ;
93 entry:
94 %len.zext = zext i32 %len to i64
95 %len.sext = sext i32 %len to i64
96 br label %loop
97 loop:
98 %iv = phi i64 [0, %entry], [%iv.next, %loop]
99 %iv.next = add i64 %iv, 1
100 %cmp1 = icmp uge i64 %len.zext, %len.sext
101 %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
102 %cmp2 = icmp ult i64 %iv, %sel
103 br i1 %cmp2, label %loop, label %exit
104 exit:
105 ret void
106 }
107
108 define void @ult_sext_x_zext_x(i32 %len) {
109 ; CHECK-LABEL: 'ult_sext_x_zext_x'
110 ; CHECK-NEXT: Classifying expressions for: @ult_sext_x_zext_x
111 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
112 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
113 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
114 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
115 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
116 ; CHECK-NEXT: --> {0,+,1}<%loop> U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
117 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
118 ; CHECK-NEXT: --> {1,+,1}<%loop> U: [1,4294967297) S: [1,4294967297) Exits: (1 + ((zext i32 %len to i64) umin (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
119 ; CHECK-NEXT: %umin = select i1 %cmp1, i64 %len.zext, i64 %len.sext
120 ; CHECK-NEXT: --> ((zext i32 %len to i64) umin (sext i32 %len to i64)) U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
121 ; CHECK-NEXT: Determining loop execution counts for: @ult_sext_x_zext_x
122 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
123 ; CHECK-NEXT: Loop %loop: max backedge-taken count is 4294967295
124 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
125 ; CHECK-NEXT: Predicates:
126 ; CHECK: Loop %loop: Trip multiple is 1
127 ;
128 entry:
129 %len.zext = zext i32 %len to i64
130 %len.sext = sext i32 %len to i64
131 br label %loop
132 loop:
133 %iv = phi i64 [0, %entry], [%iv.next, %loop]
134 %iv.next = add i64 %iv, 1
135 %cmp1 = icmp ult i64 %len.zext, %len.sext
136 %umin = select i1 %cmp1, i64 %len.zext, i64 %len.sext
137 %cmp2 = icmp ult i64 %iv, %umin
138 br i1 %cmp2, label %loop, label %exit
139 exit:
140 ret void
141 }
142
143 define void @ugt_sext_x_zext_x(i32 %len) {
144 ; CHECK-LABEL: 'ugt_sext_x_zext_x'
145 ; CHECK-NEXT: Classifying expressions for: @ugt_sext_x_zext_x
146 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
147 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
148 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
149 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
150 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
151 ; CHECK-NEXT: --> {0,+,1}<%loop> U: full-set S: full-set Exits: ((zext i32 %len to i64) umax (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
152 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
153 ; CHECK-NEXT: --> {1,+,1}<%loop> U: full-set S: full-set Exits: (1 + ((zext i32 %len to i64) umax (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
154 ; CHECK-NEXT: %umax = select i1 %cmp1, i64 %len.zext, i64 %len.sext
155 ; CHECK-NEXT: --> ((zext i32 %len to i64) umax (sext i32 %len to i64)) U: full-set S: full-set Exits: ((zext i32 %len to i64) umax (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
156 ; CHECK-NEXT: Determining loop execution counts for: @ugt_sext_x_zext_x
157 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) umax (sext i32 %len to i64))
158 ; CHECK-NEXT: Loop %loop: max backedge-taken count is -1
159 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) umax (sext i32 %len to i64))
160 ; CHECK-NEXT: Predicates:
161 ; CHECK: Loop %loop: Trip multiple is 1
162 ;
163 entry:
164 %len.zext = zext i32 %len to i64
165 %len.sext = sext i32 %len to i64
166 br label %loop
167 loop:
168 %iv = phi i64 [0, %entry], [%iv.next, %loop]
169 %iv.next = add i64 %iv, 1
170 %cmp1 = icmp ugt i64 %len.zext, %len.sext
171 %umax = select i1 %cmp1, i64 %len.zext, i64 %len.sext
172 %cmp2 = icmp ult i64 %iv, %umax
173 br i1 %cmp2, label %loop, label %exit
174 exit:
175 ret void
176 }
177
178 define void @sle_sext_x_zext_x(i32 %len) {
179 ; CHECK-LABEL: 'sle_sext_x_zext_x'
180 ; CHECK-NEXT: Classifying expressions for: @sle_sext_x_zext_x
181 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
182 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
183 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
184 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
185 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
186 ; CHECK-NEXT: --> {0,+,1}<%loop> U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
187 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
188 ; CHECK-NEXT: --> {1,+,1}<%loop> U: [1,4294967297) S: [1,4294967297) Exits: (1 + ((zext i32 %len to i64) umin (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
189 ; CHECK-NEXT: %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
190 ; CHECK-NEXT: --> ((zext i32 %len to i64) umin (sext i32 %len to i64)) U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) umin (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
191 ; CHECK-NEXT: Determining loop execution counts for: @sle_sext_x_zext_x
192 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
193 ; CHECK-NEXT: Loop %loop: max backedge-taken count is 4294967295
194 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) umin (sext i32 %len to i64))
195 ; CHECK-NEXT: Predicates:
196 ; CHECK: Loop %loop: Trip multiple is 1
197 ;
198 entry:
199 %len.zext = zext i32 %len to i64
200 %len.sext = sext i32 %len to i64
201 br label %loop
202 loop:
203 %iv = phi i64 [0, %entry], [%iv.next, %loop]
204 %iv.next = add i64 %iv, 1
205 %cmp1 = icmp ule i64 %len.zext, %len.sext
206 %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
207 %cmp2 = icmp ult i64 %iv, %sel
208 br i1 %cmp2, label %loop, label %exit
209 exit:
210 ret void
211 }
212
213 define void @sge_sext_x_zext_x(i32 %len) {
214 ; CHECK-LABEL: 'sge_sext_x_zext_x'
215 ; CHECK-NEXT: Classifying expressions for: @sge_sext_x_zext_x
216 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
217 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
218 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
219 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
220 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
221 ; CHECK-NEXT: --> {0,+,1}<%loop> U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) smax (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
222 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
223 ; CHECK-NEXT: --> {1,+,1}<%loop> U: [1,4294967297) S: [1,4294967297) Exits: (1 + ((zext i32 %len to i64) smax (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
224 ; CHECK-NEXT: %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
225 ; CHECK-NEXT: --> ((zext i32 %len to i64) smax (sext i32 %len to i64)) U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) smax (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
226 ; CHECK-NEXT: Determining loop execution counts for: @sge_sext_x_zext_x
227 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) smax (sext i32 %len to i64))
228 ; CHECK-NEXT: Loop %loop: max backedge-taken count is 4294967295
229 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) smax (sext i32 %len to i64))
230 ; CHECK-NEXT: Predicates:
231 ; CHECK: Loop %loop: Trip multiple is 1
232 ;
233 entry:
234 %len.zext = zext i32 %len to i64
235 %len.sext = sext i32 %len to i64
236 br label %loop
237 loop:
238 %iv = phi i64 [0, %entry], [%iv.next, %loop]
239 %iv.next = add i64 %iv, 1
240 %cmp1 = icmp sge i64 %len.zext, %len.sext
241 %sel = select i1 %cmp1, i64 %len.zext, i64 %len.sext
242 %cmp2 = icmp ult i64 %iv, %sel
243 br i1 %cmp2, label %loop, label %exit
244 exit:
245 ret void
246 }
247
248 define void @slt_sext_x_zext_x(i32 %len) {
249 ; CHECK-LABEL: 'slt_sext_x_zext_x'
250 ; CHECK-NEXT: Classifying expressions for: @slt_sext_x_zext_x
251 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
252 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
253 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
254 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
255 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
256 ; CHECK-NEXT: --> {0,+,1}<%loop> U: full-set S: full-set Exits: ((zext i32 %len to i64) smin (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
257 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
258 ; CHECK-NEXT: --> {1,+,1}<%loop> U: full-set S: full-set Exits: (1 + ((zext i32 %len to i64) smin (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
259 ; CHECK-NEXT: %umin = select i1 %cmp1, i64 %len.zext, i64 %len.sext
260 ; CHECK-NEXT: --> ((zext i32 %len to i64) smin (sext i32 %len to i64)) U: [-2147483648,2147483648) S: [-2147483648,2147483648) Exits: ((zext i32 %len to i64) smin (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
261 ; CHECK-NEXT: Determining loop execution counts for: @slt_sext_x_zext_x
262 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) smin (sext i32 %len to i64))
263 ; CHECK-NEXT: Loop %loop: max backedge-taken count is -1
264 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) smin (sext i32 %len to i64))
265 ; CHECK-NEXT: Predicates:
266 ; CHECK: Loop %loop: Trip multiple is 1
267 ;
268 entry:
269 %len.zext = zext i32 %len to i64
270 %len.sext = sext i32 %len to i64
271 br label %loop
272 loop:
273 %iv = phi i64 [0, %entry], [%iv.next, %loop]
274 %iv.next = add i64 %iv, 1
275 %cmp1 = icmp slt i64 %len.zext, %len.sext
276 %umin = select i1 %cmp1, i64 %len.zext, i64 %len.sext
277 %cmp2 = icmp ult i64 %iv, %umin
278 br i1 %cmp2, label %loop, label %exit
279 exit:
280 ret void
281 }
282
283 define void @sgt_sext_x_zext_x(i32 %len) {
284 ; CHECK-LABEL: 'sgt_sext_x_zext_x'
285 ; CHECK-NEXT: Classifying expressions for: @sgt_sext_x_zext_x
286 ; CHECK-NEXT: %len.zext = zext i32 %len to i64
287 ; CHECK-NEXT: --> (zext i32 %len to i64) U: [0,4294967296) S: [0,4294967296)
288 ; CHECK-NEXT: %len.sext = sext i32 %len to i64
289 ; CHECK-NEXT: --> (sext i32 %len to i64) U: [-2147483648,2147483648) S: [-2147483648,2147483648)
290 ; CHECK-NEXT: %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ]
291 ; CHECK-NEXT: --> {0,+,1}<%loop> U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) smax (sext i32 %len to i64)) LoopDispositions: { %loop: Computable }
292 ; CHECK-NEXT: %iv.next = add i64 %iv, 1
293 ; CHECK-NEXT: --> {1,+,1}<%loop> U: [1,4294967297) S: [1,4294967297) Exits: (1 + ((zext i32 %len to i64) smax (sext i32 %len to i64))) LoopDispositions: { %loop: Computable }
294 ; CHECK-NEXT: %umax = select i1 %cmp1, i64 %len.zext, i64 %len.sext
295 ; CHECK-NEXT: --> ((zext i32 %len to i64) smax (sext i32 %len to i64)) U: [0,4294967296) S: [0,4294967296) Exits: ((zext i32 %len to i64) smax (sext i32 %len to i64)) LoopDispositions: { %loop: Invariant }
296 ; CHECK-NEXT: Determining loop execution counts for: @sgt_sext_x_zext_x
297 ; CHECK-NEXT: Loop %loop: backedge-taken count is ((zext i32 %len to i64) smax (sext i32 %len to i64))
298 ; CHECK-NEXT: Loop %loop: max backedge-taken count is 4294967295
299 ; CHECK-NEXT: Loop %loop: Predicated backedge-taken count is ((zext i32 %len to i64) smax (sext i32 %len to i64))
300 ; CHECK-NEXT: Predicates:
301 ; CHECK: Loop %loop: Trip multiple is 1
302 ;
303 entry:
304 %len.zext = zext i32 %len to i64
305 %len.sext = sext i32 %len to i64
306 br label %loop
307 loop:
308 %iv = phi i64 [0, %entry], [%iv.next, %loop]
309 %iv.next = add i64 %iv, 1
310 %cmp1 = icmp sgt i64 %len.zext, %len.sext
311 %umax = select i1 %cmp1, i64 %len.zext, i64 %len.sext
312 %cmp2 = icmp ult i64 %iv, %umax
313 br i1 %cmp2, label %loop, label %exit
314 exit:
315 ret void
316 }