1 ; RUN: opt < %s -disable-output -da-delinearize=false "-passes=print<da>" \
2 ; RUN: -aa-pipeline=basic-aa 2>&1 | FileCheck %s
3 ; RUN: opt < %s -disable-output -da-delinearize=false -passes='print<da><normalized-results>' \
4 ; RUN: -aa-pipeline=basic-aa 2>&1 | FileCheck %s -check-prefix=NORMALIZE
5 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
6 ; RUN: | FileCheck %s -check-prefix=DELIN
8 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"
9 target triple = "x86_64-apple-macosx10.6.0"
12 ;; for (long int i = 1; i <= 10; i++)
13 ;; for (long int j = 1; j <= 10; j++) {
15 ;; *B++ = A[10*i + j - 1];
17 define void @banerjee0(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
19 br label %for.cond1.preheader
20 ; CHECK: 'Dependence Analysis' for function 'banerjee0':
21 ; CHECK: da analyze - none!
22 ; CHECK: da analyze - flow [<= <>]!
23 ; CHECK: da analyze - confused!
24 ; CHECK: da analyze - none!
25 ; CHECK: da analyze - confused!
26 ; CHECK: da analyze - none!
28 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee0':
29 ; NORMALIZE: da analyze - none!
30 ; NORMALIZE: da analyze - flow [<= <>]!
31 ; NORMALIZE: da analyze - confused!
32 ; NORMALIZE: da analyze - none!
33 ; NORMALIZE: da analyze - confused!
34 ; NORMALIZE: da analyze - none!
36 ; DELIN: 'Dependence Analysis' for function 'banerjee0':
37 ; DELIN: da analyze - none!
38 ; DELIN: da analyze - flow [<= <>]!
39 ; DELIN: da analyze - confused!
40 ; DELIN: da analyze - none!
41 ; DELIN: da analyze - confused!
42 ; DELIN: da analyze - none!
44 for.cond1.preheader: ; preds = %entry, %for.inc7
45 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
46 %i.03 = phi i64 [ 1, %entry ], [ %inc8, %for.inc7 ]
49 for.body3: ; preds = %for.cond1.preheader, %for.body3
50 %j.02 = phi i64 [ 1, %for.cond1.preheader ], [ %inc, %for.body3 ]
51 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
52 %mul = mul nsw i64 %i.03, 10
53 %add = add nsw i64 %mul, %j.02
54 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
55 store i64 0, ptr %arrayidx, align 8
56 %mul4 = mul nsw i64 %i.03, 10
57 %add5 = add nsw i64 %mul4, %j.02
58 %sub = add nsw i64 %add5, -1
59 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %sub
60 %0 = load i64, ptr %arrayidx6, align 8
61 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
62 store i64 %0, ptr %B.addr.11, align 8
63 %inc = add nsw i64 %j.02, 1
64 %exitcond = icmp ne i64 %inc, 11
65 br i1 %exitcond, label %for.body3, label %for.inc7
67 for.inc7: ; preds = %for.body3
68 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
69 %inc8 = add nsw i64 %i.03, 1
70 %exitcond5 = icmp ne i64 %inc8, 11
71 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
73 for.end9: ; preds = %for.inc7
78 ;; for (long int i = 1; i <= n; i++)
79 ;; for (long int j = 1; j <= m; j++) {
81 ;; *B++ = A[10*i + j - 1];
83 define void @banerjee1(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
85 %cmp4 = icmp sgt i64 %n, 0
86 br i1 %cmp4, label %for.cond1.preheader.preheader, label %for.end9
88 ; CHECK: 'Dependence Analysis' for function 'banerjee1':
89 ; CHECK: da analyze - output [* *]!
90 ; CHECK: da analyze - flow [* <>]!
91 ; CHECK: da analyze - confused!
92 ; CHECK: da analyze - input [* *]!
93 ; CHECK: da analyze - confused!
94 ; CHECK: da analyze - output [* *]!
96 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee1':
97 ; NORMALIZE: da analyze - output [* *]!
98 ; NORMALIZE: da analyze - flow [* <>]!
99 ; NORMALIZE: da analyze - confused!
100 ; NORMALIZE: da analyze - input [* *]!
101 ; NORMALIZE: da analyze - confused!
102 ; NORMALIZE: da analyze - output [* *]!
104 ; DELIN: 'Dependence Analysis' for function 'banerjee1':
105 ; DELIN: da analyze - output [* *]!
106 ; DELIN: da analyze - flow [* <>]!
107 ; DELIN: da analyze - confused!
108 ; DELIN: da analyze - input [* *]!
109 ; DELIN: da analyze - confused!
110 ; DELIN: da analyze - output [* *]!
112 for.cond1.preheader.preheader: ; preds = %entry
114 br label %for.cond1.preheader
116 for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc7
117 %B.addr.06 = phi ptr [ %B.addr.1.lcssa, %for.inc7 ], [ %B, %for.cond1.preheader.preheader ]
118 %i.05 = phi i64 [ %inc8, %for.inc7 ], [ 1, %for.cond1.preheader.preheader ]
120 %cmp21 = icmp sgt i64 %m, 0
121 br i1 %cmp21, label %for.body3.preheader, label %for.inc7
123 for.body3.preheader: ; preds = %for.cond1.preheader
126 for.body3: ; preds = %for.body3.preheader, %for.body3
127 %j.03 = phi i64 [ %inc, %for.body3 ], [ 1, %for.body3.preheader ]
128 %B.addr.12 = phi ptr [ %incdec.ptr, %for.body3 ], [ %B.addr.06, %for.body3.preheader ]
129 %mul = mul nsw i64 %i.05, 10
130 %add = add nsw i64 %mul, %j.03
131 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
132 store i64 0, ptr %arrayidx, align 8
133 %mul4 = mul nsw i64 %i.05, 10
134 %add5 = add nsw i64 %mul4, %j.03
135 %sub = add nsw i64 %add5, -1
136 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %sub
137 %2 = load i64, ptr %arrayidx6, align 8
138 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.12, i64 1
139 store i64 %2, ptr %B.addr.12, align 8
140 %inc = add nsw i64 %j.03, 1
141 %exitcond = icmp eq i64 %inc, %1
142 br i1 %exitcond, label %for.inc7.loopexit, label %for.body3
144 for.inc7.loopexit: ; preds = %for.body3
145 %scevgep = getelementptr i64, ptr %B.addr.06, i64 %m
148 for.inc7: ; preds = %for.inc7.loopexit, %for.cond1.preheader
149 %B.addr.1.lcssa = phi ptr [ %B.addr.06, %for.cond1.preheader ], [ %scevgep, %for.inc7.loopexit ]
150 %inc8 = add nsw i64 %i.05, 1
151 %exitcond7 = icmp eq i64 %inc8, %0
152 br i1 %exitcond7, label %for.end9.loopexit, label %for.cond1.preheader
154 for.end9.loopexit: ; preds = %for.inc7
157 for.end9: ; preds = %for.end9.loopexit, %entry
162 ;; for (long int i = 0; i < 10; i++)
163 ;; for (long int j = 0; j < 10; j++) {
165 ;; *B++ = A[10*i + j + 100];
167 define void @banerjee2(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
169 br label %for.cond1.preheader
171 ; CHECK: 'Dependence Analysis' for function 'banerjee2':
172 ; CHECK: da analyze - none!
173 ; CHECK: da analyze - none!
174 ; CHECK: da analyze - confused!
175 ; CHECK: da analyze - none!
176 ; CHECK: da analyze - confused!
177 ; CHECK: da analyze - none!
179 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee2':
180 ; NORMALIZE: da analyze - none!
181 ; NORMALIZE: da analyze - none!
182 ; NORMALIZE: da analyze - confused!
183 ; NORMALIZE: da analyze - none!
184 ; NORMALIZE: da analyze - confused!
185 ; NORMALIZE: da analyze - none!
187 ; DELIN: 'Dependence Analysis' for function 'banerjee2':
188 ; DELIN: da analyze - none!
189 ; DELIN: da analyze - none!
190 ; DELIN: da analyze - confused!
191 ; DELIN: da analyze - none!
192 ; DELIN: da analyze - confused!
193 ; DELIN: da analyze - none!
195 for.cond1.preheader: ; preds = %entry, %for.inc8
196 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
197 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
200 for.body3: ; preds = %for.cond1.preheader, %for.body3
201 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
202 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
203 %mul = mul nsw i64 %i.03, 10
204 %add = add nsw i64 %mul, %j.02
205 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
206 store i64 0, ptr %arrayidx, align 8
207 %mul4 = mul nsw i64 %i.03, 10
208 %add5 = add nsw i64 %mul4, %j.02
209 %add6 = add nsw i64 %add5, 100
210 %arrayidx7 = getelementptr inbounds i64, ptr %A, i64 %add6
211 %0 = load i64, ptr %arrayidx7, align 8
212 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
213 store i64 %0, ptr %B.addr.11, align 8
214 %inc = add nsw i64 %j.02, 1
215 %exitcond = icmp ne i64 %inc, 10
216 br i1 %exitcond, label %for.body3, label %for.inc8
218 for.inc8: ; preds = %for.body3
219 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
220 %inc9 = add nsw i64 %i.03, 1
221 %exitcond5 = icmp ne i64 %inc9, 10
222 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
224 for.end10: ; preds = %for.inc8
229 ;; for (long int i = 0; i < 10; i++)
230 ;; for (long int j = 0; j < 10; j++) {
232 ;; *B++ = A[10*i + j + 99];
234 define void @banerjee3(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
236 br label %for.cond1.preheader
238 ; CHECK: 'Dependence Analysis' for function 'banerjee3':
239 ; CHECK: da analyze - none!
240 ; CHECK: da analyze - flow [> >]!
241 ; CHECK: da analyze - confused!
242 ; CHECK: da analyze - none!
243 ; CHECK: da analyze - confused!
244 ; CHECK: da analyze - none!
246 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee3':
247 ; NORMALIZE: da analyze - none!
248 ; NORMALIZE: da analyze - normalized - anti [< <]!
249 ; NORMALIZE: da analyze - confused!
250 ; NORMALIZE: da analyze - none!
251 ; NORMALIZE: da analyze - confused!
252 ; NORMALIZE: da analyze - none!
254 ; DELIN: 'Dependence Analysis' for function 'banerjee3':
255 ; DELIN: da analyze - none!
256 ; DELIN: da analyze - flow [> >]!
257 ; DELIN: da analyze - confused!
258 ; DELIN: da analyze - none!
259 ; DELIN: da analyze - confused!
260 ; DELIN: da analyze - none!
262 for.cond1.preheader: ; preds = %entry, %for.inc8
263 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
264 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
267 for.body3: ; preds = %for.cond1.preheader, %for.body3
268 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
269 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
270 %mul = mul nsw i64 %i.03, 10
271 %add = add nsw i64 %mul, %j.02
272 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
273 store i64 0, ptr %arrayidx, align 8
274 %mul4 = mul nsw i64 %i.03, 10
275 %add5 = add nsw i64 %mul4, %j.02
276 %add6 = add nsw i64 %add5, 99
277 %arrayidx7 = getelementptr inbounds i64, ptr %A, i64 %add6
278 %0 = load i64, ptr %arrayidx7, align 8
279 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
280 store i64 %0, ptr %B.addr.11, align 8
281 %inc = add nsw i64 %j.02, 1
282 %exitcond = icmp ne i64 %inc, 10
283 br i1 %exitcond, label %for.body3, label %for.inc8
285 for.inc8: ; preds = %for.body3
286 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
287 %inc9 = add nsw i64 %i.03, 1
288 %exitcond5 = icmp ne i64 %inc9, 10
289 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
291 for.end10: ; preds = %for.inc8
296 ;; for (long int i = 0; i < 10; i++)
297 ;; for (long int j = 0; j < 10; j++) {
299 ;; *B++ = A[10*i + j - 100];
301 define void @banerjee4(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
303 br label %for.cond1.preheader
305 ; CHECK: 'Dependence Analysis' for function 'banerjee4':
306 ; CHECK: da analyze - none!
307 ; CHECK: da analyze - none!
308 ; CHECK: da analyze - confused!
309 ; CHECK: da analyze - none!
310 ; CHECK: da analyze - confused!
311 ; CHECK: da analyze - none!
313 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee4':
314 ; NORMALIZE: da analyze - none!
315 ; NORMALIZE: da analyze - none!
316 ; NORMALIZE: da analyze - confused!
317 ; NORMALIZE: da analyze - none!
318 ; NORMALIZE: da analyze - confused!
319 ; NORMALIZE: da analyze - none!
321 ; DELIN: 'Dependence Analysis' for function 'banerjee4':
322 ; DELIN: da analyze - none!
323 ; DELIN: da analyze - none!
324 ; DELIN: da analyze - confused!
325 ; DELIN: da analyze - none!
326 ; DELIN: da analyze - confused!
327 ; DELIN: da analyze - none!
329 for.cond1.preheader: ; preds = %entry, %for.inc7
330 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
331 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
334 for.body3: ; preds = %for.cond1.preheader, %for.body3
335 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
336 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
337 %mul = mul nsw i64 %i.03, 10
338 %add = add nsw i64 %mul, %j.02
339 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
340 store i64 0, ptr %arrayidx, align 8
341 %mul4 = mul nsw i64 %i.03, 10
342 %add5 = add nsw i64 %mul4, %j.02
343 %sub = add nsw i64 %add5, -100
344 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %sub
345 %0 = load i64, ptr %arrayidx6, align 8
346 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
347 store i64 %0, ptr %B.addr.11, align 8
348 %inc = add nsw i64 %j.02, 1
349 %exitcond = icmp ne i64 %inc, 10
350 br i1 %exitcond, label %for.body3, label %for.inc7
352 for.inc7: ; preds = %for.body3
353 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
354 %inc8 = add nsw i64 %i.03, 1
355 %exitcond5 = icmp ne i64 %inc8, 10
356 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
358 for.end9: ; preds = %for.inc7
363 ;; for (long int i = 0; i < 10; i++)
364 ;; for (long int j = 0; j < 10; j++) {
366 ;; *B++ = A[10*i + j - 99];
368 define void @banerjee5(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
370 br label %for.cond1.preheader
372 ; CHECK: 'Dependence Analysis' for function 'banerjee5':
373 ; CHECK: da analyze - none!
374 ; CHECK: da analyze - flow [< <]!
375 ; CHECK: da analyze - confused!
376 ; CHECK: da analyze - none!
377 ; CHECK: da analyze - confused!
378 ; CHECK: da analyze - none!
380 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee5':
381 ; NORMALIZE: da analyze - none!
382 ; NORMALIZE: da analyze - flow [< <]!
383 ; NORMALIZE: da analyze - confused!
384 ; NORMALIZE: da analyze - none!
385 ; NORMALIZE: da analyze - confused!
386 ; NORMALIZE: da analyze - none!
388 ; DELIN: 'Dependence Analysis' for function 'banerjee5':
389 ; DELIN: da analyze - none!
390 ; DELIN: da analyze - flow [< <]!
391 ; DELIN: da analyze - confused!
392 ; DELIN: da analyze - none!
393 ; DELIN: da analyze - confused!
394 ; DELIN: da analyze - none!
396 for.cond1.preheader: ; preds = %entry, %for.inc7
397 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
398 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
401 for.body3: ; preds = %for.cond1.preheader, %for.body3
402 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
403 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
404 %mul = mul nsw i64 %i.03, 10
405 %add = add nsw i64 %mul, %j.02
406 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
407 store i64 0, ptr %arrayidx, align 8
408 %mul4 = mul nsw i64 %i.03, 10
409 %add5 = add nsw i64 %mul4, %j.02
410 %sub = add nsw i64 %add5, -99
411 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %sub
412 %0 = load i64, ptr %arrayidx6, align 8
413 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
414 store i64 %0, ptr %B.addr.11, align 8
415 %inc = add nsw i64 %j.02, 1
416 %exitcond = icmp ne i64 %inc, 10
417 br i1 %exitcond, label %for.body3, label %for.inc7
419 for.inc7: ; preds = %for.body3
420 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
421 %inc8 = add nsw i64 %i.03, 1
422 %exitcond5 = icmp ne i64 %inc8, 10
423 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
425 for.end9: ; preds = %for.inc7
430 ;; for (long int i = 0; i < 10; i++)
431 ;; for (long int j = 0; j < 10; j++) {
433 ;; *B++ = A[10*i + j + 9];
435 define void @banerjee6(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
437 br label %for.cond1.preheader
439 ; CHECK: 'Dependence Analysis' for function 'banerjee6':
440 ; CHECK: da analyze - none!
441 ; CHECK: da analyze - flow [=> <>]!
442 ; CHECK: da analyze - confused!
443 ; CHECK: da analyze - none!
444 ; CHECK: da analyze - confused!
445 ; CHECK: da analyze - none!
447 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee6':
448 ; NORMALIZE: da analyze - none!
449 ; NORMALIZE: da analyze - normalized - anti [<= <>]!
450 ; NORMALIZE: da analyze - confused!
451 ; NORMALIZE: da analyze - none!
452 ; NORMALIZE: da analyze - confused!
453 ; NORMALIZE: da analyze - none!
455 ; DELIN: 'Dependence Analysis' for function 'banerjee6':
456 ; DELIN: da analyze - none!
457 ; DELIN: da analyze - flow [=> <>]!
458 ; DELIN: da analyze - confused!
459 ; DELIN: da analyze - none!
460 ; DELIN: da analyze - confused!
461 ; DELIN: da analyze - none!
463 for.cond1.preheader: ; preds = %entry, %for.inc8
464 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
465 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
468 for.body3: ; preds = %for.cond1.preheader, %for.body3
469 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
470 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
471 %mul = mul nsw i64 %i.03, 10
472 %add = add nsw i64 %mul, %j.02
473 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
474 store i64 0, ptr %arrayidx, align 8
475 %mul4 = mul nsw i64 %i.03, 10
476 %add5 = add nsw i64 %mul4, %j.02
477 %add6 = add nsw i64 %add5, 9
478 %arrayidx7 = getelementptr inbounds i64, ptr %A, i64 %add6
479 %0 = load i64, ptr %arrayidx7, align 8
480 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
481 store i64 %0, ptr %B.addr.11, align 8
482 %inc = add nsw i64 %j.02, 1
483 %exitcond = icmp ne i64 %inc, 10
484 br i1 %exitcond, label %for.body3, label %for.inc8
486 for.inc8: ; preds = %for.body3
487 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
488 %inc9 = add nsw i64 %i.03, 1
489 %exitcond5 = icmp ne i64 %inc9, 10
490 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
492 for.end10: ; preds = %for.inc8
497 ;; for (long int i = 0; i < 10; i++)
498 ;; for (long int j = 0; j < 10; j++) {
500 ;; *B++ = A[10*i + j + 10];
502 define void @banerjee7(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
504 br label %for.cond1.preheader
506 ; CHECK: 'Dependence Analysis' for function 'banerjee7':
507 ; CHECK: da analyze - none!
508 ; CHECK: da analyze - flow [> <=]!
509 ; CHECK: da analyze - confused!
510 ; CHECK: da analyze - none!
511 ; CHECK: da analyze - confused!
512 ; CHECK: da analyze - none!
514 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee7':
515 ; NORMALIZE: da analyze - none!
516 ; NORMALIZE: da analyze - normalized - anti [< =>]!
517 ; NORMALIZE: da analyze - confused!
518 ; NORMALIZE: da analyze - none!
519 ; NORMALIZE: da analyze - confused!
520 ; NORMALIZE: da analyze - none!
522 ; DELIN: 'Dependence Analysis' for function 'banerjee7':
523 ; DELIN: da analyze - none!
524 ; DELIN: da analyze - flow [> <=]!
525 ; DELIN: da analyze - confused!
526 ; DELIN: da analyze - none!
527 ; DELIN: da analyze - confused!
528 ; DELIN: da analyze - none!
530 for.cond1.preheader: ; preds = %entry, %for.inc8
531 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
532 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
535 for.body3: ; preds = %for.cond1.preheader, %for.body3
536 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
537 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
538 %mul = mul nsw i64 %i.03, 10
539 %add = add nsw i64 %mul, %j.02
540 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
541 store i64 0, ptr %arrayidx, align 8
542 %mul4 = mul nsw i64 %i.03, 10
543 %add5 = add nsw i64 %mul4, %j.02
544 %add6 = add nsw i64 %add5, 10
545 %arrayidx7 = getelementptr inbounds i64, ptr %A, i64 %add6
546 %0 = load i64, ptr %arrayidx7, align 8
547 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
548 store i64 %0, ptr %B.addr.11, align 8
549 %inc = add nsw i64 %j.02, 1
550 %exitcond = icmp ne i64 %inc, 10
551 br i1 %exitcond, label %for.body3, label %for.inc8
553 for.inc8: ; preds = %for.body3
554 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
555 %inc9 = add nsw i64 %i.03, 1
556 %exitcond5 = icmp ne i64 %inc9, 10
557 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
559 for.end10: ; preds = %for.inc8
564 ;; for (long int i = 0; i < 10; i++)
565 ;; for (long int j = 0; j < 10; j++) {
567 ;; *B++ = A[10*i + j + 11];
569 define void @banerjee8(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
571 br label %for.cond1.preheader
573 ; CHECK: 'Dependence Analysis' for function 'banerjee8':
574 ; CHECK: da analyze - none!
575 ; CHECK: da analyze - flow [> <>]!
576 ; CHECK: da analyze - confused!
577 ; CHECK: da analyze - none!
578 ; CHECK: da analyze - confused!
579 ; CHECK: da analyze - none!
581 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee8':
582 ; NORMALIZE: da analyze - none!
583 ; NORMALIZE: da analyze - normalized - anti [< <>]!
584 ; NORMALIZE: da analyze - confused!
585 ; NORMALIZE: da analyze - none!
586 ; NORMALIZE: da analyze - confused!
587 ; NORMALIZE: da analyze - none!
589 ; DELIN: 'Dependence Analysis' for function 'banerjee8':
590 ; DELIN: da analyze - none!
591 ; DELIN: da analyze - flow [> <>]!
592 ; DELIN: da analyze - confused!
593 ; DELIN: da analyze - none!
594 ; DELIN: da analyze - confused!
595 ; DELIN: da analyze - none!
597 for.cond1.preheader: ; preds = %entry, %for.inc8
598 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
599 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
602 for.body3: ; preds = %for.cond1.preheader, %for.body3
603 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
604 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
605 %mul = mul nsw i64 %i.03, 10
606 %add = add nsw i64 %mul, %j.02
607 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
608 store i64 0, ptr %arrayidx, align 8
609 %mul4 = mul nsw i64 %i.03, 10
610 %add5 = add nsw i64 %mul4, %j.02
611 %add6 = add nsw i64 %add5, 11
612 %arrayidx7 = getelementptr inbounds i64, ptr %A, i64 %add6
613 %0 = load i64, ptr %arrayidx7, align 8
614 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
615 store i64 %0, ptr %B.addr.11, align 8
616 %inc = add nsw i64 %j.02, 1
617 %exitcond = icmp ne i64 %inc, 10
618 br i1 %exitcond, label %for.body3, label %for.inc8
620 for.inc8: ; preds = %for.body3
621 %scevgep = getelementptr i64, ptr %B.addr.04, i64 10
622 %inc9 = add nsw i64 %i.03, 1
623 %exitcond5 = icmp ne i64 %inc9, 10
624 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
626 for.end10: ; preds = %for.inc8
631 ;; for (long int i = 0; i < 20; i++)
632 ;; for (long int j = 0; j < 20; j++) {
633 ;; A[30*i + 500*j] = 0;
634 ;; *B++ = A[i - 500*j + 11];
636 define void @banerjee9(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
638 br label %for.cond1.preheader
640 ; CHECK: 'Dependence Analysis' for function 'banerjee9':
641 ; CHECK: da analyze - output [* *]!
642 ; CHECK: da analyze - flow [<= =|<]!
643 ; CHECK: da analyze - confused!
644 ; CHECK: da analyze - none!
645 ; CHECK: da analyze - confused!
646 ; CHECK: da analyze - none!
648 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee9':
649 ; NORMALIZE: da analyze - output [* *]!
650 ; NORMALIZE: da analyze - flow [<= =|<]!
651 ; NORMALIZE: da analyze - confused!
652 ; NORMALIZE: da analyze - none!
653 ; NORMALIZE: da analyze - confused!
654 ; NORMALIZE: da analyze - none!
656 ; DELIN: 'Dependence Analysis' for function 'banerjee9':
657 ; DELIN: da analyze - output [* *]!
658 ; DELIN: da analyze - flow [<= =|<]!
659 ; DELIN: da analyze - confused!
660 ; DELIN: da analyze - none!
661 ; DELIN: da analyze - confused!
662 ; DELIN: da analyze - none!
664 for.cond1.preheader: ; preds = %entry, %for.inc8
665 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc8 ]
666 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ]
669 for.body3: ; preds = %for.cond1.preheader, %for.body3
670 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
671 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
672 %mul = mul nsw i64 %i.03, 30
673 %mul4 = mul nsw i64 %j.02, 500
674 %add = add nsw i64 %mul, %mul4
675 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
676 store i64 0, ptr %arrayidx, align 8
677 %0 = mul i64 %j.02, -500
678 %sub = add i64 %i.03, %0
679 %add6 = add nsw i64 %sub, 11
680 %arrayidx7 = getelementptr inbounds i64, ptr %A, i64 %add6
681 %1 = load i64, ptr %arrayidx7, align 8
682 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
683 store i64 %1, ptr %B.addr.11, align 8
684 %inc = add nsw i64 %j.02, 1
685 %exitcond = icmp ne i64 %inc, 20
686 br i1 %exitcond, label %for.body3, label %for.inc8
688 for.inc8: ; preds = %for.body3
689 %scevgep = getelementptr i64, ptr %B.addr.04, i64 20
690 %inc9 = add nsw i64 %i.03, 1
691 %exitcond5 = icmp ne i64 %inc9, 20
692 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10
694 for.end10: ; preds = %for.inc8
699 ;; for (long int i = 0; i < 20; i++)
700 ;; for (long int j = 0; j < 20; j++) {
702 ;; *B++ = A[i - 500*j + 11];
704 define void @banerjee10(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
706 br label %for.cond1.preheader
708 ; CHECK: 'Dependence Analysis' for function 'banerjee10':
709 ; CHECK: da analyze - none!
710 ; CHECK: da analyze - flow [<> =]!
711 ; CHECK: da analyze - confused!
712 ; CHECK: da analyze - none!
713 ; CHECK: da analyze - confused!
714 ; CHECK: da analyze - none!
716 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee10':
717 ; NORMALIZE: da analyze - none!
718 ; NORMALIZE: da analyze - flow [<> =]!
719 ; NORMALIZE: da analyze - confused!
720 ; NORMALIZE: da analyze - none!
721 ; NORMALIZE: da analyze - confused!
722 ; NORMALIZE: da analyze - none!
724 ; DELIN: 'Dependence Analysis' for function 'banerjee10':
725 ; DELIN: da analyze - none!
726 ; DELIN: da analyze - flow [<> =]!
727 ; DELIN: da analyze - confused!
728 ; DELIN: da analyze - none!
729 ; DELIN: da analyze - confused!
730 ; DELIN: da analyze - none!
732 for.cond1.preheader: ; preds = %entry, %for.inc7
733 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
734 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
737 for.body3: ; preds = %for.cond1.preheader, %for.body3
738 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
739 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
740 %mul = mul nsw i64 %j.02, 500
741 %add = add nsw i64 %i.03, %mul
742 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
743 store i64 0, ptr %arrayidx, align 8
744 %0 = mul i64 %j.02, -500
745 %sub = add i64 %i.03, %0
746 %add5 = add nsw i64 %sub, 11
747 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %add5
748 %1 = load i64, ptr %arrayidx6, align 8
749 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
750 store i64 %1, ptr %B.addr.11, align 8
751 %inc = add nsw i64 %j.02, 1
752 %exitcond = icmp ne i64 %inc, 20
753 br i1 %exitcond, label %for.body3, label %for.inc7
755 for.inc7: ; preds = %for.body3
756 %scevgep = getelementptr i64, ptr %B.addr.04, i64 20
757 %inc8 = add nsw i64 %i.03, 1
758 %exitcond5 = icmp ne i64 %inc8, 20
759 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
761 for.end9: ; preds = %for.inc7
766 ;; for (long int i = 0; i < 20; i++)
767 ;; for (long int j = 0; j < 20; j++) {
769 ;; *B++ = A[250*i - j + 11];
771 define void @banerjee11(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
773 br label %for.cond1.preheader
775 ; CHECK: 'Dependence Analysis' for function 'banerjee11':
776 ; CHECK: da analyze - none!
777 ; CHECK: da analyze - flow [<= <>]!
778 ; CHECK: da analyze - confused!
779 ; CHECK: da analyze - none!
780 ; CHECK: da analyze - confused!
781 ; CHECK: da analyze - none!
783 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee11':
784 ; NORMALIZE: da analyze - none!
785 ; NORMALIZE: da analyze - flow [<= <>]!
786 ; NORMALIZE: da analyze - confused!
787 ; NORMALIZE: da analyze - none!
788 ; NORMALIZE: da analyze - confused!
789 ; NORMALIZE: da analyze - none!
791 ; DELIN: 'Dependence Analysis' for function 'banerjee11':
792 ; DELIN: da analyze - none!
793 ; DELIN: da analyze - flow [<= <>]!
794 ; DELIN: da analyze - confused!
795 ; DELIN: da analyze - none!
796 ; DELIN: da analyze - confused!
797 ; DELIN: da analyze - none!
799 for.cond1.preheader: ; preds = %entry, %for.inc7
800 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
801 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
804 for.body3: ; preds = %for.cond1.preheader, %for.body3
805 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
806 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
807 %mul = mul nsw i64 %i.03, 300
808 %add = add nsw i64 %mul, %j.02
809 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
810 store i64 0, ptr %arrayidx, align 8
811 %mul4 = mul nsw i64 %i.03, 250
812 %sub = sub nsw i64 %mul4, %j.02
813 %add5 = add nsw i64 %sub, 11
814 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %add5
815 %0 = load i64, ptr %arrayidx6, align 8
816 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
817 store i64 %0, ptr %B.addr.11, align 8
818 %inc = add nsw i64 %j.02, 1
819 %exitcond = icmp ne i64 %inc, 20
820 br i1 %exitcond, label %for.body3, label %for.inc7
822 for.inc7: ; preds = %for.body3
823 %scevgep = getelementptr i64, ptr %B.addr.04, i64 20
824 %inc8 = add nsw i64 %i.03, 1
825 %exitcond5 = icmp ne i64 %inc8, 20
826 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
828 for.end9: ; preds = %for.inc7
833 ;; for (long int i = 0; i < 20; i++)
834 ;; for (long int j = 0; j < 20; j++) {
836 ;; *B++ = A[100*i - j + 11];
838 define void @banerjee12(ptr %A, ptr %B, i64 %m, i64 %n) nounwind uwtable ssp {
840 br label %for.cond1.preheader
842 ; CHECK: 'Dependence Analysis' for function 'banerjee12':
843 ; CHECK: da analyze - none!
844 ; CHECK: da analyze - flow [= <>]!
845 ; CHECK: da analyze - confused!
846 ; CHECK: da analyze - none!
847 ; CHECK: da analyze - confused!
848 ; CHECK: da analyze - none!
850 ; NORMALIZE: 'Dependence Analysis' for function 'banerjee12':
851 ; NORMALIZE: da analyze - none!
852 ; NORMALIZE: da analyze - flow [= <>]!
853 ; NORMALIZE: da analyze - confused!
854 ; NORMALIZE: da analyze - none!
855 ; NORMALIZE: da analyze - confused!
856 ; NORMALIZE: da analyze - none!
858 ; DELIN: 'Dependence Analysis' for function 'banerjee12':
859 ; DELIN: da analyze - none!
860 ; DELIN: da analyze - flow [= <>]!
861 ; DELIN: da analyze - confused!
862 ; DELIN: da analyze - none!
863 ; DELIN: da analyze - confused!
864 ; DELIN: da analyze - none!
866 for.cond1.preheader: ; preds = %entry, %for.inc7
867 %B.addr.04 = phi ptr [ %B, %entry ], [ %scevgep, %for.inc7 ]
868 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ]
871 for.body3: ; preds = %for.cond1.preheader, %for.body3
872 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ]
873 %B.addr.11 = phi ptr [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ]
874 %mul = mul nsw i64 %i.03, 100
875 %add = add nsw i64 %mul, %j.02
876 %arrayidx = getelementptr inbounds i64, ptr %A, i64 %add
877 store i64 0, ptr %arrayidx, align 8
878 %mul4 = mul nsw i64 %i.03, 100
879 %sub = sub nsw i64 %mul4, %j.02
880 %add5 = add nsw i64 %sub, 11
881 %arrayidx6 = getelementptr inbounds i64, ptr %A, i64 %add5
882 %0 = load i64, ptr %arrayidx6, align 8
883 %incdec.ptr = getelementptr inbounds i64, ptr %B.addr.11, i64 1
884 store i64 %0, ptr %B.addr.11, align 8
885 %inc = add nsw i64 %j.02, 1
886 %exitcond = icmp ne i64 %inc, 20
887 br i1 %exitcond, label %for.body3, label %for.inc7
889 for.inc7: ; preds = %for.body3
890 %scevgep = getelementptr i64, ptr %B.addr.04, i64 20
891 %inc8 = add nsw i64 %i.03, 1
892 %exitcond5 = icmp ne i64 %inc8, 20
893 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9
895 for.end9: ; preds = %for.inc7