1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -basic-aa -dse -S | FileCheck %s
4 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
5 declare void @llvm.memset.p0i8.i64(i8* nocapture, i8, i64, i32, i1) nounwind
7 define void @test13(i32* noalias %P) {
8 ; CHECK-LABEL: @test13(
10 ; CHECK-NEXT: br label [[FOR:%.*]]
12 ; CHECK-NEXT: store i32 0, i32* [[P:%.*]], align 4
13 ; CHECK-NEXT: br i1 false, label [[FOR]], label [[END:%.*]]
15 ; CHECK-NEXT: ret void
21 br i1 false, label %for, label %end
27 define void @test14(i32* noalias %P) {
28 ; CHECK-LABEL: @test14(
30 ; CHECK-NEXT: br label [[FOR:%.*]]
32 ; CHECK-NEXT: store i32 0, i32* [[P:%.*]], align 4
33 ; CHECK-NEXT: br i1 false, label [[FOR]], label [[END:%.*]]
35 ; CHECK-NEXT: ret void
42 br i1 false, label %for, label %end
47 define void @test18(i32* noalias %P) {
48 ; CHECK-LABEL: @test18(
50 ; CHECK-NEXT: [[P2:%.*]] = bitcast i32* [[P:%.*]] to i8*
51 ; CHECK-NEXT: store i32 0, i32* [[P]], align 4
52 ; CHECK-NEXT: br label [[FOR:%.*]]
54 ; CHECK-NEXT: store i8 1, i8* [[P2]], align 1
55 ; CHECK-NEXT: [[X:%.*]] = load i32, i32* [[P]], align 4
56 ; CHECK-NEXT: store i8 2, i8* [[P2]], align 1
57 ; CHECK-NEXT: br i1 false, label [[FOR]], label [[END:%.*]]
59 ; CHECK-NEXT: ret void
62 %P2 = bitcast i32* %P to i8*
67 %x = load i32, i32* %P
69 br i1 false, label %for, label %end
74 define void @test21(i32* noalias %P) {
75 ; CHECK-LABEL: @test21(
77 ; CHECK-NEXT: [[ARRAYIDX0:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i64 1
78 ; CHECK-NEXT: [[P3:%.*]] = bitcast i32* [[ARRAYIDX0]] to i8*
79 ; CHECK-NEXT: [[TMP0:%.*]] = getelementptr inbounds i8, i8* [[P3]], i64 4
80 ; CHECK-NEXT: call void @llvm.memset.p0i8.i64(i8* align 4 [[TMP0]], i8 0, i64 24, i1 false)
81 ; CHECK-NEXT: br label [[FOR:%.*]]
83 ; CHECK-NEXT: [[ARRAYIDX1:%.*]] = getelementptr inbounds i32, i32* [[P]], i64 1
84 ; CHECK-NEXT: store i32 1, i32* [[ARRAYIDX1]], align 4
85 ; CHECK-NEXT: br i1 false, label [[FOR]], label [[END:%.*]]
87 ; CHECK-NEXT: ret void
90 %arrayidx0 = getelementptr inbounds i32, i32* %P, i64 1
91 %p3 = bitcast i32* %arrayidx0 to i8*
92 call void @llvm.memset.p0i8.i64(i8* %p3, i8 0, i64 28, i32 4, i1 false)
95 %arrayidx1 = getelementptr inbounds i32, i32* %P, i64 1
96 store i32 1, i32* %arrayidx1, align 4
97 br i1 false, label %for, label %end
102 define void @test_loop(i32 %N, i32* noalias nocapture readonly %A, i32* noalias nocapture readonly %x, i32* noalias nocapture %b) local_unnamed_addr {
103 ; CHECK-LABEL: @test_loop(
105 ; CHECK-NEXT: [[CMP27:%.*]] = icmp sgt i32 [[N:%.*]], 0
106 ; CHECK-NEXT: br i1 [[CMP27]], label [[FOR_BODY4_LR_PH_PREHEADER:%.*]], label [[FOR_COND_CLEANUP:%.*]]
107 ; CHECK: for.body4.lr.ph.preheader:
108 ; CHECK-NEXT: br label [[FOR_BODY4_LR_PH:%.*]]
109 ; CHECK: for.cond.cleanup:
110 ; CHECK-NEXT: ret void
111 ; CHECK: for.body4.lr.ph:
112 ; CHECK-NEXT: [[I_028:%.*]] = phi i32 [ [[INC11:%.*]], [[FOR_COND_CLEANUP3:%.*]] ], [ 0, [[FOR_BODY4_LR_PH_PREHEADER]] ]
113 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds i32, i32* [[B:%.*]], i32 [[I_028]]
114 ; CHECK-NEXT: [[MUL:%.*]] = mul nsw i32 [[I_028]], [[N]]
115 ; CHECK-NEXT: br label [[FOR_BODY4:%.*]]
117 ; CHECK-NEXT: [[TMP0:%.*]] = phi i32 [ 0, [[FOR_BODY4_LR_PH]] ], [ [[ADD9:%.*]], [[FOR_BODY4]] ]
118 ; CHECK-NEXT: [[J_026:%.*]] = phi i32 [ 0, [[FOR_BODY4_LR_PH]] ], [ [[INC:%.*]], [[FOR_BODY4]] ]
119 ; CHECK-NEXT: [[ADD:%.*]] = add nsw i32 [[J_026]], [[MUL]]
120 ; CHECK-NEXT: [[ARRAYIDX5:%.*]] = getelementptr inbounds i32, i32* [[A:%.*]], i32 [[ADD]]
121 ; CHECK-NEXT: [[TMP1:%.*]] = load i32, i32* [[ARRAYIDX5]], align 4
122 ; CHECK-NEXT: [[ARRAYIDX6:%.*]] = getelementptr inbounds i32, i32* [[X:%.*]], i32 [[J_026]]
123 ; CHECK-NEXT: [[TMP2:%.*]] = load i32, i32* [[ARRAYIDX6]], align 4
124 ; CHECK-NEXT: [[MUL7:%.*]] = mul nsw i32 [[TMP2]], [[TMP1]]
125 ; CHECK-NEXT: [[ADD9]] = add nsw i32 [[MUL7]], [[TMP0]]
126 ; CHECK-NEXT: [[INC]] = add nuw nsw i32 [[J_026]], 1
127 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i32 [[INC]], [[N]]
128 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_COND_CLEANUP3]], label [[FOR_BODY4]]
129 ; CHECK: for.cond.cleanup3:
130 ; CHECK-NEXT: store i32 [[ADD9]], i32* [[ARRAYIDX]], align 4
131 ; CHECK-NEXT: [[INC11]] = add nuw nsw i32 [[I_028]], 1
132 ; CHECK-NEXT: [[EXITCOND29:%.*]] = icmp eq i32 [[INC11]], [[N]]
133 ; CHECK-NEXT: br i1 [[EXITCOND29]], label [[FOR_COND_CLEANUP]], label [[FOR_BODY4_LR_PH]]
136 %cmp27 = icmp sgt i32 %N, 0
137 br i1 %cmp27, label %for.body4.lr.ph.preheader, label %for.cond.cleanup
139 for.body4.lr.ph.preheader: ; preds = %entry
140 br label %for.body4.lr.ph
142 for.cond.cleanup: ; preds = %for.cond.cleanup3, %entry
145 for.body4.lr.ph: ; preds = %for.body4.lr.ph.preheader, %for.cond.cleanup3
146 %i.028 = phi i32 [ %inc11, %for.cond.cleanup3 ], [ 0, %for.body4.lr.ph.preheader ]
147 %arrayidx = getelementptr inbounds i32, i32* %b, i32 %i.028
148 store i32 0, i32* %arrayidx, align 4
149 %mul = mul nsw i32 %i.028, %N
152 for.body4: ; preds = %for.body4, %for.body4.lr.ph
153 %0 = phi i32 [ 0, %for.body4.lr.ph ], [ %add9, %for.body4 ]
154 %j.026 = phi i32 [ 0, %for.body4.lr.ph ], [ %inc, %for.body4 ]
155 %add = add nsw i32 %j.026, %mul
156 %arrayidx5 = getelementptr inbounds i32, i32* %A, i32 %add
157 %1 = load i32, i32* %arrayidx5, align 4
158 %arrayidx6 = getelementptr inbounds i32, i32* %x, i32 %j.026
159 %2 = load i32, i32* %arrayidx6, align 4
160 %mul7 = mul nsw i32 %2, %1
161 %add9 = add nsw i32 %mul7, %0
162 %inc = add nuw nsw i32 %j.026, 1
163 %exitcond = icmp eq i32 %inc, %N
164 br i1 %exitcond, label %for.cond.cleanup3, label %for.body4
166 for.cond.cleanup3: ; preds = %for.body4
167 store i32 %add9, i32* %arrayidx, align 4
168 %inc11 = add nuw nsw i32 %i.028, 1
169 %exitcond29 = icmp eq i32 %inc11, %N
170 br i1 %exitcond29, label %for.cond.cleanup, label %for.body4.lr.ph
173 define i32 @test_if(i1 %c, i32* %p, i32 %i) {
174 ; CHECK-LABEL: @test_if(
176 ; CHECK-NEXT: br label [[BB1:%.*]]
178 ; CHECK-NEXT: [[PH:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[BB3:%.*]] ]
179 ; CHECK-NEXT: [[INC]] = add i32 [[PH]], 1
180 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i32 [[PH]]
181 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2:%.*]], label [[BB3]]
183 ; CHECK-NEXT: br label [[BB3]]
185 ; CHECK-NEXT: store i32 2, i32* [[GEP]], align 4
186 ; CHECK-NEXT: [[C1:%.*]] = icmp slt i32 [[PH]], 10
187 ; CHECK-NEXT: br i1 [[C1]], label [[BB1]], label [[EXIT:%.*]]
189 ; CHECK-NEXT: ret i32 0
194 %ph = phi i32 [ 0, %entry ], [ %inc, %bb3 ]
195 %inc = add i32 %ph, 1
196 %gep = getelementptr inbounds i32, i32* %p, i32 %ph
197 store i32 %i, i32* %gep, align 4
198 br i1 %c, label %bb2, label %bb3
202 store i32 2, i32* %gep, align 4
203 %c1 = icmp slt i32 %ph, 10
204 br i1 %c1, label %bb1, label %exit
209 define i32 @test_if2(i1 %c, i32* %p, i32 %i) {
210 ; CHECK-LABEL: @test_if2(
212 ; CHECK-NEXT: br label [[BB1:%.*]]
214 ; CHECK-NEXT: [[PH:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[BB2:%.*]] ], [ [[INC]], [[BB3:%.*]] ]
215 ; CHECK-NEXT: [[INC]] = add i32 [[PH]], 1
216 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i32 [[PH]]
217 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2]], label [[BB3]]
219 ; CHECK-NEXT: store i32 2, i32* [[GEP]], align 4
220 ; CHECK-NEXT: [[C1:%.*]] = icmp slt i32 [[PH]], 10
221 ; CHECK-NEXT: br i1 [[C1]], label [[BB1]], label [[EXIT:%.*]]
223 ; CHECK-NEXT: store i32 3, i32* [[GEP]], align 4
224 ; CHECK-NEXT: [[C2:%.*]] = icmp slt i32 [[PH]], 5
225 ; CHECK-NEXT: br i1 [[C2]], label [[BB1]], label [[EXIT]]
227 ; CHECK-NEXT: ret i32 0
232 %ph = phi i32 [ 0, %entry ], [ %inc, %bb2 ], [ %inc, %bb3 ]
233 %inc = add i32 %ph, 1
234 %gep = getelementptr inbounds i32, i32* %p, i32 %ph
235 store i32 %i, i32* %gep, align 4
236 br i1 %c, label %bb2, label %bb3
238 store i32 2, i32* %gep, align 4
239 %c1 = icmp slt i32 %ph, 10
240 br i1 %c1, label %bb1, label %exit
242 store i32 3, i32* %gep, align 4
243 %c2 = icmp slt i32 %ph, 5
244 br i1 %c2, label %bb1, label %exit
249 define i32 @test_if3(i1 %c, i32* %p, i32 %i) {
250 ; CHECK-LABEL: @test_if3(
252 ; CHECK-NEXT: br label [[BB1:%.*]]
254 ; CHECK-NEXT: [[PH:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[BB3:%.*]] ]
255 ; CHECK-NEXT: [[INC]] = add i32 [[PH]], 1
256 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i32 [[PH]]
257 ; CHECK-NEXT: store i32 [[I:%.*]], i32* [[GEP]], align 4
258 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2:%.*]], label [[BB3]]
260 ; CHECK-NEXT: store i32 2, i32* [[GEP]], align 4
261 ; CHECK-NEXT: br label [[BB3]]
263 ; CHECK-NEXT: [[C1:%.*]] = icmp slt i32 [[PH]], 10
264 ; CHECK-NEXT: br i1 [[C1]], label [[BB1]], label [[EXIT:%.*]]
266 ; CHECK-NEXT: ret i32 0
271 %ph = phi i32 [ 0, %entry ], [ %inc, %bb3 ]
272 %inc = add i32 %ph, 1
273 %gep = getelementptr inbounds i32, i32* %p, i32 %ph
274 store i32 %i, i32* %gep, align 4
275 br i1 %c, label %bb2, label %bb3
277 store i32 2, i32* %gep, align 4
280 %c1 = icmp slt i32 %ph, 10
281 br i1 %c1, label %bb1, label %exit
286 define i32 @test_if4(i1 %c, i32* %p, i32 %i) {
287 ; CHECK-LABEL: @test_if4(
289 ; CHECK-NEXT: br label [[BB1:%.*]]
291 ; CHECK-NEXT: [[PH:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[BB1]] ], [ [[INC]], [[BB2:%.*]] ]
292 ; CHECK-NEXT: [[INC]] = add i32 [[PH]], 1
293 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i32 [[PH]]
294 ; CHECK-NEXT: store i32 [[I:%.*]], i32* [[GEP]], align 4
295 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2]], label [[BB1]]
297 ; CHECK-NEXT: store i32 2, i32* [[GEP]], align 4
298 ; CHECK-NEXT: [[C1:%.*]] = icmp slt i32 [[PH]], 10
299 ; CHECK-NEXT: br i1 [[C1]], label [[BB1]], label [[EXIT:%.*]]
301 ; CHECK-NEXT: ret i32 0
306 %ph = phi i32 [ 0, %entry ], [ %inc, %bb1 ], [ %inc, %bb2 ]
307 %inc = add i32 %ph, 1
308 %gep = getelementptr inbounds i32, i32* %p, i32 %ph
309 store i32 %i, i32* %gep, align 4
310 br i1 %c, label %bb2, label %bb1
312 store i32 2, i32* %gep, align 4
313 %c1 = icmp slt i32 %ph, 10
314 br i1 %c1, label %bb1, label %exit
319 declare void @clobber()
320 define i32 @test_self(i1 %c, i32* %p, i32 %i) {
321 ; CHECK-LABEL: @test_self(
323 ; CHECK-NEXT: br label [[BB1:%.*]]
325 ; CHECK-NEXT: [[PH:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[BB1]] ], [ [[INC]], [[BB2:%.*]] ]
326 ; CHECK-NEXT: [[INC]] = add i32 [[PH]], 1
327 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[P:%.*]], i32 [[PH]]
328 ; CHECK-NEXT: store i32 1, i32* [[GEP]], align 4
329 ; CHECK-NEXT: call void @clobber()
330 ; CHECK-NEXT: store i32 2, i32* [[GEP]], align 4
331 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2]], label [[BB1]]
333 ; CHECK-NEXT: store i32 3, i32* [[GEP]], align 4
334 ; CHECK-NEXT: [[C1:%.*]] = icmp slt i32 [[PH]], 10
335 ; CHECK-NEXT: br i1 [[C1]], label [[BB1]], label [[EXIT:%.*]]
337 ; CHECK-NEXT: ret i32 0
342 %ph = phi i32 [ 0, %entry ], [ %inc, %bb1 ], [ %inc, %bb2 ]
343 %inc = add i32 %ph, 1
344 %gep = getelementptr inbounds i32, i32* %p, i32 %ph
345 store i32 1, i32* %gep, align 4
347 store i32 2, i32* %gep, align 4
348 br i1 %c, label %bb2, label %bb1
350 store i32 3, i32* %gep, align 4
351 %c1 = icmp slt i32 %ph, 10
352 br i1 %c1, label %bb1, label %exit
357 define i32 @test_selfalloca(i1 %c, i32 %i) {
358 ; CHECK-LABEL: @test_selfalloca(
360 ; CHECK-NEXT: [[P:%.*]] = alloca i32, align 4
361 ; CHECK-NEXT: br label [[BB1:%.*]]
363 ; CHECK-NEXT: [[PH:%.*]] = phi i32 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[BB1]] ], [ [[INC]], [[BB2:%.*]] ]
364 ; CHECK-NEXT: [[INC]] = add i32 [[PH]], 1
365 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 [[PH]]
366 ; CHECK-NEXT: call void @clobber()
367 ; CHECK-NEXT: store i32 2, i32* [[GEP]], align 4
368 ; CHECK-NEXT: br i1 [[C:%.*]], label [[BB2]], label [[BB1]]
370 ; CHECK-NEXT: store i32 3, i32* [[GEP]], align 4
371 ; CHECK-NEXT: [[C1:%.*]] = icmp slt i32 [[PH]], 10
372 ; CHECK-NEXT: br i1 [[C1]], label [[BB1]], label [[EXIT:%.*]]
374 ; CHECK-NEXT: [[PG:%.*]] = getelementptr inbounds i32, i32* [[P]], i32 [[I:%.*]]
375 ; CHECK-NEXT: [[L:%.*]] = load i32, i32* [[PG]], align 4
376 ; CHECK-NEXT: ret i32 [[L]]
379 %p = alloca i32, align 4
382 %ph = phi i32 [ 0, %entry ], [ %inc, %bb1 ], [ %inc, %bb2 ]
383 %inc = add i32 %ph, 1
384 %gep = getelementptr inbounds i32, i32* %p, i32 %ph
385 store i32 1, i32* %gep, align 4
387 store i32 2, i32* %gep, align 4
388 br i1 %c, label %bb2, label %bb1
390 store i32 3, i32* %gep, align 4
391 %c1 = icmp slt i32 %ph, 10
392 br i1 %c1, label %bb1, label %exit
394 %pg = getelementptr inbounds i32, i32* %p, i32 %i
395 %l = load i32, i32* %pg
399 declare i1 @cond() readnone
401 ; TODO: We can eliminate the store in for.header, but we currently hit a MemoryPhi.
402 define void @loop_multiple_def_uses(i32* noalias %P) {
403 ; CHECK-LABEL: @loop_multiple_def_uses(
405 ; CHECK-NEXT: br label [[FOR_HEADER:%.*]]
407 ; CHECK-NEXT: store i32 1, i32* [[P:%.*]], align 4
408 ; CHECK-NEXT: [[C1:%.*]] = call i1 @cond()
409 ; CHECK-NEXT: br i1 [[C1]], label [[FOR_BODY:%.*]], label [[END:%.*]]
411 ; CHECK-NEXT: store i32 2, i32* [[P]], align 4
412 ; CHECK-NEXT: [[LV:%.*]] = load i32, i32* [[P]], align 4
413 ; CHECK-NEXT: br label [[FOR_HEADER]]
415 ; CHECK-NEXT: store i32 3, i32* [[P]], align 4
416 ; CHECK-NEXT: ret void
422 store i32 1, i32* %P, align 4
423 %c1 = call i1 @cond()
424 br i1 %c1, label %for.body, label %end
427 store i32 2, i32* %P, align 4
428 %lv = load i32, i32* %P
432 store i32 3, i32* %P, align 4
436 ; We cannot eliminate the store in for.header, as it is only partially
437 ; overwritten in for.body and read afterwards.
438 define void @loop_multiple_def_uses_partial_write(i32* noalias %p) {
439 ; CHECK-LABEL: @loop_multiple_def_uses_partial_write(
441 ; CHECK-NEXT: br label [[FOR_HEADER:%.*]]
443 ; CHECK-NEXT: store i32 1239491, i32* [[P:%.*]], align 4
444 ; CHECK-NEXT: [[C1:%.*]] = call i1 @cond()
445 ; CHECK-NEXT: br i1 [[C1]], label [[FOR_BODY:%.*]], label [[END:%.*]]
447 ; CHECK-NEXT: [[C:%.*]] = bitcast i32* [[P]] to i8*
448 ; CHECK-NEXT: store i8 1, i8* [[C]], align 4
449 ; CHECK-NEXT: [[LV:%.*]] = load i32, i32* [[P]], align 4
450 ; CHECK-NEXT: br label [[FOR_HEADER]]
452 ; CHECK-NEXT: store i32 3, i32* [[P]], align 4
453 ; CHECK-NEXT: ret void
459 store i32 1239491, i32* %p, align 4
460 %c1 = call i1 @cond()
461 br i1 %c1, label %for.body, label %end
464 %c = bitcast i32* %p to i8*
465 store i8 1, i8* %c, align 4
466 %lv = load i32, i32* %p
470 store i32 3, i32* %p, align 4
474 ; We cannot eliminate the store in for.header, as the location is not overwritten
475 ; in for.body and read afterwards.
476 define void @loop_multiple_def_uses_mayalias_write(i32* %p, i32* %q) {
477 ; CHECK-LABEL: @loop_multiple_def_uses_mayalias_write(
479 ; CHECK-NEXT: br label [[FOR_HEADER:%.*]]
481 ; CHECK-NEXT: store i32 1239491, i32* [[P:%.*]], align 4
482 ; CHECK-NEXT: [[C1:%.*]] = call i1 @cond()
483 ; CHECK-NEXT: br i1 [[C1]], label [[FOR_BODY:%.*]], label [[END:%.*]]
485 ; CHECK-NEXT: store i32 1, i32* [[Q:%.*]], align 4
486 ; CHECK-NEXT: [[LV:%.*]] = load i32, i32* [[P]], align 4
487 ; CHECK-NEXT: br label [[FOR_HEADER]]
489 ; CHECK-NEXT: store i32 3, i32* [[P]], align 4
490 ; CHECK-NEXT: ret void
496 store i32 1239491, i32* %p, align 4
497 %c1 = call i1 @cond()
498 br i1 %c1, label %for.body, label %end
501 store i32 1, i32* %q, align 4
502 %lv = load i32, i32* %p
506 store i32 3, i32* %p, align 4
510 %struct.hoge = type { i32, i32 }
512 @global = external local_unnamed_addr global %struct.hoge*, align 8
514 define void @widget(i8* %tmp) {
515 ; CHECK-LABEL: @widget(
517 ; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 [[TMP:%.*]], i8* nonnull align 16 undef, i64 64, i1 false)
518 ; CHECK-NEXT: br label [[BB1:%.*]]
520 ; CHECK-NEXT: [[TMP2:%.*]] = load %struct.hoge*, %struct.hoge** @global, align 8
521 ; CHECK-NEXT: [[TMP3:%.*]] = getelementptr inbounds [[STRUCT_HOGE:%.*]], %struct.hoge* [[TMP2]], i64 undef, i32 1
522 ; CHECK-NEXT: store i32 0, i32* [[TMP3]], align 4
523 ; CHECK-NEXT: [[TMP4:%.*]] = load %struct.hoge*, %struct.hoge** @global, align 8
524 ; CHECK-NEXT: [[TMP5:%.*]] = getelementptr inbounds [[STRUCT_HOGE]], %struct.hoge* [[TMP4]], i64 undef, i32 1
525 ; CHECK-NEXT: store i32 10, i32* [[TMP5]], align 4
526 ; CHECK-NEXT: br label [[BB1]]
529 call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %tmp, i8* nonnull align 16 undef, i64 64, i1 false)
532 bb1: ; preds = %bb1, %bb
533 %tmp2 = load %struct.hoge*, %struct.hoge** @global, align 8
534 %tmp3 = getelementptr inbounds %struct.hoge, %struct.hoge* %tmp2, i64 undef, i32 1
535 store i32 0, i32* %tmp3, align 4
536 %tmp4 = load %struct.hoge*, %struct.hoge** @global, align 8
537 %tmp5 = getelementptr inbounds %struct.hoge, %struct.hoge* %tmp4, i64 undef, i32 1
538 store i32 10, i32* %tmp5, align 4
542 declare void @llvm.memcpy.p0i8.p0i8.i64(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i64, i1 immarg)
544 @x = global [10 x i16] zeroinitializer, align 1
546 ; Make sure we do not eliminate the store in %do.body, because it writes to
547 ; multiple locations in the loop and the store in %if.end10 only stores to
549 define i16 @test_loop_carried_dep() {
550 ; CHECK-LABEL: @test_loop_carried_dep(
552 ; CHECK-NEXT: br label [[DO_BODY:%.*]]
554 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[IF_END:%.*]] ]
555 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
556 ; CHECK-NEXT: store i16 2, i16* [[ARRAYIDX2]], align 1
557 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[I_0]], 4
558 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[IF_END10:%.*]], label [[IF_END]]
560 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[I_0]], 1
561 ; CHECK-NEXT: br label [[DO_BODY]]
563 ; CHECK-NEXT: store i16 1, i16* [[ARRAYIDX2]], align 1
564 ; CHECK-NEXT: ret i16 0
569 do.body: ; preds = %if.end, %entry
570 %i.0 = phi i16 [ 0, %entry ], [ %inc, %if.end ]
571 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
572 store i16 2, i16* %arrayidx2, align 1
573 %exitcond = icmp eq i16 %i.0, 4
574 br i1 %exitcond, label %if.end10, label %if.end
576 if.end: ; preds = %do.body
577 %inc = add nuw nsw i16 %i.0, 1
580 if.end10: ; preds = %do.body
581 store i16 1, i16* %arrayidx2, align 1
585 ; Similar to above, but with an irreducible loop. The stores should not be removed.
586 define i16 @irreducible(i1 %c) {
587 ; CHECK-LABEL: @irreducible(
589 ; CHECK-NEXT: br i1 [[C:%.*]], label [[A:%.*]], label [[B:%.*]]
591 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[B]] ]
592 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
593 ; CHECK-NEXT: br label [[B]]
595 ; CHECK-NEXT: [[J_0:%.*]] = phi i16 [ 0, [[ENTRY]] ], [ [[I_0]], [[A]] ]
596 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[J_0]]
597 ; CHECK-NEXT: store i16 2, i16* [[ARRAYIDX]], align 1
598 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[J_0]], 1
599 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[J_0]], 4
600 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[EXIT:%.*]], label [[A]]
602 ; CHECK-NEXT: store i16 1, i16* [[ARRAYIDX]], align 1
603 ; CHECK-NEXT: ret i16 0
606 br i1 %c, label %A, label %B
609 %i.0 = phi i16 [ 0, %entry ], [ %inc, %B ]
610 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
614 %j.0 = phi i16 [ 0, %entry ], [ %i.0, %A ]
615 %arrayidx = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %j.0
616 store i16 2, i16* %arrayidx, align 1
617 %inc = add nuw nsw i16 %j.0, 1
618 %exitcond = icmp eq i16 %j.0, 4
619 br i1 %exitcond, label %exit, label %A
622 store i16 1, i16* %arrayidx, align 1
626 ; An irreducible loop inside another loop.
627 define i16 @irreducible_nested() {
628 ; CHECK-LABEL: @irreducible_nested(
630 ; CHECK-NEXT: br label [[OUTER:%.*]]
632 ; CHECK-NEXT: [[X:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[INCX:%.*]], [[OUTERL:%.*]] ]
633 ; CHECK-NEXT: [[C:%.*]] = icmp sgt i16 [[X]], 2
634 ; CHECK-NEXT: br i1 [[C]], label [[A:%.*]], label [[B:%.*]]
636 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[OUTER]] ], [ [[INC:%.*]], [[B]] ]
637 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
638 ; CHECK-NEXT: br label [[B]]
640 ; CHECK-NEXT: [[J_0:%.*]] = phi i16 [ 0, [[OUTER]] ], [ [[I_0]], [[A]] ]
641 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[J_0]]
642 ; CHECK-NEXT: store i16 2, i16* [[ARRAYIDX]], align 1
643 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[J_0]], 1
644 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[J_0]], 4
645 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[OUTERL]], label [[A]]
647 ; CHECK-NEXT: store i16 1, i16* [[ARRAYIDX]], align 1
648 ; CHECK-NEXT: [[INCX]] = add nuw nsw i16 [[X]], 1
649 ; CHECK-NEXT: [[EXITCONDX:%.*]] = icmp eq i16 [[X]], 4
650 ; CHECK-NEXT: br i1 [[EXITCONDX]], label [[END:%.*]], label [[OUTER]]
652 ; CHECK-NEXT: ret i16 0
658 %x = phi i16 [ 0, %entry ], [ %incx, %outerl ]
659 %c = icmp sgt i16 %x, 2
660 br i1 %c, label %A, label %B
663 %i.0 = phi i16 [ 0, %outer ], [ %inc, %B ]
664 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
668 %j.0 = phi i16 [ 0, %outer ], [ %i.0, %A ]
669 %arrayidx = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %j.0
670 store i16 2, i16* %arrayidx, align 1
671 %inc = add nuw nsw i16 %j.0, 1
672 %exitcond = icmp eq i16 %j.0, 4
673 br i1 %exitcond, label %outerl, label %A
676 store i16 1, i16* %arrayidx, align 1
677 %incx = add nuw nsw i16 %x, 1
678 %exitcondx = icmp eq i16 %x, 4
679 br i1 %exitcondx, label %end, label %outer
685 define i16 @multi_overwrite(i1 %cond) {
686 ; CHECK-LABEL: @multi_overwrite(
688 ; CHECK-NEXT: br label [[DO_BODY:%.*]]
690 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[IF_END2:%.*]] ]
691 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
692 ; CHECK-NEXT: store i16 2, i16* [[ARRAYIDX2]], align 1
693 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[I_0]], 4
694 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[EXIT:%.*]], label [[IF_END:%.*]]
696 ; CHECK-NEXT: br i1 [[COND:%.*]], label [[DO_STORE:%.*]], label [[IF_END2]]
698 ; CHECK-NEXT: store i16 3, i16* [[ARRAYIDX2]], align 1
699 ; CHECK-NEXT: br label [[IF_END2]]
701 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[I_0]], 1
702 ; CHECK-NEXT: br label [[DO_BODY]]
704 ; CHECK-NEXT: store i16 1, i16* [[ARRAYIDX2]], align 1
705 ; CHECK-NEXT: ret i16 0
711 %i.0 = phi i16 [ 0, %entry ], [ %inc, %if.end2 ]
712 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
713 store i16 2, i16* %arrayidx2, align 1
714 %exitcond = icmp eq i16 %i.0, 4
715 br i1 %exitcond, label %exit, label %if.end
718 br i1 %cond, label %do.store, label %if.end2
721 store i16 3, i16* %arrayidx2, align 1
725 %inc = add nuw nsw i16 %i.0, 1
729 store i16 1, i16* %arrayidx2, align 1
733 define void @test(i8* noalias %data1, i8* %data2, i16* %data3, i32 %i1)
734 ; CHECK-LABEL: @test(
735 ; CHECK-NEXT: [[C:%.*]] = icmp eq i32 [[I1:%.*]], 0
736 ; CHECK-NEXT: br label [[PH0:%.*]]
738 ; CHECK-NEXT: br label [[HEADER0:%.*]]
740 ; CHECK-NEXT: [[P1:%.*]] = phi i32 [ 0, [[PH0]] ], [ [[PN1:%.*]], [[END1:%.*]] ]
741 ; CHECK-NEXT: [[PN1]] = add i32 [[P1]], 1
742 ; CHECK-NEXT: [[PC1:%.*]] = icmp slt i32 [[PN1]], 5
743 ; CHECK-NEXT: [[V2:%.*]] = getelementptr [10 x i16], [10 x i16]* @x, i32 0, i32 [[P1]]
744 ; CHECK-NEXT: store i16 1, i16* [[V2]], align 2
745 ; CHECK-NEXT: br i1 [[C]], label [[THEN1:%.*]], label [[ELSE1:%.*]]
747 ; CHECK-NEXT: store i16 2, i16* [[V2]], align 2
748 ; CHECK-NEXT: br label [[END1]]
750 ; CHECK-NEXT: br label [[END1]]
752 ; CHECK-NEXT: br i1 [[PC1]], label [[HEADER0]], label [[END0:%.*]]
754 ; CHECK-NEXT: br label [[HEADER2:%.*]]
756 ; CHECK-NEXT: [[P3:%.*]] = phi i32 [ 0, [[END0]] ], [ [[PN3:%.*]], [[HEADER2]] ]
757 ; CHECK-NEXT: [[PN3]] = add i32 [[P3]], 1
758 ; CHECK-NEXT: [[PC3:%.*]] = icmp slt i32 [[PN3]], 5
759 ; CHECK-NEXT: store i16 4, i16* [[V2]], align 2
760 ; CHECK-NEXT: br i1 [[PC3]], label [[HEADER2]], label [[END2:%.*]]
762 ; CHECK-NEXT: ret void
765 %c = icmp eq i32 %i1, 0
770 %p1 = phi i32 [0, %ph0], [%pn1, %end1]
771 %pn1 = add i32 %p1, 1
772 %pc1 = icmp slt i32 %pn1, 5
773 %v2 = getelementptr [10 x i16], [10 x i16]* @x, i32 0, i32 %p1
774 store i16 1, i16* %v2
775 br i1 %c, label %then1, label %else1
777 store i16 2, i16* %v2
782 br i1 %pc1, label %header0, label %end0
786 %p3 = phi i32 [0, %end0], [%pn3, %header2]
787 %pn3 = add i32 %p3, 1
788 %pc3 = icmp slt i32 %pn3, 5
789 store i16 4, i16* %v2
790 br i1 %pc3, label %header2, label %end2
795 ; Similar to above, but with multiple partial overlaps
796 define i16 @partial_override_fromloop(i1 %c, i32 %i) {
797 ; CHECK-LABEL: @partial_override_fromloop(
799 ; CHECK-NEXT: br label [[DO_BODY:%.*]]
801 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[IF_END2:%.*]] ]
802 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
803 ; CHECK-NEXT: store i16 2, i16* [[ARRAYIDX2]], align 1
804 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[I_0]], 4
805 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[EXIT:%.*]], label [[IF_END:%.*]]
807 ; CHECK-NEXT: br i1 [[C:%.*]], label [[DO_STORE:%.*]], label [[IF_END2]]
809 ; CHECK-NEXT: store i16 3, i16* [[ARRAYIDX2]], align 1
810 ; CHECK-NEXT: br label [[IF_END2]]
812 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[I_0]], 1
813 ; CHECK-NEXT: br label [[DO_BODY]]
815 ; CHECK-NEXT: [[BC:%.*]] = bitcast i16* [[ARRAYIDX2]] to i8*
816 ; CHECK-NEXT: [[BC2:%.*]] = getelementptr inbounds i8, i8* [[BC]], i32 1
817 ; CHECK-NEXT: store i8 10, i8* [[BC]], align 1
818 ; CHECK-NEXT: store i8 11, i8* [[BC2]], align 1
819 ; CHECK-NEXT: ret i16 0
825 %i.0 = phi i16 [ 0, %entry ], [ %inc, %if.end2 ]
826 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
827 store i16 2, i16* %arrayidx2, align 1
828 %exitcond = icmp eq i16 %i.0, 4
829 br i1 %exitcond, label %exit, label %if.end
832 br i1 %c, label %do.store, label %if.end2
835 store i16 3, i16* %arrayidx2, align 1
839 %inc = add nuw nsw i16 %i.0, 1
843 %bc = bitcast i16* %arrayidx2 to i8*
844 %bc2 = getelementptr inbounds i8, i8* %bc, i32 1
845 store i8 10, i8* %bc, align 1
846 store i8 11, i8* %bc2, align 1
851 define i16 @partial_override_overloop(i1 %c, i32 %i) {
852 ; CHECK-LABEL: @partial_override_overloop(
854 ; CHECK-NEXT: br label [[FIRST:%.*]]
856 ; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i32 [[I:%.*]]
857 ; CHECK-NEXT: store i16 1, i16* [[ARRAYIDX]], align 1
858 ; CHECK-NEXT: br label [[DO_BODY:%.*]]
860 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[FIRST]] ], [ [[INC:%.*]], [[DO_BODY]] ]
861 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
862 ; CHECK-NEXT: store i16 2, i16* [[ARRAYIDX2]], align 1
863 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[I_0]], 4
864 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[I_0]], 1
865 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[EXIT:%.*]], label [[DO_BODY]]
867 ; CHECK-NEXT: [[BC:%.*]] = bitcast i16* [[ARRAYIDX]] to i8*
868 ; CHECK-NEXT: [[BC2:%.*]] = getelementptr inbounds i8, i8* [[BC]], i32 1
869 ; CHECK-NEXT: store i8 10, i8* [[BC]], align 1
870 ; CHECK-NEXT: store i8 11, i8* [[BC2]], align 1
871 ; CHECK-NEXT: ret i16 0
874 ; Branch to first so MemoryLoc is not in the entry block.
878 %arrayidx = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i32 %i
879 store i16 1, i16* %arrayidx, align 1
883 %i.0 = phi i16 [ 0, %first ], [ %inc, %do.body ]
884 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
885 store i16 2, i16* %arrayidx2, align 1
886 %exitcond = icmp eq i16 %i.0, 4
887 %inc = add nuw nsw i16 %i.0, 1
888 br i1 %exitcond, label %exit, label %do.body
891 %bc = bitcast i16* %arrayidx to i8*
892 %bc2 = getelementptr inbounds i8, i8* %bc, i32 1
893 store i8 10, i8* %bc, align 1
894 store i8 11, i8* %bc2, align 1
898 define i16 @partial_override_multi(i1 %c, i32 %i) {
899 ; CHECK-LABEL: @partial_override_multi(
901 ; CHECK-NEXT: br label [[DO_BODY:%.*]]
903 ; CHECK-NEXT: [[I_0:%.*]] = phi i16 [ 0, [[ENTRY:%.*]] ], [ [[INC:%.*]], [[DO_BODY]] ]
904 ; CHECK-NEXT: [[ARRAYIDX2:%.*]] = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 [[I_0]]
905 ; CHECK-NEXT: store i16 10, i16* [[ARRAYIDX2]], align 1
906 ; CHECK-NEXT: [[BC:%.*]] = bitcast i16* [[ARRAYIDX2]] to i8*
907 ; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i16 [[I_0]], 4
908 ; CHECK-NEXT: [[INC]] = add nuw nsw i16 [[I_0]], 1
909 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[EXIT:%.*]], label [[DO_BODY]]
911 ; CHECK-NEXT: [[BC2:%.*]] = getelementptr inbounds i8, i8* [[BC]], i32 1
912 ; CHECK-NEXT: store i8 11, i8* [[BC2]], align 1
913 ; CHECK-NEXT: ret i16 0
919 %i.0 = phi i16 [ 0, %entry ], [ %inc, %do.body ]
920 %arrayidx2 = getelementptr inbounds [10 x i16], [10 x i16]* @x, i16 0, i16 %i.0
921 store i16 2, i16* %arrayidx2, align 1
922 %bc = bitcast i16* %arrayidx2 to i8*
923 store i8 10, i8* %bc, align 1
924 %exitcond = icmp eq i16 %i.0, 4
925 %inc = add nuw nsw i16 %i.0, 1
926 br i1 %exitcond, label %exit, label %do.body
929 %bc2 = getelementptr inbounds i8, i8* %bc, i32 1
930 store i8 11, i8* %bc2, align 1
934 define void @InitializeMasks(i64* %p) {
935 ; CHECK-LABEL: @InitializeMasks(
937 ; CHECK-NEXT: br label [[FOR_BODY98:%.*]]
939 ; CHECK-NEXT: [[INDVARS_IV377:%.*]] = phi i64 [ 8, [[ENTRY:%.*]] ], [ [[INC2:%.*]], [[FOR_INC140:%.*]] ], [ [[INC1:%.*]], [[FOR_INC140_THREAD:%.*]] ]
940 ; CHECK-NEXT: [[ARRAYIDX106:%.*]] = getelementptr inbounds i64, i64* [[P:%.*]], i64 [[INDVARS_IV377]]
941 ; CHECK-NEXT: store i64 1, i64* [[ARRAYIDX106]], align 8
942 ; CHECK-NEXT: [[CMP107:%.*]] = icmp ugt i64 [[INDVARS_IV377]], 15
943 ; CHECK-NEXT: br i1 [[CMP107]], label [[IF_END:%.*]], label [[IF_END_THREAD:%.*]]
944 ; CHECK: if.end.thread:
945 ; CHECK-NEXT: br label [[FOR_INC140_THREAD]]
947 ; CHECK-NEXT: store i64 2, i64* [[ARRAYIDX106]], align 8
948 ; CHECK-NEXT: [[CMP127:%.*]] = icmp ult i64 [[INDVARS_IV377]], 48
949 ; CHECK-NEXT: br i1 [[CMP127]], label [[FOR_INC140_THREAD]], label [[FOR_INC140]]
950 ; CHECK: for.inc140.thread:
951 ; CHECK-NEXT: [[INC1]] = add i64 [[INDVARS_IV377]], 1
952 ; CHECK-NEXT: br label [[FOR_BODY98]]
954 ; CHECK-NEXT: [[INC2]] = add i64 [[INDVARS_IV377]], 1
955 ; CHECK-NEXT: [[EXITCOND384_NOT:%.*]] = icmp eq i64 [[INDVARS_IV377]], 56
956 ; CHECK-NEXT: br i1 [[EXITCOND384_NOT]], label [[FOR_INC177:%.*]], label [[FOR_BODY98]]
958 ; CHECK-NEXT: ret void
963 for.body98: ; preds = %for.inc140, %for.inc140.thread, %entry
964 %indvars.iv377 = phi i64 [ 8, %entry ], [ %inc2, %for.inc140 ], [ %inc1, %for.inc140.thread ]
965 %arrayidx106 = getelementptr inbounds i64, i64* %p, i64 %indvars.iv377
966 store i64 1, i64* %arrayidx106, align 8
967 %cmp107 = icmp ugt i64 %indvars.iv377, 15
968 br i1 %cmp107, label %if.end, label %if.end.thread
970 if.end.thread: ; preds = %for.body98
971 br label %for.inc140.thread
973 if.end: ; preds = %for.body98
974 store i64 2, i64* %arrayidx106, align 8
975 %cmp127 = icmp ult i64 %indvars.iv377, 48
976 br i1 %cmp127, label %for.inc140.thread, label %for.inc140
978 for.inc140.thread: ; preds = %if.end, %if.end.thread
979 %inc1 = add i64 %indvars.iv377, 1
982 for.inc140: ; preds = %if.end
983 %inc2 = add i64 %indvars.iv377, 1
984 %exitcond384.not = icmp eq i64 %indvars.iv377, 56
985 br i1 %exitcond384.not, label %for.inc177, label %for.body98
987 for.inc177: ; preds = %for.inc140