1 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
5 target triple = "x86_64-apple-macosx10.6.0"
8 ;; for (long unsigned i = 0; i < 10; i++) {
12 define void @exact0(ptr %A, ptr %B) nounwind uwtable ssp {
17 ; CHECK: da analyze - none!
18 ; CHECK: da analyze - flow [<=|<]!
19 ; CHECK: da analyze - confused!
20 ; CHECK: da analyze - none!
21 ; CHECK: da analyze - confused!
22 ; CHECK: da analyze - none!
24 for.body: ; preds = %entry, %for.body
25 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
26 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
27 %conv = trunc i64 %i.02 to i32
28 %add = add i64 %i.02, 10
29 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %add
30 store i32 %conv, ptr %arrayidx, align 4
31 %mul = shl i64 %i.02, 1
32 %add13 = or disjoint i64 %mul, 1
33 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %add13
34 %0 = load i32, ptr %arrayidx2, align 4
35 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
36 store i32 %0, ptr %B.addr.01, align 4
37 %inc = add i64 %i.02, 1
38 %exitcond = icmp ne i64 %inc, 10
39 br i1 %exitcond, label %for.body, label %for.end
41 for.end: ; preds = %for.body
46 ;; for (long unsigned i = 0; i < 10; i++) {
50 define void @exact1(ptr %A, ptr %B) nounwind uwtable ssp {
55 ; CHECK: da analyze - none!
56 ; CHECK: da analyze - none!
57 ; CHECK: da analyze - confused!
58 ; CHECK: da analyze - none!
59 ; CHECK: da analyze - confused!
60 ; CHECK: da analyze - none!
62 for.body: ; preds = %entry, %for.body
63 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
64 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
65 %conv = trunc i64 %i.02 to i32
66 %mul = shl i64 %i.02, 2
67 %add = add i64 %mul, 10
68 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %add
69 store i32 %conv, ptr %arrayidx, align 4
70 %mul1 = shl i64 %i.02, 1
71 %add23 = or disjoint i64 %mul1, 1
72 %arrayidx3 = getelementptr inbounds i32, ptr %A, i64 %add23
73 %0 = load i32, ptr %arrayidx3, align 4
74 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
75 store i32 %0, ptr %B.addr.01, align 4
76 %inc = add i64 %i.02, 1
77 %exitcond = icmp ne i64 %inc, 10
78 br i1 %exitcond, label %for.body, label %for.end
80 for.end: ; preds = %for.body
85 ;; for (long unsigned i = 0; i < 10; i++) {
89 define void @exact2(ptr %A, ptr %B) nounwind uwtable ssp {
94 ; CHECK: da analyze - none!
95 ; CHECK: da analyze - none!
96 ; CHECK: da analyze - confused!
97 ; CHECK: da analyze - none!
98 ; CHECK: da analyze - confused!
99 ; CHECK: da analyze - none!
101 for.body: ; preds = %entry, %for.body
102 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
103 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
104 %conv = trunc i64 %i.02 to i32
105 %mul = mul i64 %i.02, 6
106 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
107 store i32 %conv, ptr %arrayidx, align 4
108 %add = add i64 %i.02, 60
109 %arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
110 %0 = load i32, ptr %arrayidx1, align 4
111 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
112 store i32 %0, ptr %B.addr.01, align 4
113 %inc = add i64 %i.02, 1
114 %exitcond = icmp ne i64 %inc, 10
115 br i1 %exitcond, label %for.body, label %for.end
117 for.end: ; preds = %for.body
122 ;; for (long unsigned i = 0; i <= 10; i++) {
126 define void @exact3(ptr %A, ptr %B) nounwind uwtable ssp {
130 ; CHECK-LABEL: exact3
131 ; CHECK: da analyze - none!
132 ; CHECK: da analyze - flow [>]!
133 ; CHECK: da analyze - confused!
134 ; CHECK: da analyze - none!
135 ; CHECK: da analyze - confused!
136 ; CHECK: da analyze - none!
138 for.body: ; preds = %entry, %for.body
139 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
140 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
141 %conv = trunc i64 %i.02 to i32
142 %mul = mul i64 %i.02, 6
143 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
144 store i32 %conv, ptr %arrayidx, align 4
145 %add = add i64 %i.02, 60
146 %arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
147 %0 = load i32, ptr %arrayidx1, align 4
148 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
149 store i32 %0, ptr %B.addr.01, align 4
150 %inc = add i64 %i.02, 1
151 %exitcond = icmp ne i64 %inc, 11
152 br i1 %exitcond, label %for.body, label %for.end
154 for.end: ; preds = %for.body
159 ;; for (long unsigned i = 0; i < 12; i++) {
163 define void @exact4(ptr %A, ptr %B) nounwind uwtable ssp {
167 ; CHECK-LABEL: exact4
168 ; CHECK: da analyze - none!
169 ; CHECK: da analyze - flow [>]!
170 ; CHECK: da analyze - confused!
171 ; CHECK: da analyze - none!
172 ; CHECK: da analyze - confused!
173 ; CHECK: da analyze - none!
175 for.body: ; preds = %entry, %for.body
176 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
177 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
178 %conv = trunc i64 %i.02 to i32
179 %mul = mul i64 %i.02, 6
180 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
181 store i32 %conv, ptr %arrayidx, align 4
182 %add = add i64 %i.02, 60
183 %arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
184 %0 = load i32, ptr %arrayidx1, align 4
185 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
186 store i32 %0, ptr %B.addr.01, align 4
187 %inc = add i64 %i.02, 1
188 %exitcond = icmp ne i64 %inc, 12
189 br i1 %exitcond, label %for.body, label %for.end
191 for.end: ; preds = %for.body
196 ;; for (long unsigned i = 0; i <= 12; i++) {
200 define void @exact5(ptr %A, ptr %B) nounwind uwtable ssp {
204 ; CHECK-LABEL: exact5
205 ; CHECK: da analyze - none!
206 ; CHECK: da analyze - flow [=>|<]!
207 ; CHECK: da analyze - confused!
208 ; CHECK: da analyze - none!
209 ; CHECK: da analyze - confused!
210 ; CHECK: da analyze - none!
212 for.body: ; preds = %entry, %for.body
213 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
214 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
215 %conv = trunc i64 %i.02 to i32
216 %mul = mul i64 %i.02, 6
217 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
218 store i32 %conv, ptr %arrayidx, align 4
219 %add = add i64 %i.02, 60
220 %arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
221 %0 = load i32, ptr %arrayidx1, align 4
222 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
223 store i32 %0, ptr %B.addr.01, align 4
224 %inc = add i64 %i.02, 1
225 %exitcond = icmp ne i64 %inc, 13
226 br i1 %exitcond, label %for.body, label %for.end
228 for.end: ; preds = %for.body
233 ;; for (long unsigned i = 0; i < 18; i++) {
237 define void @exact6(ptr %A, ptr %B) nounwind uwtable ssp {
241 ; CHECK-LABEL: exact6
242 ; CHECK: da analyze - none!
243 ; CHECK: da analyze - flow [=>|<]!
244 ; CHECK: da analyze - confused!
245 ; CHECK: da analyze - none!
246 ; CHECK: da analyze - confused!
247 ; CHECK: da analyze - none!
249 for.body: ; preds = %entry, %for.body
250 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
251 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
252 %conv = trunc i64 %i.02 to i32
253 %mul = mul i64 %i.02, 6
254 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
255 store i32 %conv, ptr %arrayidx, align 4
256 %add = add i64 %i.02, 60
257 %arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
258 %0 = load i32, ptr %arrayidx1, align 4
259 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
260 store i32 %0, ptr %B.addr.01, align 4
261 %inc = add i64 %i.02, 1
262 %exitcond = icmp ne i64 %inc, 18
263 br i1 %exitcond, label %for.body, label %for.end
265 for.end: ; preds = %for.body
270 ;; for (long unsigned i = 0; i <= 18; i++) {
274 define void @exact7(ptr %A, ptr %B) nounwind uwtable ssp {
278 ; CHECK-LABEL: exact7
279 ; CHECK: da analyze - none!
280 ; CHECK: da analyze - flow [*|<]!
281 ; CHECK: da analyze - confused!
282 ; CHECK: da analyze - none!
283 ; CHECK: da analyze - confused!
284 ; CHECK: da analyze - none!
286 for.body: ; preds = %entry, %for.body
287 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
288 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
289 %conv = trunc i64 %i.02 to i32
290 %mul = mul i64 %i.02, 6
291 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
292 store i32 %conv, ptr %arrayidx, align 4
293 %add = add i64 %i.02, 60
294 %arrayidx1 = getelementptr inbounds i32, ptr %A, i64 %add
295 %0 = load i32, ptr %arrayidx1, align 4
296 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
297 store i32 %0, ptr %B.addr.01, align 4
298 %inc = add i64 %i.02, 1
299 %exitcond = icmp ne i64 %inc, 19
300 br i1 %exitcond, label %for.body, label %for.end
302 for.end: ; preds = %for.body
307 ;; for (long unsigned i = 0; i < 10; i++) {
309 ;; *B++ = A[-i - 60];
311 define void @exact8(ptr %A, ptr %B) nounwind uwtable ssp {
315 ; CHECK-LABEL: exact8
316 ; CHECK: da analyze - none!
317 ; CHECK: da analyze - none!
318 ; CHECK: da analyze - confused!
319 ; CHECK: da analyze - none!
320 ; CHECK: da analyze - confused!
321 ; CHECK: da analyze - none!
323 for.body: ; preds = %entry, %for.body
324 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
325 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
326 %conv = trunc i64 %i.02 to i32
327 %mul = mul i64 %i.02, -6
328 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
329 store i32 %conv, ptr %arrayidx, align 4
330 %sub1 = sub i64 -60, %i.02
331 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %sub1
332 %0 = load i32, ptr %arrayidx2, align 4
333 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
334 store i32 %0, ptr %B.addr.01, align 4
335 %inc = add i64 %i.02, 1
336 %exitcond = icmp ne i64 %inc, 10
337 br i1 %exitcond, label %for.body, label %for.end
339 for.end: ; preds = %for.body
344 ;; for (long unsigned i = 0; i <= 10; i++) {
346 ;; *B++ = A[-i - 60];
348 define void @exact9(ptr %A, ptr %B) nounwind uwtable ssp {
352 ; CHECK-LABEL: exact9
353 ; CHECK: da analyze - none!
354 ; CHECK: da analyze - flow [>]!
355 ; CHECK: da analyze - confused!
356 ; CHECK: da analyze - none!
357 ; CHECK: da analyze - confused!
358 ; CHECK: da analyze - none!
360 for.body: ; preds = %entry, %for.body
361 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
362 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
363 %conv = trunc i64 %i.02 to i32
364 %mul = mul i64 %i.02, -6
365 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
366 store i32 %conv, ptr %arrayidx, align 4
367 %sub1 = sub i64 -60, %i.02
368 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %sub1
369 %0 = load i32, ptr %arrayidx2, align 4
370 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
371 store i32 %0, ptr %B.addr.01, align 4
372 %inc = add i64 %i.02, 1
373 %exitcond = icmp ne i64 %inc, 11
374 br i1 %exitcond, label %for.body, label %for.end
376 for.end: ; preds = %for.body
381 ;; for (long unsigned i = 0; i < 12; i++) {
383 ;; *B++ = A[-i - 60];
385 define void @exact10(ptr %A, ptr %B) nounwind uwtable ssp {
389 ; CHECK-LABEL: exact10
390 ; CHECK: da analyze - none!
391 ; CHECK: da analyze - flow [>]!
392 ; CHECK: da analyze - confused!
393 ; CHECK: da analyze - none!
394 ; CHECK: da analyze - confused!
395 ; CHECK: da analyze - none!
397 for.body: ; preds = %entry, %for.body
398 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
399 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
400 %conv = trunc i64 %i.02 to i32
401 %mul = mul i64 %i.02, -6
402 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
403 store i32 %conv, ptr %arrayidx, align 4
404 %sub1 = sub i64 -60, %i.02
405 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %sub1
406 %0 = load i32, ptr %arrayidx2, align 4
407 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
408 store i32 %0, ptr %B.addr.01, align 4
409 %inc = add i64 %i.02, 1
410 %exitcond = icmp ne i64 %inc, 12
411 br i1 %exitcond, label %for.body, label %for.end
413 for.end: ; preds = %for.body
418 ;; for (long unsigned i = 0; i <= 12; i++) {
420 ;; *B++ = A[-i - 60];
422 define void @exact11(ptr %A, ptr %B) nounwind uwtable ssp {
426 ; CHECK-LABEL: exact11
427 ; CHECK: da analyze - none!
428 ; CHECK: da analyze - flow [=>|<]!
429 ; CHECK: da analyze - confused!
430 ; CHECK: da analyze - none!
431 ; CHECK: da analyze - confused!
432 ; CHECK: da analyze - none!
434 for.body: ; preds = %entry, %for.body
435 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
436 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
437 %conv = trunc i64 %i.02 to i32
438 %mul = mul i64 %i.02, -6
439 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
440 store i32 %conv, ptr %arrayidx, align 4
441 %sub1 = sub i64 -60, %i.02
442 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %sub1
443 %0 = load i32, ptr %arrayidx2, align 4
444 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
445 store i32 %0, ptr %B.addr.01, align 4
446 %inc = add i64 %i.02, 1
447 %exitcond = icmp ne i64 %inc, 13
448 br i1 %exitcond, label %for.body, label %for.end
450 for.end: ; preds = %for.body
455 ;; for (long unsigned i = 0; i < 18; i++) {
457 ;; *B++ = A[-i - 60];
459 define void @exact12(ptr %A, ptr %B) nounwind uwtable ssp {
463 ; CHECK-LABEL: exact12
464 ; CHECK: da analyze - none!
465 ; CHECK: da analyze - flow [=>|<]!
466 ; CHECK: da analyze - confused!
467 ; CHECK: da analyze - none!
468 ; CHECK: da analyze - confused!
469 ; CHECK: da analyze - none!
471 for.body: ; preds = %entry, %for.body
472 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
473 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
474 %conv = trunc i64 %i.02 to i32
475 %mul = mul i64 %i.02, -6
476 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
477 store i32 %conv, ptr %arrayidx, align 4
478 %sub1 = sub i64 -60, %i.02
479 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %sub1
480 %0 = load i32, ptr %arrayidx2, align 4
481 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
482 store i32 %0, ptr %B.addr.01, align 4
483 %inc = add i64 %i.02, 1
484 %exitcond = icmp ne i64 %inc, 18
485 br i1 %exitcond, label %for.body, label %for.end
487 for.end: ; preds = %for.body
492 ;; for (long unsigned i = 0; i <= 18; i++) {
494 ;; *B++ = A[-i - 60];
496 define void @exact13(ptr %A, ptr %B) nounwind uwtable ssp {
500 ; CHECK-LABEL: exact13
501 ; CHECK: da analyze - none!
502 ; CHECK: da analyze - flow [*|<]!
503 ; CHECK: da analyze - confused!
504 ; CHECK: da analyze - none!
505 ; CHECK: da analyze - confused!
506 ; CHECK: da analyze - none!
508 for.body: ; preds = %entry, %for.body
509 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
510 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
511 %conv = trunc i64 %i.02 to i32
512 %mul = mul i64 %i.02, -6
513 %arrayidx = getelementptr inbounds i32, ptr %A, i64 %mul
514 store i32 %conv, ptr %arrayidx, align 4
515 %sub1 = sub i64 -60, %i.02
516 %arrayidx2 = getelementptr inbounds i32, ptr %A, i64 %sub1
517 %0 = load i32, ptr %arrayidx2, align 4
518 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
519 store i32 %0, ptr %B.addr.01, align 4
520 %inc = add i64 %i.02, 1
521 %exitcond = icmp ne i64 %inc, 19
522 br i1 %exitcond, label %for.body, label %for.end
524 for.end: ; preds = %for.body