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 int i = 0; i < 50; i++) {
10 ;; *B++ = A[i + 10][i + 9];
12 define void @couple0(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
16 ; CHECK-LABEL: couple0
17 ; CHECK: da analyze - none!
18 ; CHECK: da analyze - none!
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 %arrayidx1 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
29 store i32 %conv, ptr %arrayidx1, align 4
30 %add = add nsw i64 %i.02, 9
31 %add2 = add nsw i64 %i.02, 10
32 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %add2, i64 %add
33 %0 = load i32, ptr %arrayidx4, align 4
34 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
35 store i32 %0, ptr %B.addr.01, align 4
36 %inc = add nsw i64 %i.02, 1
37 %exitcond = icmp ne i64 %inc, 50
38 br i1 %exitcond, label %for.body, label %for.end
40 for.end: ; preds = %for.body
45 ;; for (long int i = 0; i < 50; i++) {
47 ;; *B++ = A[i + 9][i + 9];
49 define void @couple1(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
53 ; CHECK-LABEL: couple1
54 ; CHECK: da analyze - none!
55 ; CHECK: da analyze - consistent flow [-9]!
56 ; CHECK: da analyze - confused!
57 ; CHECK: da analyze - none!
58 ; CHECK: da analyze - confused!
59 ; CHECK: da analyze - none!
61 for.body: ; preds = %entry, %for.body
62 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
63 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
64 %conv = trunc i64 %i.02 to i32
65 %arrayidx1 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
66 store i32 %conv, ptr %arrayidx1, align 4
67 %add = add nsw i64 %i.02, 9
68 %add2 = add nsw i64 %i.02, 9
69 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %add2, i64 %add
70 %0 = load i32, ptr %arrayidx4, align 4
71 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
72 store i32 %0, ptr %B.addr.01, align 4
73 %inc = add nsw i64 %i.02, 1
74 %exitcond = icmp ne i64 %inc, 50
75 br i1 %exitcond, label %for.body, label %for.end
77 for.end: ; preds = %for.body
82 ;; for (long int i = 0; i < 50; i++) {
83 ;; A[3*i - 6][3*i - 6] = i;
86 define void @couple2(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
90 ; CHECK-LABEL: couple2
91 ; CHECK: da analyze - none!
92 ; CHECK: da analyze - flow [*|<]!
93 ; CHECK: da analyze - confused!
94 ; CHECK: da analyze - none!
95 ; CHECK: da analyze - confused!
96 ; CHECK: da analyze - none!
98 for.body: ; preds = %entry, %for.body
99 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
100 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
101 %conv = trunc i64 %i.02 to i32
102 %mul = mul nsw i64 %i.02, 3
103 %sub = add nsw i64 %mul, -6
104 %mul1 = mul nsw i64 %i.02, 3
105 %sub2 = add nsw i64 %mul1, -6
106 %arrayidx3 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub2, i64 %sub
107 store i32 %conv, ptr %arrayidx3, align 4
108 %arrayidx5 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
109 %0 = load i32, ptr %arrayidx5, align 4
110 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
111 store i32 %0, ptr %B.addr.01, align 4
112 %inc = add nsw i64 %i.02, 1
113 %exitcond = icmp ne i64 %inc, 50
114 br i1 %exitcond, label %for.body, label %for.end
116 for.end: ; preds = %for.body
121 ;; for (long int i = 0; i < 50; i++) {
122 ;; A[3*i - 6][3*i - 5] = i;
125 define void @couple3(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
129 ; CHECK-LABEL: couple3
130 ; CHECK: da analyze - none!
131 ; CHECK: da analyze - none!
132 ; CHECK: da analyze - confused!
133 ; CHECK: da analyze - none!
134 ; CHECK: da analyze - confused!
135 ; CHECK: da analyze - none!
137 for.body: ; preds = %entry, %for.body
138 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
139 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
140 %conv = trunc i64 %i.02 to i32
141 %mul = mul nsw i64 %i.02, 3
142 %sub = add nsw i64 %mul, -5
143 %mul1 = mul nsw i64 %i.02, 3
144 %sub2 = add nsw i64 %mul1, -6
145 %arrayidx3 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub2, i64 %sub
146 store i32 %conv, ptr %arrayidx3, align 4
147 %arrayidx5 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
148 %0 = load i32, ptr %arrayidx5, align 4
149 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
150 store i32 %0, ptr %B.addr.01, align 4
151 %inc = add nsw i64 %i.02, 1
152 %exitcond = icmp ne i64 %inc, 50
153 br i1 %exitcond, label %for.body, label %for.end
155 for.end: ; preds = %for.body
160 ;; for (long int i = 0; i < 50; i++) {
161 ;; A[3*i - 6][3*i - n] = i;
164 define void @couple4(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
168 ; CHECK-LABEL: couple4
169 ; CHECK: da analyze - none!
170 ; CHECK: da analyze - flow [*|<]!
171 ; CHECK: da analyze - confused!
172 ; CHECK: da analyze - none!
173 ; CHECK: da analyze - confused!
174 ; CHECK: da analyze - none!
176 for.body: ; preds = %entry, %for.body
177 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
178 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
179 %conv = trunc i64 %i.02 to i32
180 %mul = mul nsw i64 %i.02, 3
181 %conv1 = sext i32 %n to i64
182 %sub = sub nsw i64 %mul, %conv1
183 %mul2 = mul nsw i64 %i.02, 3
184 %sub3 = add nsw i64 %mul2, -6
185 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub3, i64 %sub
186 store i32 %conv, ptr %arrayidx4, align 4
187 %arrayidx6 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
188 %0 = load i32, ptr %arrayidx6, align 4
189 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
190 store i32 %0, ptr %B.addr.01, align 4
191 %inc = add nsw i64 %i.02, 1
192 %exitcond = icmp ne i64 %inc, 50
193 br i1 %exitcond, label %for.body, label %for.end
195 for.end: ; preds = %for.body
200 ;; for (long int i = 0; i < 50; i++) {
201 ;; A[3*i - n + 1][3*i - n] = i;
204 define void @couple5(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
208 ; CHECK-LABEL: couple5
209 ; CHECK: da analyze - none!
210 ; CHECK: da analyze - none!
211 ; CHECK: da analyze - confused!
212 ; CHECK: da analyze - none!
213 ; CHECK: da analyze - confused!
214 ; CHECK: da analyze - none!
216 for.body: ; preds = %entry, %for.body
217 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
218 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
219 %conv = trunc i64 %i.02 to i32
220 %mul = mul nsw i64 %i.02, 3
221 %conv1 = sext i32 %n to i64
222 %sub = sub nsw i64 %mul, %conv1
223 %mul2 = mul nsw i64 %i.02, 3
224 %conv3 = sext i32 %n to i64
225 %sub4 = sub nsw i64 %mul2, %conv3
226 %add = add nsw i64 %sub4, 1
227 %arrayidx5 = getelementptr inbounds [100 x i32], ptr %A, i64 %add, i64 %sub
228 store i32 %conv, ptr %arrayidx5, align 4
229 %arrayidx7 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
230 %0 = load i32, ptr %arrayidx7, align 4
231 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
232 store i32 %0, ptr %B.addr.01, align 4
233 %inc = add nsw i64 %i.02, 1
234 %exitcond = icmp ne i64 %inc, 50
235 br i1 %exitcond, label %for.body, label %for.end
237 for.end: ; preds = %for.body
242 ;; for (long int i = 0; i < 50; i++) {
243 ;; A[i][3*i - 6] = i;
246 define void @couple6(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
250 ; CHECK-LABEL: couple6
251 ; CHECK: da analyze - none!
252 ; CHECK: da analyze - flow [=|<]!
253 ; CHECK: da analyze - confused!
254 ; CHECK: da analyze - none!
255 ; CHECK: da analyze - confused!
256 ; CHECK: da analyze - none!
258 for.body: ; preds = %entry, %for.body
259 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
260 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
261 %conv = trunc i64 %i.02 to i32
262 %mul = mul nsw i64 %i.02, 3
263 %sub = add nsw i64 %mul, -6
264 %arrayidx1 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %sub
265 store i32 %conv, ptr %arrayidx1, align 4
266 %arrayidx3 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
267 %0 = load i32, ptr %arrayidx3, align 4
268 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
269 store i32 %0, ptr %B.addr.01, align 4
270 %inc = add nsw i64 %i.02, 1
271 %exitcond = icmp ne i64 %inc, 50
272 br i1 %exitcond, label %for.body, label %for.end
274 for.end: ; preds = %for.body
279 ;; for (long int i = 0; i < 50; i++) {
280 ;; A[i][3*i - 5] = i;
283 define void @couple7(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
287 ; CHECK-LABEL: couple7
288 ; CHECK: da analyze - none!
289 ; CHECK: da analyze - none!
290 ; CHECK: da analyze - confused!
291 ; CHECK: da analyze - none!
292 ; CHECK: da analyze - confused!
293 ; CHECK: da analyze - none!
295 for.body: ; preds = %entry, %for.body
296 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
297 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
298 %conv = trunc i64 %i.02 to i32
299 %mul = mul nsw i64 %i.02, 3
300 %sub = add nsw i64 %mul, -5
301 %arrayidx1 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %sub
302 store i32 %conv, ptr %arrayidx1, align 4
303 %arrayidx3 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
304 %0 = load i32, ptr %arrayidx3, align 4
305 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
306 store i32 %0, ptr %B.addr.01, align 4
307 %inc = add nsw i64 %i.02, 1
308 %exitcond = icmp ne i64 %inc, 50
309 br i1 %exitcond, label %for.body, label %for.end
311 for.end: ; preds = %for.body
316 ;; for (long int i = 0; i <= 15; i++) {
317 ;; A[3*i - 18][3 - i] = i;
320 define void @couple8(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
324 ; CHECK-LABEL: couple8
325 ; CHECK: da analyze - none!
326 ; CHECK: da analyze - none!
327 ; CHECK: da analyze - confused!
328 ; CHECK: da analyze - none!
329 ; CHECK: da analyze - confused!
330 ; CHECK: da analyze - none!
332 for.body: ; preds = %entry, %for.body
333 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
334 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
335 %conv = trunc i64 %i.02 to i32
336 %sub = sub nsw i64 3, %i.02
337 %mul = mul nsw i64 %i.02, 3
338 %sub1 = add nsw i64 %mul, -18
339 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub1, i64 %sub
340 store i32 %conv, ptr %arrayidx2, align 4
341 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
342 %0 = load i32, ptr %arrayidx4, align 4
343 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
344 store i32 %0, ptr %B.addr.01, align 4
345 %inc = add nsw i64 %i.02, 1
346 %exitcond = icmp ne i64 %inc, 16
347 br i1 %exitcond, label %for.body, label %for.end
349 for.end: ; preds = %for.body
354 ;; for (long int i = 0; i <= 15; i++) {
355 ;; A[3*i - 18][2 - i] = i;
358 define void @couple9(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
362 ; CHECK-LABEL: couple9
363 ; CHECK: da analyze - none!
364 ; CHECK: da analyze - none!
365 ; CHECK: da analyze - confused!
366 ; CHECK: da analyze - none!
367 ; CHECK: da analyze - confused!
368 ; CHECK: da analyze - none!
370 for.body: ; preds = %entry, %for.body
371 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
372 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
373 %conv = trunc i64 %i.02 to i32
374 %sub = sub nsw i64 2, %i.02
375 %mul = mul nsw i64 %i.02, 3
376 %sub1 = add nsw i64 %mul, -18
377 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub1, i64 %sub
378 store i32 %conv, ptr %arrayidx2, align 4
379 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
380 %0 = load i32, ptr %arrayidx4, align 4
381 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
382 store i32 %0, ptr %B.addr.01, align 4
383 %inc = add nsw i64 %i.02, 1
384 %exitcond = icmp ne i64 %inc, 16
385 br i1 %exitcond, label %for.body, label %for.end
387 for.end: ; preds = %for.body
392 ;; for (long int i = 0; i <= 15; i++) {
393 ;; A[3*i - 18][6 - i] = i;
396 define void @couple10(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
400 ; CHECK-LABEL: couple10
401 ; CHECK: da analyze - none!
402 ; CHECK: da analyze - flow [>]!
403 ; CHECK: da analyze - confused!
404 ; CHECK: da analyze - none!
405 ; CHECK: da analyze - confused!
406 ; CHECK: da analyze - none!
408 for.body: ; preds = %entry, %for.body
409 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
410 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
411 %conv = trunc i64 %i.02 to i32
412 %sub = sub nsw i64 6, %i.02
413 %mul = mul nsw i64 %i.02, 3
414 %sub1 = add nsw i64 %mul, -18
415 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub1, i64 %sub
416 store i32 %conv, ptr %arrayidx2, align 4
417 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
418 %0 = load i32, ptr %arrayidx4, align 4
419 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
420 store i32 %0, ptr %B.addr.01, align 4
421 %inc = add nsw i64 %i.02, 1
422 %exitcond = icmp ne i64 %inc, 16
423 br i1 %exitcond, label %for.body, label %for.end
425 for.end: ; preds = %for.body
430 ;; for (long int i = 0; i <= 15; i++) {
431 ;; A[3*i - 18][18 - i] = i;
434 define void @couple11(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
438 ; CHECK-LABEL: couple11
439 ; CHECK: da analyze - none!
440 ; CHECK: da analyze - flow [=|<] splitable!
441 ; CHECK: da analyze - split level = 1, iteration = 9!
442 ; CHECK: da analyze - confused!
443 ; CHECK: da analyze - none!
444 ; CHECK: da analyze - confused!
445 ; CHECK: da analyze - none!
447 for.body: ; preds = %entry, %for.body
448 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
449 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
450 %conv = trunc i64 %i.02 to i32
451 %sub = sub nsw i64 18, %i.02
452 %mul = mul nsw i64 %i.02, 3
453 %sub1 = add nsw i64 %mul, -18
454 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub1, i64 %sub
455 store i32 %conv, ptr %arrayidx2, align 4
456 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
457 %0 = load i32, ptr %arrayidx4, align 4
458 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
459 store i32 %0, ptr %B.addr.01, align 4
460 %inc = add nsw i64 %i.02, 1
461 %exitcond = icmp ne i64 %inc, 16
462 br i1 %exitcond, label %for.body, label %for.end
464 for.end: ; preds = %for.body
469 ;; for (long int i = 0; i <= 12; i++) {
470 ;; A[3*i - 18][22 - i] = i;
473 define void @couple12(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
477 ; CHECK-LABEL: couple12
478 ; CHECK: da analyze - none!
479 ; CHECK: da analyze - flow [<] splitable!
480 ; CHECK: da analyze - split level = 1, iteration = 11!
481 ; CHECK: da analyze - confused!
482 ; CHECK: da analyze - none!
483 ; CHECK: da analyze - confused!
484 ; CHECK: da analyze - none!
486 for.body: ; preds = %entry, %for.body
487 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
488 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
489 %conv = trunc i64 %i.02 to i32
490 %sub = sub nsw i64 22, %i.02
491 %mul = mul nsw i64 %i.02, 3
492 %sub1 = add nsw i64 %mul, -18
493 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub1, i64 %sub
494 store i32 %conv, ptr %arrayidx2, align 4
495 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
496 %0 = load i32, ptr %arrayidx4, align 4
497 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
498 store i32 %0, ptr %B.addr.01, align 4
499 %inc = add nsw i64 %i.02, 1
500 %exitcond = icmp ne i64 %inc, 13
501 br i1 %exitcond, label %for.body, label %for.end
503 for.end: ; preds = %for.body
508 ;; for (long int i = 0; i < 12; i++) {
509 ;; A[3*i - 18][22 - i] = i;
512 define void @couple13(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
516 ; CHECK-LABEL: couple13
517 ; CHECK: da analyze - none!
518 ; CHECK: da analyze - none!
519 ; CHECK: da analyze - confused!
520 ; CHECK: da analyze - none!
521 ; CHECK: da analyze - confused!
522 ; CHECK: da analyze - none!
524 for.body: ; preds = %entry, %for.body
525 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
526 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
527 %conv = trunc i64 %i.02 to i32
528 %sub = sub nsw i64 22, %i.02
529 %mul = mul nsw i64 %i.02, 3
530 %sub1 = add nsw i64 %mul, -18
531 %arrayidx2 = getelementptr inbounds [100 x i32], ptr %A, i64 %sub1, i64 %sub
532 store i32 %conv, ptr %arrayidx2, align 4
533 %arrayidx4 = getelementptr inbounds [100 x i32], ptr %A, i64 %i.02, i64 %i.02
534 %0 = load i32, ptr %arrayidx4, align 4
535 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
536 store i32 %0, ptr %B.addr.01, align 4
537 %inc = add nsw i64 %i.02, 1
538 %exitcond = icmp ne i64 %inc, 12
539 br i1 %exitcond, label %for.body, label %for.end
541 for.end: ; preds = %for.body
545 ;; for (long int i = 0; i < 100; i++) {
546 ;; A[3*i - 18][18 - i][i] = i;
547 ;; *B++ = A[i][i][i];
549 define void @couple14(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
553 ; CHECK-LABEL: couple14
554 ; CHECK: da analyze - none!
555 ; CHECK: da analyze - flow [=|<]!
556 ; CHECK: da analyze - confused!
557 ; CHECK: da analyze - none!
558 ; CHECK: da analyze - confused!
559 ; CHECK: da analyze - none!
561 for.body: ; preds = %entry, %for.body
562 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
563 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
564 %conv = trunc i64 %i.02 to i32
565 %sub = sub nsw i64 18, %i.02
566 %mul = mul nsw i64 %i.02, 3
567 %sub1 = add nsw i64 %mul, -18
568 %arrayidx3 = getelementptr inbounds [100 x [100 x i32]], ptr %A, i64 %sub1, i64 %sub, i64 %i.02
569 store i32 %conv, ptr %arrayidx3, align 4
570 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], ptr %A, i64 %i.02, i64 %i.02, i64 %i.02
571 %0 = load i32, ptr %arrayidx6, align 4
572 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
573 store i32 %0, ptr %B.addr.01, align 4
574 %inc = add nsw i64 %i.02, 1
575 %exitcond = icmp ne i64 %inc, 100
576 br i1 %exitcond, label %for.body, label %for.end
578 for.end: ; preds = %for.body
583 ;; for (long int i = 0; i < 100; i++) {
584 ;; A[3*i - 18][22 - i][i] = i;
585 ;; *B++ = A[i][i][i];
587 define void @couple15(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
591 ; CHECK-LABEL: couple15
592 ; CHECK: da analyze - none!
593 ; CHECK: da analyze - none!
594 ; CHECK: da analyze - confused!
595 ; CHECK: da analyze - none!
596 ; CHECK: da analyze - confused!
597 ; CHECK: da analyze - none!
599 for.body: ; preds = %entry, %for.body
600 %i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
601 %B.addr.01 = phi ptr [ %B, %entry ], [ %incdec.ptr, %for.body ]
602 %conv = trunc i64 %i.02 to i32
603 %sub = sub nsw i64 22, %i.02
604 %mul = mul nsw i64 %i.02, 3
605 %sub1 = add nsw i64 %mul, -18
606 %arrayidx3 = getelementptr inbounds [100 x [100 x i32]], ptr %A, i64 %sub1, i64 %sub, i64 %i.02
607 store i32 %conv, ptr %arrayidx3, align 4
608 %arrayidx6 = getelementptr inbounds [100 x [100 x i32]], ptr %A, i64 %i.02, i64 %i.02, i64 %i.02
609 %0 = load i32, ptr %arrayidx6, align 4
610 %incdec.ptr = getelementptr inbounds i32, ptr %B.addr.01, i64 1
611 store i32 %0, ptr %B.addr.01, align 4
612 %inc = add nsw i64 %i.02, 1
613 %exitcond = icmp ne i64 %inc, 100
614 br i1 %exitcond, label %for.body, label %for.end
616 for.end: ; preds = %for.body
620 ;; for(int i = 0; i < N; i+=1) {
622 ;; for(int j = 0; j < M; j+=1)
623 ;; A[M*N + M*i + j] = 2;
625 define void @couple_weakzerosiv(ptr noalias nocapture %A, i64 %N, i64 %M) {
627 %cmp29 = icmp sgt i64 %N, 0
628 br i1 %cmp29, label %for.body.lr.ph, label %for.cond.cleanup
630 ; CHECK-LABEL: couple_weakzerosiv
631 ; CHECK: da analyze - none!
632 ; CHECK: da analyze - output [p>]!
633 ; CHECK: da analyze - none!
635 for.body.lr.ph: ; preds = %entry
636 %mul = mul nsw i64 %M, %N
637 br label %for.body.us
639 for.body.us: ; preds = %for.body.lr.ph, %for.cond.cleanup4.loopexit.us
640 %i.030.us = phi i64 [ %add12.us, %for.cond.cleanup4.loopexit.us ], [ 0, %for.body.lr.ph ]
641 %mul1.us = mul nsw i64 %i.030.us, %mul
642 %arrayidx.us = getelementptr inbounds i32, ptr %A, i64 %mul1.us
643 store i32 1, ptr %arrayidx.us, align 4
644 %mul6.us = mul nsw i64 %i.030.us, %M
645 %add.us = add i64 %mul6.us, %mul
646 br label %for.body5.us
648 for.body5.us: ; preds = %for.body5.us, %for.body.us
649 %j.028.us = phi i64 [ 0, %for.body.us ], [ %add10.us, %for.body5.us ]
650 %add8.us = add i64 %add.us, %j.028.us
651 %arrayidx9.us = getelementptr inbounds i32, ptr %A, i64 %add8.us
652 store i32 2, ptr %arrayidx9.us, align 4
653 %add10.us = add nuw nsw i64 %j.028.us, 1
654 %exitcond.us = icmp eq i64 %add10.us, %M
655 br i1 %exitcond.us, label %for.cond.cleanup4.loopexit.us, label %for.body5.us
657 for.cond.cleanup4.loopexit.us: ; preds = %for.body5.us
658 %add12.us = add nuw nsw i64 %i.030.us, 1
659 %exitcond31.us = icmp eq i64 %add12.us, %N
660 br i1 %exitcond31.us, label %for.cond.cleanup, label %for.body.us
662 for.cond.cleanup: ; preds = %for.cond.cleanup4.loopexit.us, %entry