1 ; RUN: opt < %s -disable-output "-passes=print<da>" -aa-pipeline=basic-aa 2>&1 \
4 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
5 target triple = "thumbv8m.main-arm-none-eabi"
8 ;; for (int i = 0; i < n; i++)
9 ;; for (int j = 0; j < m; j++)
10 ;; for (int k = 0; k < o; k++)
11 ;; = A[i*m*o + j*o + k]
12 ;; A[i*m*o + j*o + k] =
13 define void @t1(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
14 ; CHECK: da analyze - none!
15 ; CHECK: da analyze - consistent anti [0 0 0|<]!
16 ; CHECK: da analyze - none!
18 %cmp49 = icmp sgt i32 %n, 0
19 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
21 for.cond1.preheader.lr.ph: ; preds = %entry
22 %cmp247 = icmp sgt i32 %m, 0
23 %cmp645 = icmp sgt i32 %o, 0
24 br label %for.cond1.preheader
26 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
27 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
28 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
30 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
31 %mul = mul nsw i32 %i.050, %m
32 br label %for.cond5.preheader
34 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
35 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
36 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
38 for.body8.lr.ph: ; preds = %for.cond5.preheader
39 %mul944 = add i32 %j.048, %mul
40 %add = mul i32 %mul944, %o
43 for.body8: ; preds = %for.body8, %for.body8.lr.ph
44 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
45 %add11 = add nsw i32 %k.046, %add
46 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
47 %0 = load i32, ptr %arrayidx, align 4
48 %add12 = add nsw i32 %0, 1
49 store i32 %add12, ptr %arrayidx, align 4
50 %inc = add nuw nsw i32 %k.046, 1
51 %exitcond = icmp eq i32 %inc, %o
52 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
54 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
55 %inc20 = add nuw nsw i32 %j.048, 1
56 %exitcond51 = icmp eq i32 %inc20, %m
57 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
59 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
60 %inc23 = add nuw nsw i32 %i.050, 1
61 %exitcond52 = icmp eq i32 %inc23, %n
62 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
64 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
69 ;; for (int i = 0; i < n; i++)
70 ;; for (int j = 0; j < m; j++)
71 ;; for (int k = 0; k < o; k++)
72 ;; = A[i*m*o + j*o + k]
73 ;; A[i*m*o + j*o + k + 1] =
74 define void @t2(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
75 ; CHECK: da analyze - none!
76 ; CHECK: da analyze - anti [* * *|<]!
77 ; CHECK: da analyze - output [* * *]!
79 %cmp49 = icmp sgt i32 %n, 0
80 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
82 for.cond1.preheader.lr.ph: ; preds = %entry
83 %cmp247 = icmp sgt i32 %m, 0
84 %cmp645 = icmp sgt i32 %o, 0
85 br label %for.cond1.preheader
87 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
88 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
89 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
91 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
92 %mul = mul nsw i32 %i.050, %m
93 br label %for.cond5.preheader
95 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
96 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
97 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
99 for.body8.lr.ph: ; preds = %for.cond5.preheader
100 %mul944 = add i32 %j.048, %mul
101 %add = mul i32 %mul944, %o
104 for.body8: ; preds = %for.body8, %for.body8.lr.ph
105 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
106 %add11 = add nsw i32 %k.046, %add
107 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
108 %0 = load i32, ptr %arrayidx, align 4
109 %add12 = add nsw i32 %0, 1
110 %add111 = add nsw i32 %add11, 1
111 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
112 store i32 %add12, ptr %arrayidx2, align 4
113 %inc = add nuw nsw i32 %k.046, 1
114 %exitcond = icmp eq i32 %inc, %o
115 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
117 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
118 %inc20 = add nuw nsw i32 %j.048, 1
119 %exitcond51 = icmp eq i32 %inc20, %m
120 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
122 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
123 %inc23 = add nuw nsw i32 %i.050, 1
124 %exitcond52 = icmp eq i32 %inc23, %n
125 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
127 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
132 ;; for (int i = 0; i < n; i++)
133 ;; for (int j = 0; j < m; j++)
134 ;; for (int k = 0; k < o; k++)
135 ;; = A[i*m*o + j*o + k]
136 ;; A[i*m*o + j*o + k - 1] =
137 define void @t3(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
138 ; CHECK: da analyze - none!
139 ; CHECK: da analyze - anti [* * *|<]!
140 ; CHECK: da analyze - output [* * *]!
142 %cmp49 = icmp sgt i32 %n, 0
143 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
145 for.cond1.preheader.lr.ph: ; preds = %entry
146 %cmp247 = icmp sgt i32 %m, 0
147 %cmp645 = icmp sgt i32 %o, 0
148 br label %for.cond1.preheader
150 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
151 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
152 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
154 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
155 %mul = mul nsw i32 %i.050, %m
156 br label %for.cond5.preheader
158 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
159 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
160 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
162 for.body8.lr.ph: ; preds = %for.cond5.preheader
163 %mul944 = add i32 %j.048, %mul
164 %add = mul i32 %mul944, %o
167 for.body8: ; preds = %for.body8, %for.body8.lr.ph
168 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
169 %add11 = add nsw i32 %k.046, %add
170 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
171 %0 = load i32, ptr %arrayidx, align 4
172 %add12 = add nsw i32 %0, 1
173 %add111 = sub nsw i32 %add11, 1
174 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
175 store i32 %add12, ptr %arrayidx2, align 4
176 %inc = add nuw nsw i32 %k.046, 1
177 %exitcond = icmp eq i32 %inc, %o
178 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
180 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
181 %inc20 = add nuw nsw i32 %j.048, 1
182 %exitcond51 = icmp eq i32 %inc20, %m
183 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
185 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
186 %inc23 = add nuw nsw i32 %i.050, 1
187 %exitcond52 = icmp eq i32 %inc23, %n
188 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
190 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
195 ;; for (int i = 0; i < n; i++)
196 ;; for (int j = 0; j < m; j++)
197 ;; for (int k = 0; k < o; k++)
198 ;; = A[i*m*o + j*o + k]
199 ;; A[i*m*o + j*o + k + o] =
200 define void @t4(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
201 ; CHECK: da analyze - none!
202 ; CHECK: da analyze - anti [* * *|<]!
203 ; CHECK: da analyze - output [* * *]!
205 %cmp49 = icmp sgt i32 %n, 0
206 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
208 for.cond1.preheader.lr.ph: ; preds = %entry
209 %cmp247 = icmp sgt i32 %m, 0
210 %cmp645 = icmp sgt i32 %o, 0
211 br label %for.cond1.preheader
213 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
214 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
215 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
217 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
218 %mul = mul nsw i32 %i.050, %m
219 br label %for.cond5.preheader
221 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
222 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
223 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
225 for.body8.lr.ph: ; preds = %for.cond5.preheader
226 %mul944 = add i32 %j.048, %mul
227 %add = mul i32 %mul944, %o
230 for.body8: ; preds = %for.body8, %for.body8.lr.ph
231 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
232 %add11 = add nsw i32 %k.046, %add
233 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
234 %0 = load i32, ptr %arrayidx, align 4
235 %add12 = add nsw i32 %0, 1
236 %add111 = add nsw i32 %add11, %o
237 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
238 store i32 %add12, ptr %arrayidx2, align 4
239 %inc = add nuw nsw i32 %k.046, 1
240 %exitcond = icmp eq i32 %inc, %o
241 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
243 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
244 %inc20 = add nuw nsw i32 %j.048, 1
245 %exitcond51 = icmp eq i32 %inc20, %m
246 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
248 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
249 %inc23 = add nuw nsw i32 %i.050, 1
250 %exitcond52 = icmp eq i32 %inc23, %n
251 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
253 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
258 ;; for (int i = 0; i < n; i++)
259 ;; for (int j = 0; j < m; j++)
260 ;; for (int k = 0; k < o; k++)
261 ;; = A[i*m*o + j*o + k]
262 ;; A[i*m*o + j*o + k - o] =
263 define void @t5(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
264 ; CHECK: da analyze - none!
265 ; CHECK: da analyze - anti [* * *|<]!
266 ; CHECK: da analyze - output [* * *]!
268 %cmp49 = icmp sgt i32 %n, 0
269 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
271 for.cond1.preheader.lr.ph: ; preds = %entry
272 %cmp247 = icmp sgt i32 %m, 0
273 %cmp645 = icmp sgt i32 %o, 0
274 br label %for.cond1.preheader
276 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
277 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
278 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
280 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
281 %mul = mul nsw i32 %i.050, %m
282 br label %for.cond5.preheader
284 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
285 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
286 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
288 for.body8.lr.ph: ; preds = %for.cond5.preheader
289 %mul944 = add i32 %j.048, %mul
290 %add = mul i32 %mul944, %o
293 for.body8: ; preds = %for.body8, %for.body8.lr.ph
294 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
295 %add11 = add nsw i32 %k.046, %add
296 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
297 %0 = load i32, ptr %arrayidx, align 4
298 %add12 = add nsw i32 %0, 1
299 %add111 = sub nsw i32 %add11, %o
300 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
301 store i32 %add12, ptr %arrayidx2, align 4
302 %inc = add nuw nsw i32 %k.046, 1
303 %exitcond = icmp eq i32 %inc, %o
304 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
306 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
307 %inc20 = add nuw nsw i32 %j.048, 1
308 %exitcond51 = icmp eq i32 %inc20, %m
309 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
311 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
312 %inc23 = add nuw nsw i32 %i.050, 1
313 %exitcond52 = icmp eq i32 %inc23, %n
314 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
316 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
321 ;; for (int i = 0; i < n; i++)
322 ;; for (int j = 0; j < m; j++)
323 ;; for (int k = 0; k < o; k++)
324 ;; = A[i*m*o + j*o + k]
325 ;; A[i*m*o + j*o + k + m*o] =
326 define void @t6(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
327 ; CHECK: da analyze - none!
328 ; CHECK: da analyze - consistent anti [-1 0 0]!
329 ; CHECK: da analyze - none!
331 %cmp49 = icmp sgt i32 %n, 0
332 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
334 for.cond1.preheader.lr.ph: ; preds = %entry
335 %cmp247 = icmp sgt i32 %m, 0
336 %cmp645 = icmp sgt i32 %o, 0
337 br label %for.cond1.preheader
339 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
340 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
341 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
343 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
344 %mul = mul nsw i32 %i.050, %m
345 br label %for.cond5.preheader
347 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
348 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
349 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
351 for.body8.lr.ph: ; preds = %for.cond5.preheader
352 %mul944 = add i32 %j.048, %mul
353 %add = mul i32 %mul944, %o
356 for.body8: ; preds = %for.body8, %for.body8.lr.ph
357 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
358 %add11 = add nsw i32 %k.046, %add
359 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
360 %0 = load i32, ptr %arrayidx, align 4
361 %add12 = add nsw i32 %0, 1
363 %add111 = add nsw i32 %add11, %mo
364 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
365 store i32 %add12, ptr %arrayidx2, align 4
366 %inc = add nuw nsw i32 %k.046, 1
367 %exitcond = icmp eq i32 %inc, %o
368 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
370 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
371 %inc20 = add nuw nsw i32 %j.048, 1
372 %exitcond51 = icmp eq i32 %inc20, %m
373 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
375 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
376 %inc23 = add nuw nsw i32 %i.050, 1
377 %exitcond52 = icmp eq i32 %inc23, %n
378 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
380 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
385 ;; for (int i = 0; i < n; i++)
386 ;; for (int j = 0; j < m; j++)
387 ;; for (int k = 0; k < o; k++)
388 ;; = A[i*m*o + j*o + k]
389 ;; A[i*m*o + j*o + k - m*o] =
390 define void @t7(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
391 ; CHECK: da analyze - none!
392 ; CHECK: da analyze - consistent anti [1 0 0]!
393 ; CHECK: da analyze - none!
395 %cmp49 = icmp sgt i32 %n, 0
396 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
398 for.cond1.preheader.lr.ph: ; preds = %entry
399 %cmp247 = icmp sgt i32 %m, 0
400 %cmp645 = icmp sgt i32 %o, 0
401 br label %for.cond1.preheader
403 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
404 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
405 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
407 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
408 %mul = mul nsw i32 %i.050, %m
409 br label %for.cond5.preheader
411 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
412 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
413 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
415 for.body8.lr.ph: ; preds = %for.cond5.preheader
416 %mul944 = add i32 %j.048, %mul
417 %add = mul i32 %mul944, %o
420 for.body8: ; preds = %for.body8, %for.body8.lr.ph
421 %k.046 = phi i32 [ 0, %for.body8.lr.ph ], [ %inc, %for.body8 ]
422 %add11 = add nsw i32 %k.046, %add
423 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
424 %0 = load i32, ptr %arrayidx, align 4
425 %add12 = add nsw i32 %0, 1
427 %add111 = sub nsw i32 %add11, %mo
428 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
429 store i32 %add12, ptr %arrayidx2, align 4
430 %inc = add nuw nsw i32 %k.046, 1
431 %exitcond = icmp eq i32 %inc, %o
432 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
434 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
435 %inc20 = add nuw nsw i32 %j.048, 1
436 %exitcond51 = icmp eq i32 %inc20, %m
437 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
439 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
440 %inc23 = add nuw nsw i32 %i.050, 1
441 %exitcond52 = icmp eq i32 %inc23, %n
442 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
444 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
449 ;; for (int i = 0; i < n; i++)
450 ;; for (int j = 0; j < m; j++)
451 ;; for (int k = 1; k < o; k++)
452 ;; = A[i*m*o + j*o + k]
453 ;; A[i*m*o + j*o + k - 1] =
454 define void @t8(i32 %n, i32 %m, i32 %o, ptr nocapture %A) {
455 ; CHECK: da analyze - none!
456 ; CHECK: da analyze - consistent anti [0 0 1]!
457 ; CHECK: da analyze - none!
459 %cmp49 = icmp sgt i32 %n, 0
460 br i1 %cmp49, label %for.cond1.preheader.lr.ph, label %for.cond.cleanup
462 for.cond1.preheader.lr.ph: ; preds = %entry
463 %cmp247 = icmp sgt i32 %m, 0
464 %cmp645 = icmp sgt i32 %o, 0
465 br label %for.cond1.preheader
467 for.cond1.preheader: ; preds = %for.cond.cleanup3, %for.cond1.preheader.lr.ph
468 %i.050 = phi i32 [ 0, %for.cond1.preheader.lr.ph ], [ %inc23, %for.cond.cleanup3 ]
469 br i1 %cmp247, label %for.cond5.preheader.lr.ph, label %for.cond.cleanup3
471 for.cond5.preheader.lr.ph: ; preds = %for.cond1.preheader
472 %mul = mul nsw i32 %i.050, %m
473 br label %for.cond5.preheader
475 for.cond5.preheader: ; preds = %for.cond.cleanup7, %for.cond5.preheader.lr.ph
476 %j.048 = phi i32 [ 0, %for.cond5.preheader.lr.ph ], [ %inc20, %for.cond.cleanup7 ]
477 br i1 %cmp645, label %for.body8.lr.ph, label %for.cond.cleanup7
479 for.body8.lr.ph: ; preds = %for.cond5.preheader
480 %mul944 = add i32 %j.048, %mul
481 %add = mul i32 %mul944, %o
484 for.body8: ; preds = %for.body8, %for.body8.lr.ph
485 %k.046 = phi i32 [ 1, %for.body8.lr.ph ], [ %inc, %for.body8 ]
486 %add11 = add nsw i32 %k.046, %add
487 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add11
488 %0 = load i32, ptr %arrayidx, align 4
489 %add12 = add nsw i32 %0, 1
490 %add111 = sub nsw i32 %add11, 1
491 %arrayidx2 = getelementptr inbounds i32, ptr %A, i32 %add111
492 store i32 %add12, ptr %arrayidx2, align 4
493 %inc = add nuw nsw i32 %k.046, 1
494 %exitcond = icmp eq i32 %inc, %o
495 br i1 %exitcond, label %for.cond.cleanup7, label %for.body8
497 for.cond.cleanup7: ; preds = %for.body8, %for.cond5.preheader
498 %inc20 = add nuw nsw i32 %j.048, 1
499 %exitcond51 = icmp eq i32 %inc20, %m
500 br i1 %exitcond51, label %for.cond.cleanup3, label %for.cond5.preheader
502 for.cond.cleanup3: ; preds = %for.cond.cleanup7, %for.cond1.preheader
503 %inc23 = add nuw nsw i32 %i.050, 1
504 %exitcond52 = icmp eq i32 %inc23, %n
505 br i1 %exitcond52, label %for.cond.cleanup, label %for.cond1.preheader
507 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
512 ; CHECK-LABEL: test_sizes
513 define double @test_sizes(i16 %h, i16 %N, ptr nocapture %array) {
514 ; CHECK: da analyze - consistent input [0 S]!
515 ; CHECK: da analyze - anti [* *|<]!
516 ; CHECK: da analyze - output [* *]!
518 %cmp28 = icmp sgt i16 %N, 1
519 br i1 %cmp28, label %for.body.lr.ph, label %for.end12
521 for.body.lr.ph: ; preds = %entry
522 %cmp425 = icmp slt i16 %h, 0
524 %wide.trip.count = zext i16 %N to i32
527 for.body: ; preds = %for.inc10, %for.body.lr.ph
528 %indvars.iv32 = phi i32 [ 1, %for.body.lr.ph ], [ %indvars.iv.next33, %for.inc10 ]
529 %indvars.iv = phi i16 [ 2, %for.body.lr.ph ], [ %indvars.iv.next, %for.inc10 ]
530 br i1 %cmp425, label %for.inc10, label %for.body5.lr.ph
532 for.body5.lr.ph: ; preds = %for.body
533 %1 = sext i16 %indvars.iv to i32
534 %arrayidx = getelementptr inbounds i16, ptr %array, i32 %indvars.iv32
537 for.body5: ; preds = %for.body5, %for.body5.lr.ph
538 %indvars.iv30 = phi i32 [ %indvars.iv.next31, %for.body5 ], [ %1, %for.body5.lr.ph ]
539 %j.027 = phi i16 [ %inc, %for.body5 ], [ 0, %for.body5.lr.ph ]
540 %2 = load i16, ptr %arrayidx, align 4
541 %add6 = add nsw i16 %2, %j.027
542 %arrayidx8 = getelementptr inbounds i16, ptr %array, i32 %indvars.iv30
543 store i16 %add6, ptr %arrayidx8, align 4
544 %inc = add nuw nsw i16 %j.027, 1
545 %indvars.iv.next31 = add nsw i32 %indvars.iv30, 1
546 %exitcond = icmp eq i16 %inc, %0
547 br i1 %exitcond, label %for.inc10, label %for.body5
549 for.inc10: ; preds = %for.body5, %for.body
550 %indvars.iv.next33 = add nuw nsw i32 %indvars.iv32, 1
551 %indvars.iv.next = add i16 %indvars.iv, %0
552 %exitcond34 = icmp eq i32 %indvars.iv.next33, %wide.trip.count
553 br i1 %exitcond34, label %for.end12, label %for.body
555 for.end12: ; preds = %for.inc10, %entry
560 ; CHECK-LABEL: nonnegative
561 define void @nonnegative(ptr nocapture %A, i32 %N) {
562 ; CHECK: da analyze - none!
563 ; CHECK: da analyze - consistent output [0 0|<]!
564 ; CHECK: da analyze - none!
566 %cmp44 = icmp eq i32 %N, 0
567 br i1 %cmp44, label %exit, label %for.outer
570 %h.045 = phi i32 [ %add19, %for.latch ], [ 0, %entry ]
571 %mul = mul i32 %h.045, %N
575 %i.043 = phi i32 [ 0, %for.outer ], [ %add16, %for.inner ]
576 %add = add i32 %i.043, %mul
577 %arrayidx = getelementptr inbounds i32, ptr %A, i32 %add
578 store i32 1, ptr %arrayidx, align 4
579 store i32 2, ptr %arrayidx, align 4
580 %add16 = add nuw i32 %i.043, 1
581 %exitcond46 = icmp eq i32 %add16, %N
582 br i1 %exitcond46, label %for.latch, label %for.inner
585 %add19 = add nuw i32 %h.045, 1
586 %exitcond47 = icmp eq i32 %add19, %N
587 br i1 %exitcond47, label %exit, label %for.outer