1 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
3 ; RUN: opt < %s -analyze -basicaa -da | FileCheck %s
5 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
6 target triple = "thumbv8m.main-arm-none-eabi"
9 ;; for (int i = 0; i < n; i++)
10 ;; for (int j = 0; j < m; j++)
11 ;; for (int k = 0; k < o; k++)
12 ;; = A[i*m*o + j*o + k]
13 ;; A[i*m*o + j*o + k] =
14 define void @t1(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
15 ; CHECK: da analyze - none!
16 ; CHECK: da analyze - consistent anti [0 0 0|<]!
17 ; CHECK: da analyze - none!
19 %cmp49 = icmp sgt i32 %n, 0
20 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
22 for.cond1.preheader.lr.ph: ; preds = %entry
23 %cmp247 = icmp sgt i32 %m, 0
24 %cmp645 = icmp sgt i32 %o, 0
25 br label %for.cond1.preheader
27 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
28 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
29 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
31 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
32 %mul = mul nsw i32 %i.050, %m
33 br label %for.cond5.preheader
35 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
36 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
37 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
39 for.body8.lr.ph: ; preds = %for.cond5.preheader
40 %mul944 = add i32 %j.048, %mul
41 %add = mul i32 %mul944, %o
44 for.body8: ; preds = %for.body8, %for.body8.lr.ph
45 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
46 %add11 = add nsw i32 %k.046, %add
47 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
48 %0 = load i32, i32* %arrayidx, align 4
49 %add12 = add nsw i32 %0, 1
50 store i32 %add12, i32* %arrayidx, align 4
51 %inc = add nuw nsw i32 %k.046, 1
52 %exitcond = icmp eq i32 %inc, %o
53 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
55 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
56 %inc20 = add nuw nsw i32 %j.048, 1
57 %exitcond51 = icmp eq i32 %inc20, %m
58 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
60 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
61 %inc23 = add nuw nsw i32 %i.050, 1
62 %exitcond52 = icmp eq i32 %inc23, %n
63 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
65 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
70 ;; for (int i = 0; i < n; i++)
71 ;; for (int j = 0; j < m; j++)
72 ;; for (int k = 0; k < o; k++)
73 ;; = A[i*m*o + j*o + k]
74 ;; A[i*m*o + j*o + k + 1] =
75 define void @t2(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
76 ; CHECK: da analyze - none!
77 ; CHECK: da analyze - anti [* * *|<]!
78 ; CHECK: da analyze - output [* * *]!
80 %cmp49 = icmp sgt i32 %n, 0
81 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
83 for.cond1.preheader.lr.ph: ; preds = %entry
84 %cmp247 = icmp sgt i32 %m, 0
85 %cmp645 = icmp sgt i32 %o, 0
86 br label %for.cond1.preheader
88 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
89 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
90 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
92 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
93 %mul = mul nsw i32 %i.050, %m
94 br label %for.cond5.preheader
96 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
97 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
98 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
100 for.body8.lr.ph: ; preds = %for.cond5.preheader
101 %mul944 = add i32 %j.048, %mul
102 %add = mul i32 %mul944, %o
105 for.body8: ; preds = %for.body8, %for.body8.lr.ph
106 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
107 %add11 = add nsw i32 %k.046, %add
108 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
109 %0 = load i32, i32* %arrayidx, align 4
110 %add12 = add nsw i32 %0, 1
111 %add111 = add nsw i32 %add11, 1
112 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
113 store i32 %add12, i32* %arrayidx2, align 4
114 %inc = add nuw nsw i32 %k.046, 1
115 %exitcond = icmp eq i32 %inc, %o
116 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
118 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
119 %inc20 = add nuw nsw i32 %j.048, 1
120 %exitcond51 = icmp eq i32 %inc20, %m
121 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
123 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
124 %inc23 = add nuw nsw i32 %i.050, 1
125 %exitcond52 = icmp eq i32 %inc23, %n
126 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
128 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
133 ;; for (int i = 0; i < n; i++)
134 ;; for (int j = 0; j < m; j++)
135 ;; for (int k = 0; k < o; k++)
136 ;; = A[i*m*o + j*o + k]
137 ;; A[i*m*o + j*o + k - 1] =
138 define void @t3(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
139 ; CHECK: da analyze - none!
140 ; CHECK: da analyze - anti [* * *|<]!
141 ; CHECK: da analyze - output [* * *]!
143 %cmp49 = icmp sgt i32 %n, 0
144 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
146 for.cond1.preheader.lr.ph: ; preds = %entry
147 %cmp247 = icmp sgt i32 %m, 0
148 %cmp645 = icmp sgt i32 %o, 0
149 br label %for.cond1.preheader
151 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
152 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
153 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
155 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
156 %mul = mul nsw i32 %i.050, %m
157 br label %for.cond5.preheader
159 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
160 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
161 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
163 for.body8.lr.ph: ; preds = %for.cond5.preheader
164 %mul944 = add i32 %j.048, %mul
165 %add = mul i32 %mul944, %o
168 for.body8: ; preds = %for.body8, %for.body8.lr.ph
169 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
170 %add11 = add nsw i32 %k.046, %add
171 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
172 %0 = load i32, i32* %arrayidx, align 4
173 %add12 = add nsw i32 %0, 1
174 %add111 = sub nsw i32 %add11, 1
175 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
176 store i32 %add12, i32* %arrayidx2, align 4
177 %inc = add nuw nsw i32 %k.046, 1
178 %exitcond = icmp eq i32 %inc, %o
179 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
181 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
182 %inc20 = add nuw nsw i32 %j.048, 1
183 %exitcond51 = icmp eq i32 %inc20, %m
184 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
186 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
187 %inc23 = add nuw nsw i32 %i.050, 1
188 %exitcond52 = icmp eq i32 %inc23, %n
189 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
191 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
196 ;; for (int i = 0; i < n; i++)
197 ;; for (int j = 0; j < m; j++)
198 ;; for (int k = 0; k < o; k++)
199 ;; = A[i*m*o + j*o + k]
200 ;; A[i*m*o + j*o + k + o] =
201 define void @t4(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
202 ; CHECK: da analyze - none!
203 ; CHECK: da analyze - anti [* * *|<]!
204 ; CHECK: da analyze - output [* * *]!
206 %cmp49 = icmp sgt i32 %n, 0
207 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
209 for.cond1.preheader.lr.ph: ; preds = %entry
210 %cmp247 = icmp sgt i32 %m, 0
211 %cmp645 = icmp sgt i32 %o, 0
212 br label %for.cond1.preheader
214 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
215 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
216 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
218 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
219 %mul = mul nsw i32 %i.050, %m
220 br label %for.cond5.preheader
222 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
223 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
224 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
226 for.body8.lr.ph: ; preds = %for.cond5.preheader
227 %mul944 = add i32 %j.048, %mul
228 %add = mul i32 %mul944, %o
231 for.body8: ; preds = %for.body8, %for.body8.lr.ph
232 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
233 %add11 = add nsw i32 %k.046, %add
234 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
235 %0 = load i32, i32* %arrayidx, align 4
236 %add12 = add nsw i32 %0, 1
237 %add111 = add nsw i32 %add11, %o
238 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
239 store i32 %add12, i32* %arrayidx2, align 4
240 %inc = add nuw nsw i32 %k.046, 1
241 %exitcond = icmp eq i32 %inc, %o
242 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
244 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
245 %inc20 = add nuw nsw i32 %j.048, 1
246 %exitcond51 = icmp eq i32 %inc20, %m
247 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
249 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
250 %inc23 = add nuw nsw i32 %i.050, 1
251 %exitcond52 = icmp eq i32 %inc23, %n
252 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
254 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
259 ;; for (int i = 0; i < n; i++)
260 ;; for (int j = 0; j < m; j++)
261 ;; for (int k = 0; k < o; k++)
262 ;; = A[i*m*o + j*o + k]
263 ;; A[i*m*o + j*o + k - o] =
264 define void @t5(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
265 ; CHECK: da analyze - none!
266 ; CHECK: da analyze - anti [* * *|<]!
267 ; CHECK: da analyze - output [* * *]!
269 %cmp49 = icmp sgt i32 %n, 0
270 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
272 for.cond1.preheader.lr.ph: ; preds = %entry
273 %cmp247 = icmp sgt i32 %m, 0
274 %cmp645 = icmp sgt i32 %o, 0
275 br label %for.cond1.preheader
277 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
278 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
279 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
281 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
282 %mul = mul nsw i32 %i.050, %m
283 br label %for.cond5.preheader
285 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
286 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
287 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
289 for.body8.lr.ph: ; preds = %for.cond5.preheader
290 %mul944 = add i32 %j.048, %mul
291 %add = mul i32 %mul944, %o
294 for.body8: ; preds = %for.body8, %for.body8.lr.ph
295 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
296 %add11 = add nsw i32 %k.046, %add
297 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
298 %0 = load i32, i32* %arrayidx, align 4
299 %add12 = add nsw i32 %0, 1
300 %add111 = sub nsw i32 %add11, %o
301 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
302 store i32 %add12, i32* %arrayidx2, align 4
303 %inc = add nuw nsw i32 %k.046, 1
304 %exitcond = icmp eq i32 %inc, %o
305 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
307 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
308 %inc20 = add nuw nsw i32 %j.048, 1
309 %exitcond51 = icmp eq i32 %inc20, %m
310 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
312 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
313 %inc23 = add nuw nsw i32 %i.050, 1
314 %exitcond52 = icmp eq i32 %inc23, %n
315 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
317 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
322 ;; for (int i = 0; i < n; i++)
323 ;; for (int j = 0; j < m; j++)
324 ;; for (int k = 0; k < o; k++)
325 ;; = A[i*m*o + j*o + k]
326 ;; A[i*m*o + j*o + k + m*o] =
327 define void @t6(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
328 ; CHECK: da analyze - none!
329 ; CHECK: da analyze - consistent anti [-1 0 0]!
330 ; CHECK: da analyze - none!
332 %cmp49 = icmp sgt i32 %n, 0
333 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
335 for.cond1.preheader.lr.ph: ; preds = %entry
336 %cmp247 = icmp sgt i32 %m, 0
337 %cmp645 = icmp sgt i32 %o, 0
338 br label %for.cond1.preheader
340 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
341 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
342 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
344 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
345 %mul = mul nsw i32 %i.050, %m
346 br label %for.cond5.preheader
348 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
349 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
350 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
352 for.body8.lr.ph: ; preds = %for.cond5.preheader
353 %mul944 = add i32 %j.048, %mul
354 %add = mul i32 %mul944, %o
357 for.body8: ; preds = %for.body8, %for.body8.lr.ph
358 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
359 %add11 = add nsw i32 %k.046, %add
360 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
361 %0 = load i32, i32* %arrayidx, align 4
362 %add12 = add nsw i32 %0, 1
364 %add111 = add nsw i32 %add11, %mo
365 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
366 store i32 %add12, i32* %arrayidx2, align 4
367 %inc = add nuw nsw i32 %k.046, 1
368 %exitcond = icmp eq i32 %inc, %o
369 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
371 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
372 %inc20 = add nuw nsw i32 %j.048, 1
373 %exitcond51 = icmp eq i32 %inc20, %m
374 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
376 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
377 %inc23 = add nuw nsw i32 %i.050, 1
378 %exitcond52 = icmp eq i32 %inc23, %n
379 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
381 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
386 ;; for (int i = 0; i < n; i++)
387 ;; for (int j = 0; j < m; j++)
388 ;; for (int k = 0; k < o; k++)
389 ;; = A[i*m*o + j*o + k]
390 ;; A[i*m*o + j*o + k - m*o] =
391 define void @t7(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
392 ; CHECK: da analyze - none!
393 ; CHECK: da analyze - consistent anti [1 0 0]!
394 ; CHECK: da analyze - none!
396 %cmp49 = icmp sgt i32 %n, 0
397 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
399 for.cond1.preheader.lr.ph: ; preds = %entry
400 %cmp247 = icmp sgt i32 %m, 0
401 %cmp645 = icmp sgt i32 %o, 0
402 br label %for.cond1.preheader
404 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
405 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
406 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
408 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
409 %mul = mul nsw i32 %i.050, %m
410 br label %for.cond5.preheader
412 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
413 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
414 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
416 for.body8.lr.ph: ; preds = %for.cond5.preheader
417 %mul944 = add i32 %j.048, %mul
418 %add = mul i32 %mul944, %o
421 for.body8: ; preds = %for.body8, %for.body8.lr.ph
422 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
423 %add11 = add nsw i32 %k.046, %add
424 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
425 %0 = load i32, i32* %arrayidx, align 4
426 %add12 = add nsw i32 %0, 1
428 %add111 = sub nsw i32 %add11, %mo
429 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
430 store i32 %add12, i32* %arrayidx2, align 4
431 %inc = add nuw nsw i32 %k.046, 1
432 %exitcond = icmp eq i32 %inc, %o
433 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
435 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
436 %inc20 = add nuw nsw i32 %j.048, 1
437 %exitcond51 = icmp eq i32 %inc20, %m
438 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
440 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
441 %inc23 = add nuw nsw i32 %i.050, 1
442 %exitcond52 = icmp eq i32 %inc23, %n
443 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
445 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
450 ;; for (int i = 0; i < n; i++)
451 ;; for (int j = 0; j < m; j++)
452 ;; for (int k = 1; k < o; k++)
453 ;; = A[i*m*o + j*o + k]
454 ;; A[i*m*o + j*o + k - 1] =
455 define void @t8(i32 %n, i32 %m, i32 %o, i32* nocapture %A) {
456 ; CHECK: da analyze - none!
457 ; CHECK: da analyze - consistent anti [0 0 1]!
458 ; CHECK: da analyze - none!
460 %cmp49 = icmp sgt i32 %n, 0
461 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
463 for.cond1.preheader.lr.ph: ; preds = %entry
464 %cmp247 = icmp sgt i32 %m, 0
465 %cmp645 = icmp sgt i32 %o, 0
466 br label %for.cond1.preheader
468 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
469 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
470 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
472 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
473 %mul = mul nsw i32 %i.050, %m
474 br label %for.cond5.preheader
476 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
477 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
478 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
480 for.body8.lr.ph: ; preds = %for.cond5.preheader
481 %mul944 = add i32 %j.048, %mul
482 %add = mul i32 %mul944, %o
485 for.body8: ; preds = %for.body8, %for.body8.lr.ph
486 %k.046 = phi i32 [ 1, %for.body8.lr.ph ], [ %inc, %for.body8 ]
487 %add11 = add nsw i32 %k.046, %add
488 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add11
489 %0 = load i32, i32* %arrayidx, align 4
490 %add12 = add nsw i32 %0, 1
491 %add111 = sub nsw i32 %add11, 1
492 %arrayidx2 = getelementptr inbounds i32, i32* %A, i32 %add111
493 store i32 %add12, i32* %arrayidx2, align 4
494 %inc = add nuw nsw i32 %k.046, 1
495 %exitcond = icmp eq i32 %inc, %o
496 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
498 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
499 %inc20 = add nuw nsw i32 %j.048, 1
500 %exitcond51 = icmp eq i32 %inc20, %m
501 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
503 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
504 %inc23 = add nuw nsw i32 %i.050, 1
505 %exitcond52 = icmp eq i32 %inc23, %n
506 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
508 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
513 ; CHECK-LABEL: test_sizes
514 define double @test_sizes(i16 %h, i16 %N, i16* nocapture %array) {
515 ; CHECK: da analyze - consistent input [0 S]!
516 ; CHECK: da analyze - anti [* *|<]!
517 ; CHECK: da analyze - output [* *]!
519 %cmp28 = icmp sgt i16 %N, 1
520 br i1 %cmp28, label %for.body.lr.ph, label %for.end12
522 for.body.lr.ph: ; preds = %entry
523 %cmp425 = icmp slt i16 %h, 0
525 %wide.trip.count = zext i16 %N to i32
528 for.body: ; preds = %for.inc10, %for.body.lr.ph
529 %indvars.iv32 = phi i32 [ 1, %for.body.lr.ph ], [ %indvars.iv.next33, %for.inc10 ]
530 %indvars.iv = phi i16 [ 2, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc10 ]
531 br i1 %cmp425, label %for.inc10, label %for.body5.lr.ph
533 for.body5.lr.ph: ; preds = %for.body
534 %1 = sext i16 %indvars.iv to i32
535 %arrayidx = getelementptr inbounds i16, i16* %array, i32 %indvars.iv32
538 for.body5: ; preds = %for.body5, %for.body5.lr.ph
539 %indvars.iv30 = phi i32 [ %indvars.iv.next31, %for.body5 ], [ %1, %for.body5.lr.ph ]
540 %j.027 = phi i16 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ]
541 %2 = load i16, i16* %arrayidx, align 4
542 %add6 = add nsw i16 %2, %j.027
543 %arrayidx8 = getelementptr inbounds i16, i16* %array, i32 %indvars.iv30
544 store i16 %add6, i16* %arrayidx8, align 4
545 %inc = add nuw nsw i16 %j.027, 1
546 %indvars.iv.next31 = add nsw i32 %indvars.iv30, 1
547 %exitcond = icmp eq i16 %inc, %0
548 br i1 %exitcond, label %for.inc10, label %for.body5
550 for.inc10: ; preds = %for.body5, %for.body
551 %indvars.iv.next33 = add nuw nsw i32 %indvars.iv32, 1
552 %indvars.iv.next = add i16 %indvars.iv, %0
553 %exitcond34 = icmp eq i32 %indvars.iv.next33, %wide.trip.count
554 br i1 %exitcond34, label %for.end12, label %for.body
556 for.end12: ; preds = %for.inc10, %entry
561 ; CHECK-LABEL: nonnegative
562 define void @nonnegative(i32* nocapture %A, i32 %N) {
563 ; CHECK: da analyze - none!
564 ; CHECK: da analyze - consistent output [0 0|<]!
565 ; CHECK: da analyze - none!
567 %cmp44 = icmp eq i32 %N, 0
568 br i1 %cmp44, label %exit, label %for.outer
571 %h.045 = phi i32 [ %add19, %for.latch ], [ 0, %entry ]
572 %mul = mul i32 %h.045, %N
576 %i.043 = phi i32 [ 0, %for.outer ], [ %add16, %for.inner ]
577 %add = add i32 %i.043, %mul
578 %arrayidx = getelementptr inbounds i32, i32* %A, i32 %add
579 store i32 1, i32* %arrayidx, align 4
580 store i32 2, i32* %arrayidx, align 4
581 %add16 = add nuw i32 %i.043, 1
582 %exitcond46 = icmp eq i32 %add16, %N
583 br i1 %exitcond46, label %for.latch, label %for.inner
586 %add19 = add nuw i32 %h.045, 1
587 %exitcond47 = icmp eq i32 %add19, %N
588 br i1 %exitcond47, label %exit, label %for.outer