llvm.org GIT mirror llvm / 181f7cc
[WebAssembly] Use the default private label prefixes. The MC assembler doesn't like using the empty string as a private label prefix because then it treats all labels as private. This commit reverts back to the default prefix, which is .L, which is common in ELF targets and consistent with the LLVM name mangler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@257083 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 4 years ago
5 changed file(s) with 444 addition(s) and 447 deletion(s). Raw diff Collapse all Expand all
2626
2727 // TODO: What should MaxInstLength be?
2828
29 PrivateGlobalPrefix = "";
30 PrivateLabelPrefix = "";
31
3229 UseDataRegionDirectives = true;
3330
3431 Data8bitsDirective = "\t.int8\t";
1717 ; CHECK-NEXT: br_if
1818 ; CHECK-NOT: br
1919 ; CHECK: call
20 ; CHECK: br BB0_1{{$}}
20 ; CHECK: br .LBB0_1{{$}}
2121 ; CHECK: return{{$}}
2222 ; OPT-LABEL: test0:
2323 ; OPT: loop
2727 ; OPT-NEXT: br_if
2828 ; OPT-NOT: br
2929 ; OPT: call
30 ; OPT: br BB0_1{{$}}
30 ; OPT: br .LBB0_1{{$}}
3131 ; OPT: return{{$}}
3232 define void @test0(i32 %n) {
3333 entry:
5858 ; CHECK-NEXT: br_if
5959 ; CHECK-NOT: br
6060 ; CHECK: call
61 ; CHECK: br BB1_1{{$}}
61 ; CHECK: br .LBB1_1{{$}}
6262 ; CHECK: return{{$}}
6363 ; OPT-LABEL: test1:
6464 ; OPT: loop
6868 ; OPT-NEXT: br_if
6969 ; OPT-NOT: br
7070 ; OPT: call
71 ; OPT: br BB1_1{{$}}
71 ; OPT: br .LBB1_1{{$}}
7272 ; OPT: return{{$}}
7373 define void @test1(i32 %n) {
7474 entry:
9393
9494 ; CHECK-LABEL: test2:
9595 ; CHECK-NOT: local
96 ; CHECK: block BB2_2{{$}}
97 ; CHECK: br_if {{[^,]*}}, BB2_2{{$}}
98 ; CHECK: BB2_1:
99 ; CHECK: br_if ${{[0-9]+}}, BB2_1{{$}}
100 ; CHECK: BB2_2:
96 ; CHECK: block .LBB2_2{{$}}
97 ; CHECK: br_if {{[^,]*}}, .LBB2_2{{$}}
98 ; CHECK: .LBB2_1:
99 ; CHECK: br_if ${{[0-9]+}}, .LBB2_1{{$}}
100 ; CHECK: .LBB2_2:
101101 ; CHECK: return{{$}}
102102 ; OPT-LABEL: test2:
103 ; OPT: block BB2_2{{$}}
104 ; OPT: br_if {{[^,]*}}, BB2_2{{$}}
105 ; OPT: BB2_1:
106 ; OPT: br_if ${{[0-9]+}}, BB2_1{{$}}
107 ; OPT: BB2_2:
103 ; OPT: block .LBB2_2{{$}}
104 ; OPT: br_if {{[^,]*}}, .LBB2_2{{$}}
105 ; OPT: .LBB2_1:
106 ; OPT: br_if ${{[0-9]+}}, .LBB2_1{{$}}
107 ; OPT: .LBB2_2:
108108 ; OPT: return{{$}}
109109 define void @test2(double* nocapture %p, i32 %n) {
110110 entry:
132132 }
133133
134134 ; CHECK-LABEL: doublediamond:
135 ; CHECK: block BB3_5{{$}}
136 ; CHECK: block BB3_2{{$}}
137 ; CHECK: br_if $0, BB3_2{{$}}
138 ; CHECK: block BB3_4{{$}}
139 ; CHECK: br_if $1, BB3_4{{$}}
140 ; CHECK: br BB3_5{{$}}
141 ; CHECK: BB3_4:
142 ; CHECK: BB3_5:
135 ; CHECK: block .LBB3_5{{$}}
136 ; CHECK: block .LBB3_2{{$}}
137 ; CHECK: br_if $0, .LBB3_2{{$}}
138 ; CHECK: block .LBB3_4{{$}}
139 ; CHECK: br_if $1, .LBB3_4{{$}}
140 ; CHECK: br .LBB3_5{{$}}
141 ; CHECK: .LBB3_4:
142 ; CHECK: .LBB3_5:
143143 ; CHECK: return ${{[0-9]+}}{{$}}
144144 ; OPT-LABEL: doublediamond:
145 ; OPT: block BB3_5{{$}}
146 ; OPT: block BB3_4{{$}}
147 ; OPT: br_if {{[^,]*}}, BB3_4{{$}}
148 ; OPT: block BB3_3{{$}}
149 ; OPT: br_if {{[^,]*}}, BB3_3{{$}}
150 ; OPT: br BB3_5{{$}}
151 ; OPT: BB3_4:
152 ; OPT: BB3_5:
145 ; OPT: block .LBB3_5{{$}}
146 ; OPT: block .LBB3_4{{$}}
147 ; OPT: br_if {{[^,]*}}, .LBB3_4{{$}}
148 ; OPT: block .LBB3_3{{$}}
149 ; OPT: br_if {{[^,]*}}, .LBB3_3{{$}}
150 ; OPT: br .LBB3_5{{$}}
151 ; OPT: .LBB3_4:
152 ; OPT: .LBB3_5:
153153 ; OPT: return ${{[0-9]+}}{{$}}
154154 define i32 @doublediamond(i32 %a, i32 %b, i32* %p) {
155155 entry:
175175 }
176176
177177 ; CHECK-LABEL: triangle:
178 ; CHECK: block BB4_2{{$}}
179 ; CHECK: br_if $1, BB4_2{{$}}
180 ; CHECK: BB4_2:
178 ; CHECK: block .LBB4_2{{$}}
179 ; CHECK: br_if $1, .LBB4_2{{$}}
180 ; CHECK: .LBB4_2:
181181 ; CHECK: return ${{[0-9]+}}{{$}}
182182 ; OPT-LABEL: triangle:
183 ; OPT: block BB4_2{{$}}
184 ; OPT: br_if $1, BB4_2{{$}}
185 ; OPT: BB4_2:
183 ; OPT: block .LBB4_2{{$}}
184 ; OPT: br_if $1, .LBB4_2{{$}}
185 ; OPT: .LBB4_2:
186186 ; OPT: return ${{[0-9]+}}{{$}}
187187 define i32 @triangle(i32* %p, i32 %a) {
188188 entry:
198198 }
199199
200200 ; CHECK-LABEL: diamond:
201 ; CHECK: block BB5_3{{$}}
202 ; CHECK: block BB5_2{{$}}
203 ; CHECK: br_if $1, BB5_2{{$}}
204 ; CHECK: br BB5_3{{$}}
205 ; CHECK: BB5_2:
206 ; CHECK: BB5_3:
201 ; CHECK: block .LBB5_3{{$}}
202 ; CHECK: block .LBB5_2{{$}}
203 ; CHECK: br_if $1, .LBB5_2{{$}}
204 ; CHECK: br .LBB5_3{{$}}
205 ; CHECK: .LBB5_2:
206 ; CHECK: .LBB5_3:
207207 ; CHECK: return ${{[0-9]+}}{{$}}
208208 ; OPT-LABEL: diamond:
209 ; OPT: block BB5_3{{$}}
210 ; OPT: block BB5_2{{$}}
211 ; OPT: br_if {{[^,]*}}, BB5_2{{$}}
212 ; OPT: br BB5_3{{$}}
213 ; OPT: BB5_2:
214 ; OPT: BB5_3:
209 ; OPT: block .LBB5_3{{$}}
210 ; OPT: block .LBB5_2{{$}}
211 ; OPT: br_if {{[^,]*}}, .LBB5_2{{$}}
212 ; OPT: br .LBB5_3{{$}}
213 ; OPT: .LBB5_2:
214 ; OPT: .LBB5_3:
215215 ; OPT: return ${{[0-9]+}}{{$}}
216216 define i32 @diamond(i32* %p, i32 %a) {
217217 entry:
243243
244244 ; CHECK-LABEL: minimal_loop:
245245 ; CHECK-NOT: br
246 ; CHECK: BB7_1:
246 ; CHECK: .LBB7_1:
247247 ; CHECK: i32.store $discard=, 0($0), $pop{{[0-9]+}}{{$}}
248 ; CHECK: br BB7_1{{$}}
249 ; CHECK: BB7_2:
248 ; CHECK: br .LBB7_1{{$}}
249 ; CHECK: .LBB7_2:
250250 ; OPT-LABEL: minimal_loop:
251251 ; OPT-NOT: br
252 ; OPT: BB7_1:
252 ; OPT: .LBB7_1:
253253 ; OPT: i32.store $discard=, 0($0), $pop{{[0-9]+}}{{$}}
254 ; OPT: br BB7_1{{$}}
255 ; OPT: BB7_2:
254 ; OPT: br .LBB7_1{{$}}
255 ; OPT: .LBB7_2:
256256 define i32 @minimal_loop(i32* %p) {
257257 entry:
258258 store volatile i32 0, i32* %p
264264
265265 ; CHECK-LABEL: simple_loop:
266266 ; CHECK-NOT: br
267 ; CHECK: BB8_1:
268 ; CHECK: loop BB8_2{{$}}
269 ; CHECK: br_if $pop{{[0-9]+}}, BB8_1{{$}}
270 ; CHECK: BB8_2:
267 ; CHECK: .LBB8_1:
268 ; CHECK: loop .LBB8_2{{$}}
269 ; CHECK: br_if $pop{{[0-9]+}}, .LBB8_1{{$}}
270 ; CHECK: .LBB8_2:
271271 ; CHECK: return ${{[0-9]+}}{{$}}
272272 ; OPT-LABEL: simple_loop:
273273 ; OPT-NOT: br
274 ; OPT: BB8_1:
275 ; OPT: loop BB8_2{{$}}
276 ; OPT: br_if {{[^,]*}}, BB8_1{{$}}
277 ; OPT: BB8_2:
274 ; OPT: .LBB8_1:
275 ; OPT: loop .LBB8_2{{$}}
276 ; OPT: br_if {{[^,]*}}, .LBB8_1{{$}}
277 ; OPT: .LBB8_2:
278278 ; OPT: return ${{[0-9]+}}{{$}}
279279 define i32 @simple_loop(i32* %p, i32 %a) {
280280 entry:
290290 }
291291
292292 ; CHECK-LABEL: doubletriangle:
293 ; CHECK: block BB9_4{{$}}
294 ; CHECK: br_if $0, BB9_4{{$}}
295 ; CHECK: block BB9_3{{$}}
296 ; CHECK: br_if $1, BB9_3{{$}}
297 ; CHECK: BB9_3:
298 ; CHECK: BB9_4:
293 ; CHECK: block .LBB9_4{{$}}
294 ; CHECK: br_if $0, .LBB9_4{{$}}
295 ; CHECK: block .LBB9_3{{$}}
296 ; CHECK: br_if $1, .LBB9_3{{$}}
297 ; CHECK: .LBB9_3:
298 ; CHECK: .LBB9_4:
299299 ; CHECK: return ${{[0-9]+}}{{$}}
300300 ; OPT-LABEL: doubletriangle:
301 ; OPT: block BB9_4{{$}}
302 ; OPT: br_if $0, BB9_4{{$}}
303 ; OPT: block BB9_3{{$}}
304 ; OPT: br_if $1, BB9_3{{$}}
305 ; OPT: BB9_3:
306 ; OPT: BB9_4:
301 ; OPT: block .LBB9_4{{$}}
302 ; OPT: br_if $0, .LBB9_4{{$}}
303 ; OPT: block .LBB9_3{{$}}
304 ; OPT: br_if $1, .LBB9_3{{$}}
305 ; OPT: .LBB9_3:
306 ; OPT: .LBB9_4:
307307 ; OPT: return ${{[0-9]+}}{{$}}
308308 define i32 @doubletriangle(i32 %a, i32 %b, i32* %p) {
309309 entry:
326326 }
327327
328328 ; CHECK-LABEL: ifelse_earlyexits:
329 ; CHECK: block BB10_4{{$}}
330 ; CHECK: block BB10_2{{$}}
331 ; CHECK: br_if $0, BB10_2{{$}}
332 ; CHECK: br BB10_4{{$}}
333 ; CHECK: BB10_2:
334 ; CHECK: br_if $1, BB10_4{{$}}
335 ; CHECK: BB10_4:
329 ; CHECK: block .LBB10_4{{$}}
330 ; CHECK: block .LBB10_2{{$}}
331 ; CHECK: br_if $0, .LBB10_2{{$}}
332 ; CHECK: br .LBB10_4{{$}}
333 ; CHECK: .LBB10_2:
334 ; CHECK: br_if $1, .LBB10_4{{$}}
335 ; CHECK: .LBB10_4:
336336 ; CHECK: return ${{[0-9]+}}{{$}}
337337 ; OPT-LABEL: ifelse_earlyexits:
338 ; OPT: block BB10_4{{$}}
339 ; OPT: block BB10_3{{$}}
340 ; OPT: br_if {{[^,]*}}, BB10_3{{$}}
341 ; OPT: br_if $1, BB10_4{{$}}
342 ; OPT: br BB10_4{{$}}
343 ; OPT: BB10_3:
344 ; OPT: BB10_4:
338 ; OPT: block .LBB10_4{{$}}
339 ; OPT: block .LBB10_3{{$}}
340 ; OPT: br_if {{[^,]*}}, .LBB10_3{{$}}
341 ; OPT: br_if $1, .LBB10_4{{$}}
342 ; OPT: br .LBB10_4{{$}}
343 ; OPT: .LBB10_3:
344 ; OPT: .LBB10_4:
345345 ; OPT: return ${{[0-9]+}}{{$}}
346346 define i32 @ifelse_earlyexits(i32 %a, i32 %b, i32* %p) {
347347 entry:
364364 }
365365
366366 ; CHECK-LABEL: doublediamond_in_a_loop:
367 ; CHECK: BB11_1:
368 ; CHECK: loop BB11_7{{$}}
369 ; CHECK: block BB11_6{{$}}
370 ; CHECK: block BB11_3{{$}}
371 ; CHECK: br_if $0, BB11_3{{$}}
372 ; CHECK: br BB11_6{{$}}
373 ; CHECK: BB11_3:
374 ; CHECK: block BB11_5{{$}}
375 ; CHECK: br_if $1, BB11_5{{$}}
376 ; CHECK: br BB11_6{{$}}
377 ; CHECK: BB11_5:
378 ; CHECK: BB11_6:
379 ; CHECK: br BB11_1{{$}}
380 ; CHECK: BB11_7:
367 ; CHECK: .LBB11_1:
368 ; CHECK: loop .LBB11_7{{$}}
369 ; CHECK: block .LBB11_6{{$}}
370 ; CHECK: block .LBB11_3{{$}}
371 ; CHECK: br_if $0, .LBB11_3{{$}}
372 ; CHECK: br .LBB11_6{{$}}
373 ; CHECK: .LBB11_3:
374 ; CHECK: block .LBB11_5{{$}}
375 ; CHECK: br_if $1, .LBB11_5{{$}}
376 ; CHECK: br .LBB11_6{{$}}
377 ; CHECK: .LBB11_5:
378 ; CHECK: .LBB11_6:
379 ; CHECK: br .LBB11_1{{$}}
380 ; CHECK: .LBB11_7:
381381 ; OPT-LABEL: doublediamond_in_a_loop:
382 ; OPT: BB11_1:
383 ; OPT: loop BB11_7{{$}}
384 ; OPT: block BB11_6{{$}}
385 ; OPT: block BB11_5{{$}}
386 ; OPT: br_if {{[^,]*}}, BB11_5{{$}}
387 ; OPT: block BB11_4{{$}}
388 ; OPT: br_if {{[^,]*}}, BB11_4{{$}}
389 ; OPT: br BB11_6{{$}}
390 ; OPT: BB11_4:
391 ; OPT: br BB11_6{{$}}
392 ; OPT: BB11_5:
393 ; OPT: BB11_6:
394 ; OPT: br BB11_1{{$}}
395 ; OPT: BB11_7:
382 ; OPT: .LBB11_1:
383 ; OPT: loop .LBB11_7{{$}}
384 ; OPT: block .LBB11_6{{$}}
385 ; OPT: block .LBB11_5{{$}}
386 ; OPT: br_if {{[^,]*}}, .LBB11_5{{$}}
387 ; OPT: block .LBB11_4{{$}}
388 ; OPT: br_if {{[^,]*}}, .LBB11_4{{$}}
389 ; OPT: br .LBB11_6{{$}}
390 ; OPT: .LBB11_4:
391 ; OPT: br .LBB11_6{{$}}
392 ; OPT: .LBB11_5:
393 ; OPT: .LBB11_6:
394 ; OPT: br .LBB11_1{{$}}
395 ; OPT: .LBB11_7:
396396 define i32 @doublediamond_in_a_loop(i32 %a, i32 %b, i32* %p) {
397397 entry:
398398 br label %header
423423 ; CHECK-LABEL: test3:
424424 ; CHECK: loop
425425 ; CHECK-NEXT: br_if
426 ; CHECK-NEXT: BB{{[0-9]+}}_{{[0-9]+}}:
426 ; CHECK-NEXT: .LBB{{[0-9]+}}_{{[0-9]+}}:
427427 ; CHECK-NEXT: loop
428428 ; OPT-LABEL: test3:
429429 ; OPT: loop
430430 ; OPT-NEXT: br_if
431 ; OPT-NEXT: BB{{[0-9]+}}_{{[0-9]+}}:
431 ; OPT-NEXT: .LBB{{[0-9]+}}_{{[0-9]+}}:
432432 ; OPT-NEXT: loop
433433 declare void @bar()
434434 define void @test3(i32 %w) {
461461
462462 ; CHECK-LABEL: test4:
463463 ; CHECK-NEXT: .param i32{{$}}
464 ; CHECK: block BB13_8{{$}}
465 ; CHECK-NEXT: block BB13_7{{$}}
466 ; CHECK-NEXT: block BB13_4{{$}}
467 ; CHECK: br_if $pop{{[0-9]*}}, BB13_4{{$}}
468 ; CHECK-NEXT: block BB13_3{{$}}
469 ; CHECK: br_if $pop{{[0-9]*}}, BB13_3{{$}}
470 ; CHECK: br_if $pop{{[0-9]*}}, BB13_7{{$}}
471 ; CHECK-NEXT: BB13_3:
464 ; CHECK: block .LBB13_8{{$}}
465 ; CHECK-NEXT: block .LBB13_7{{$}}
466 ; CHECK-NEXT: block .LBB13_4{{$}}
467 ; CHECK: br_if $pop{{[0-9]*}}, .LBB13_4{{$}}
468 ; CHECK-NEXT: block .LBB13_3{{$}}
469 ; CHECK: br_if $pop{{[0-9]*}}, .LBB13_3{{$}}
470 ; CHECK: br_if $pop{{[0-9]*}}, .LBB13_7{{$}}
471 ; CHECK-NEXT: .LBB13_3:
472472 ; CHECK-NEXT: return{{$}}
473 ; CHECK-NEXT: BB13_4:
474 ; CHECK: br_if $pop{{[0-9]*}}, BB13_8{{$}}
475 ; CHECK: br_if $pop{{[0-9]*}}, BB13_7{{$}}
473 ; CHECK-NEXT: .LBB13_4:
474 ; CHECK: br_if $pop{{[0-9]*}}, .LBB13_8{{$}}
475 ; CHECK: br_if $pop{{[0-9]*}}, .LBB13_7{{$}}
476476 ; CHECK-NEXT: return{{$}}
477 ; CHECK-NEXT: BB13_7:
477 ; CHECK-NEXT: .LBB13_7:
478478 ; CHECK-NEXT: return{{$}}
479 ; CHECK-NEXT: BB13_8:
479 ; CHECK-NEXT: .LBB13_8:
480480 ; CHECK-NEXT: return{{$}}
481481 ; OPT-LABEL: test4:
482482 ; OPT-NEXT: .param i32{{$}}
483 ; OPT: block BB13_8{{$}}
484 ; OPT-NEXT: block BB13_7{{$}}
485 ; OPT-NEXT: block BB13_4{{$}}
486 ; OPT: br_if $pop{{[0-9]*}}, BB13_4{{$}}
487 ; OPT-NEXT: block BB13_3{{$}}
488 ; OPT: br_if $pop{{[0-9]*}}, BB13_3{{$}}
489 ; OPT: br_if $pop{{[0-9]*}}, BB13_7{{$}}
490 ; OPT-NEXT: BB13_3:
483 ; OPT: block .LBB13_8{{$}}
484 ; OPT-NEXT: block .LBB13_7{{$}}
485 ; OPT-NEXT: block .LBB13_4{{$}}
486 ; OPT: br_if $pop{{[0-9]*}}, .LBB13_4{{$}}
487 ; OPT-NEXT: block .LBB13_3{{$}}
488 ; OPT: br_if $pop{{[0-9]*}}, .LBB13_3{{$}}
489 ; OPT: br_if $pop{{[0-9]*}}, .LBB13_7{{$}}
490 ; OPT-NEXT: .LBB13_3:
491491 ; OPT-NEXT: return{{$}}
492 ; OPT-NEXT: BB13_4:
493 ; OPT: br_if $pop{{[0-9]*}}, BB13_8{{$}}
494 ; OPT: br_if $pop{{[0-9]*}}, BB13_7{{$}}
492 ; OPT-NEXT: .LBB13_4:
493 ; OPT: br_if $pop{{[0-9]*}}, .LBB13_8{{$}}
494 ; OPT: br_if $pop{{[0-9]*}}, .LBB13_7{{$}}
495495 ; OPT-NEXT: return{{$}}
496 ; OPT-NEXT: BB13_7:
496 ; OPT-NEXT: .LBB13_7:
497497 ; OPT-NEXT: return{{$}}
498 ; OPT-NEXT: BB13_8:
498 ; OPT-NEXT: .LBB13_8:
499499 ; OPT-NEXT: return{{$}}
500500 define void @test4(i32 %t) {
501501 entry:
523523 ; same basic block.
524524
525525 ; CHECK-LABEL: test5:
526 ; CHECK: BB14_1:
527 ; CHECK-NEXT: block BB14_4{{$}}
528 ; CHECK-NEXT: loop BB14_3{{$}}
529 ; CHECK: br_if {{[^,]*}}, BB14_4{{$}}
530 ; CHECK: br_if {{[^,]*}}, BB14_1{{$}}
531 ; CHECK-NEXT: BB14_3:
526 ; CHECK: .LBB14_1:
527 ; CHECK-NEXT: block .LBB14_4{{$}}
528 ; CHECK-NEXT: loop .LBB14_3{{$}}
529 ; CHECK: br_if {{[^,]*}}, .LBB14_4{{$}}
530 ; CHECK: br_if {{[^,]*}}, .LBB14_1{{$}}
531 ; CHECK-NEXT: .LBB14_3:
532532 ; CHECK: return{{$}}
533 ; CHECK-NEXT: BB14_4:
533 ; CHECK-NEXT: .LBB14_4:
534534 ; CHECK: return{{$}}
535535 ; OPT-LABEL: test5:
536 ; OPT: BB14_1:
537 ; OPT-NEXT: block BB14_4{{$}}
538 ; OPT-NEXT: loop BB14_3{{$}}
539 ; OPT: br_if {{[^,]*}}, BB14_4{{$}}
540 ; OPT: br_if {{[^,]*}}, BB14_1{{$}}
541 ; OPT-NEXT: BB14_3:
536 ; OPT: .LBB14_1:
537 ; OPT-NEXT: block .LBB14_4{{$}}
538 ; OPT-NEXT: loop .LBB14_3{{$}}
539 ; OPT: br_if {{[^,]*}}, .LBB14_4{{$}}
540 ; OPT: br_if {{[^,]*}}, .LBB14_1{{$}}
541 ; OPT-NEXT: .LBB14_3:
542542 ; OPT: return{{$}}
543 ; OPT-NEXT: BB14_4:
543 ; OPT-NEXT: .LBB14_4:
544544 ; OPT: return{{$}}
545545 define void @test5(i1 %p, i1 %q) {
546546 entry:
568568 ; which has another predecessor.
569569
570570 ; CHECK-LABEL: test6:
571 ; CHECK: BB15_1:
572 ; CHECK-NEXT: block BB15_6{{$}}
573 ; CHECK-NEXT: block BB15_5{{$}}
574 ; CHECK-NEXT: loop BB15_4{{$}}
575 ; CHECK-NOT: block
576 ; CHECK: br_if {{[^,]*}}, BB15_6{{$}}
577 ; CHECK-NOT: block
578 ; CHECK: br_if {{[^,]*}}, BB15_5{{$}}
579 ; CHECK-NOT: block
580 ; CHECK: br_if {{[^,]*}}, BB15_1{{$}}
581 ; CHECK-NEXT: BB15_4:
571 ; CHECK: .LBB15_1:
572 ; CHECK-NEXT: block .LBB15_6{{$}}
573 ; CHECK-NEXT: block .LBB15_5{{$}}
574 ; CHECK-NEXT: loop .LBB15_4{{$}}
575 ; CHECK-NOT: block
576 ; CHECK: br_if {{[^,]*}}, .LBB15_6{{$}}
577 ; CHECK-NOT: block
578 ; CHECK: br_if {{[^,]*}}, .LBB15_5{{$}}
579 ; CHECK-NOT: block
580 ; CHECK: br_if {{[^,]*}}, .LBB15_1{{$}}
581 ; CHECK-NEXT: .LBB15_4:
582582 ; CHECK-NOT: block
583583 ; CHECK: return{{$}}
584 ; CHECK-NEXT: BB15_5:
585 ; CHECK-NOT: block
586 ; CHECK: BB15_6:
584 ; CHECK-NEXT: .LBB15_5:
585 ; CHECK-NOT: block
586 ; CHECK: .LBB15_6:
587587 ; CHECK-NOT: block
588588 ; CHECK: return{{$}}
589589 ; OPT-LABEL: test6:
590 ; OPT: BB15_1:
591 ; OPT-NEXT: block BB15_6{{$}}
592 ; OPT-NEXT: block BB15_5{{$}}
593 ; OPT-NEXT: loop BB15_4{{$}}
594 ; OPT-NOT: block
595 ; OPT: br_if {{[^,]*}}, BB15_6{{$}}
596 ; OPT-NOT: block
597 ; OPT: br_if {{[^,]*}}, BB15_5{{$}}
598 ; OPT-NOT: block
599 ; OPT: br_if {{[^,]*}}, BB15_1{{$}}
600 ; OPT-NEXT: BB15_4:
590 ; OPT: .LBB15_1:
591 ; OPT-NEXT: block .LBB15_6{{$}}
592 ; OPT-NEXT: block .LBB15_5{{$}}
593 ; OPT-NEXT: loop .LBB15_4{{$}}
594 ; OPT-NOT: block
595 ; OPT: br_if {{[^,]*}}, .LBB15_6{{$}}
596 ; OPT-NOT: block
597 ; OPT: br_if {{[^,]*}}, .LBB15_5{{$}}
598 ; OPT-NOT: block
599 ; OPT: br_if {{[^,]*}}, .LBB15_1{{$}}
600 ; OPT-NEXT: .LBB15_4:
601601 ; OPT-NOT: block
602602 ; OPT: return{{$}}
603 ; OPT-NEXT: BB15_5:
604 ; OPT-NOT: block
605 ; OPT: BB15_6:
603 ; OPT-NEXT: .LBB15_5:
604 ; OPT-NOT: block
605 ; OPT: .LBB15_6:
606606 ; OPT-NOT: block
607607 ; OPT: return{{$}}
608608 define void @test6(i1 %p, i1 %q) {
638638 ; that end in unreachable.
639639
640640 ; CHECK-LABEL: test7:
641 ; CHECK: BB16_1:
642 ; CHECK-NEXT: loop BB16_5{{$}}
643 ; CHECK-NOT: block
644 ; CHECK: block BB16_4{{$}}
645 ; CHECK: br_if {{[^,]*}}, BB16_4{{$}}
646 ; CHECK-NOT: block
647 ; CHECK: br_if {{[^,]*}}, BB16_1{{$}}
641 ; CHECK: .LBB16_1:
642 ; CHECK-NEXT: loop .LBB16_5{{$}}
643 ; CHECK-NOT: block
644 ; CHECK: block .LBB16_4{{$}}
645 ; CHECK: br_if {{[^,]*}}, .LBB16_4{{$}}
646 ; CHECK-NOT: block
647 ; CHECK: br_if {{[^,]*}}, .LBB16_1{{$}}
648648 ; CHECK-NOT: block
649649 ; CHECK: unreachable
650 ; CHECK_NEXT: BB16_4:
651 ; CHECK-NOT: block
652 ; CHECK: br_if {{[^,]*}}, BB16_1{{$}}
653 ; CHECK-NEXT: BB16_5:
650 ; CHECK_NEXT: .LBB16_4:
651 ; CHECK-NOT: block
652 ; CHECK: br_if {{[^,]*}}, .LBB16_1{{$}}
653 ; CHECK-NEXT: .LBB16_5:
654654 ; CHECK-NOT: block
655655 ; CHECK: unreachable
656656 ; OPT-LABEL: test7:
657 ; OPT: BB16_1:
658 ; OPT-NEXT: loop BB16_5{{$}}
659 ; OPT-NOT: block
660 ; OPT: block BB16_4{{$}}
661 ; OPT-NOT: block
662 ; OPT: br_if {{[^,]*}}, BB16_4{{$}}
663 ; OPT-NOT: block
664 ; OPT: br_if {{[^,]*}}, BB16_1{{$}}
657 ; OPT: .LBB16_1:
658 ; OPT-NEXT: loop .LBB16_5{{$}}
659 ; OPT-NOT: block
660 ; OPT: block .LBB16_4{{$}}
661 ; OPT-NOT: block
662 ; OPT: br_if {{[^,]*}}, .LBB16_4{{$}}
663 ; OPT-NOT: block
664 ; OPT: br_if {{[^,]*}}, .LBB16_1{{$}}
665665 ; OPT-NOT: block
666666 ; OPT: unreachable
667 ; OPT_NEXT: BB16_4:
668 ; OPT-NOT: block
669 ; OPT: br_if {{[^,]*}}, BB16_1{{$}}
670 ; OPT-NEXT: BB16_5:
667 ; OPT_NEXT: .LBB16_4:
668 ; OPT-NOT: block
669 ; OPT: br_if {{[^,]*}}, .LBB16_1{{$}}
670 ; OPT-NEXT: .LBB16_5:
671671 ; OPT-NOT: block
672672 ; OPT: unreachable
673673 define void @test7(i1 %tobool2, i1 %tobool9) {
699699 ; Test an interesting case using nested loops and switches.
700700
701701 ; CHECK-LABEL: test8:
702 ; CHECK: BB17_1:
703 ; CHECK-NEXT: loop BB17_4{{$}}
704 ; CHECK-NEXT: block BB17_3{{$}}
705 ; CHECK-NOT: block
706 ; CHECK: br_if {{[^,]*}}, BB17_3{{$}}
707 ; CHECK-NOT: block
708 ; CHECK: br_if {{[^,]*}}, BB17_1{{$}}
709 ; CHECK-NEXT: BB17_3:
710 ; CHECK-NEXT: loop BB17_4{{$}}
711 ; CHECK-NEXT: br_if {{[^,]*}}, BB17_3{{$}}
712 ; CHECK-NEXT: br BB17_1{{$}}
713 ; CHECK-NEXT: BB17_4:
702 ; CHECK: .LBB17_1:
703 ; CHECK-NEXT: loop .LBB17_4{{$}}
704 ; CHECK-NEXT: block .LBB17_3{{$}}
705 ; CHECK-NOT: block
706 ; CHECK: br_if {{[^,]*}}, .LBB17_3{{$}}
707 ; CHECK-NOT: block
708 ; CHECK: br_if {{[^,]*}}, .LBB17_1{{$}}
709 ; CHECK-NEXT: .LBB17_3:
710 ; CHECK-NEXT: loop .LBB17_4{{$}}
711 ; CHECK-NEXT: br_if {{[^,]*}}, .LBB17_3{{$}}
712 ; CHECK-NEXT: br .LBB17_1{{$}}
713 ; CHECK-NEXT: .LBB17_4:
714714 ; OPT-LABEL: test8:
715 ; OPT: BB17_1:
716 ; OPT-NEXT: loop BB17_4{{$}}
717 ; OPT-NEXT: block BB17_3{{$}}
718 ; OPT-NOT: block
719 ; OPT: br_if {{[^,]*}}, BB17_3{{$}}
720 ; OPT-NOT: block
721 ; OPT: br_if {{[^,]*}}, BB17_1{{$}}
722 ; OPT-NEXT: BB17_3:
723 ; OPT-NEXT: loop BB17_4{{$}}
724 ; OPT-NEXT: br_if {{[^,]*}}, BB17_3{{$}}
725 ; OPT-NEXT: br BB17_1{{$}}
726 ; OPT-NEXT: BB17_4:
715 ; OPT: .LBB17_1:
716 ; OPT-NEXT: loop .LBB17_4{{$}}
717 ; OPT-NEXT: block .LBB17_3{{$}}
718 ; OPT-NOT: block
719 ; OPT: br_if {{[^,]*}}, .LBB17_3{{$}}
720 ; OPT-NOT: block
721 ; OPT: br_if {{[^,]*}}, .LBB17_1{{$}}
722 ; OPT-NEXT: .LBB17_3:
723 ; OPT-NEXT: loop .LBB17_4{{$}}
724 ; OPT-NEXT: br_if {{[^,]*}}, .LBB17_3{{$}}
725 ; OPT-NEXT: br .LBB17_1{{$}}
726 ; OPT-NEXT: .LBB17_4:
727727 define i32 @test8() {
728728 bb:
729729 br label %bb1
745745 ; Test an interesting case using nested loops that share a bottom block.
746746
747747 ; CHECK-LABEL: test9:
748 ; CHECK: BB18_1:
749 ; CHECK-NEXT: loop BB18_5{{$}}
750 ; CHECK-NOT: block
751 ; CHECK: br_if {{[^,]*}}, BB18_5{{$}}
752 ; CHECK-NEXT: BB18_2:
753 ; CHECK-NEXT: loop BB18_5{{$}}
754 ; CHECK-NOT: block
755 ; CHECK: block BB18_4{{$}}
756 ; CHECK-NOT: block
757 ; CHECK: br_if {{[^,]*}}, BB18_4{{$}}
758 ; CHECK-NOT: block
759 ; CHECK: br_if {{[^,]*}}, BB18_2{{$}}
760 ; CHECK-NEXT: br BB18_1{{$}}
761 ; CHECK-NEXT: BB18_4:
762 ; CHECK-NOT: block
763 ; CHECK: br_if {{[^,]*}}, BB18_2{{$}}
764 ; CHECK-NEXT: br BB18_1{{$}}
765 ; CHECK-NEXT: BB18_5:
748 ; CHECK: .LBB18_1:
749 ; CHECK-NEXT: loop .LBB18_5{{$}}
750 ; CHECK-NOT: block
751 ; CHECK: br_if {{[^,]*}}, .LBB18_5{{$}}
752 ; CHECK-NEXT: .LBB18_2:
753 ; CHECK-NEXT: loop .LBB18_5{{$}}
754 ; CHECK-NOT: block
755 ; CHECK: block .LBB18_4{{$}}
756 ; CHECK-NOT: block
757 ; CHECK: br_if {{[^,]*}}, .LBB18_4{{$}}
758 ; CHECK-NOT: block
759 ; CHECK: br_if {{[^,]*}}, .LBB18_2{{$}}
760 ; CHECK-NEXT: br .LBB18_1{{$}}
761 ; CHECK-NEXT: .LBB18_4:
762 ; CHECK-NOT: block
763 ; CHECK: br_if {{[^,]*}}, .LBB18_2{{$}}
764 ; CHECK-NEXT: br .LBB18_1{{$}}
765 ; CHECK-NEXT: .LBB18_5:
766766 ; CHECK-NOT: block
767767 ; CHECK: return{{$}}
768768 ; OPT-LABEL: test9:
769 ; OPT: BB18_1:
770 ; OPT-NEXT: loop BB18_5{{$}}
771 ; OPT-NOT: block
772 ; OPT: br_if {{[^,]*}}, BB18_5{{$}}
773 ; OPT-NEXT: BB18_2:
774 ; OPT-NEXT: loop BB18_5{{$}}
775 ; OPT-NOT: block
776 ; OPT: block BB18_4{{$}}
777 ; OPT-NOT: block
778 ; OPT: br_if {{[^,]*}}, BB18_4{{$}}
779 ; OPT-NOT: block
780 ; OPT: br_if {{[^,]*}}, BB18_2{{$}}
781 ; OPT-NEXT: br BB18_1{{$}}
782 ; OPT-NEXT: BB18_4:
783 ; OPT-NOT: block
784 ; OPT: br_if {{[^,]*}}, BB18_2{{$}}
785 ; OPT-NEXT: br BB18_1{{$}}
786 ; OPT-NEXT: BB18_5:
769 ; OPT: .LBB18_1:
770 ; OPT-NEXT: loop .LBB18_5{{$}}
771 ; OPT-NOT: block
772 ; OPT: br_if {{[^,]*}}, .LBB18_5{{$}}
773 ; OPT-NEXT: .LBB18_2:
774 ; OPT-NEXT: loop .LBB18_5{{$}}
775 ; OPT-NOT: block
776 ; OPT: block .LBB18_4{{$}}
777 ; OPT-NOT: block
778 ; OPT: br_if {{[^,]*}}, .LBB18_4{{$}}
779 ; OPT-NOT: block
780 ; OPT: br_if {{[^,]*}}, .LBB18_2{{$}}
781 ; OPT-NEXT: br .LBB18_1{{$}}
782 ; OPT-NEXT: .LBB18_4:
783 ; OPT-NOT: block
784 ; OPT: br_if {{[^,]*}}, .LBB18_2{{$}}
785 ; OPT-NEXT: br .LBB18_1{{$}}
786 ; OPT-NEXT: .LBB18_5:
787787 ; OPT-NOT: block
788788 ; OPT: return{{$}}
789789 declare i1 @a()
821821 ; and loop exits to a block with unreachable.
822822
823823 ; CHECK-LABEL: test10:
824 ; CHECK: BB19_1:
825 ; CHECK-NEXT: loop BB19_7{{$}}
826 ; CHECK-NOT: block
827 ; CHECK: br_if {{[^,]*}}, BB19_1{{$}}
828 ; CHECK-NEXT: BB19_2:
829 ; CHECK-NEXT: block BB19_6{{$}}
830 ; CHECK-NEXT: loop BB19_5{{$}}
831 ; CHECK-NOT: block
832 ; CHECK: BB19_3:
833 ; CHECK-NEXT: loop BB19_5{{$}}
834 ; CHECK-NOT: block
835 ; CHECK: br_if {{[^,]*}}, BB19_1{{$}}
836 ; CHECK-NOT: block
837 ; CHECK: tableswitch {{[^,]*}}, BB19_3, BB19_3, BB19_5, BB19_1, BB19_2, BB19_6{{$}}
838 ; CHECK-NEXT: BB19_5:
824 ; CHECK: .LBB19_1:
825 ; CHECK-NEXT: loop .LBB19_7{{$}}
826 ; CHECK-NOT: block
827 ; CHECK: br_if {{[^,]*}}, .LBB19_1{{$}}
828 ; CHECK-NEXT: .LBB19_2:
829 ; CHECK-NEXT: block .LBB19_6{{$}}
830 ; CHECK-NEXT: loop .LBB19_5{{$}}
831 ; CHECK-NOT: block
832 ; CHECK: .LBB19_3:
833 ; CHECK-NEXT: loop .LBB19_5{{$}}
834 ; CHECK-NOT: block
835 ; CHECK: br_if {{[^,]*}}, .LBB19_1{{$}}
836 ; CHECK-NOT: block
837 ; CHECK: tableswitch {{[^,]*}}, .LBB19_3, .LBB19_3, .LBB19_5, .LBB19_1, .LBB19_2, .LBB19_6{{$}}
838 ; CHECK-NEXT: .LBB19_5:
839839 ; CHECK-NEXT: return{{$}}
840 ; CHECK-NEXT: BB19_6:
841 ; CHECK-NOT: block
842 ; CHECK: br BB19_1{{$}}
843 ; CHECK-NEXT: BB19_7:
840 ; CHECK-NEXT: .LBB19_6:
841 ; CHECK-NOT: block
842 ; CHECK: br .LBB19_1{{$}}
843 ; CHECK-NEXT: .LBB19_7:
844844 ; OPT-LABEL: test10:
845 ; OPT: BB19_1:
846 ; OPT-NEXT: loop BB19_7{{$}}
847 ; OPT-NOT: block
848 ; OPT: br_if {{[^,]*}}, BB19_1{{$}}
849 ; OPT-NEXT: BB19_2:
850 ; OPT-NEXT: block BB19_6{{$}}
851 ; OPT-NEXT: loop BB19_5{{$}}
852 ; OPT-NOT: block
853 ; OPT: BB19_3:
854 ; OPT-NEXT: loop BB19_5{{$}}
855 ; OPT-NOT: block
856 ; OPT: br_if {{[^,]*}}, BB19_1{{$}}
857 ; OPT-NOT: block
858 ; OPT: tableswitch {{[^,]*}}, BB19_3, BB19_3, BB19_5, BB19_1, BB19_2, BB19_6{{$}}
859 ; OPT-NEXT: BB19_5:
845 ; OPT: .LBB19_1:
846 ; OPT-NEXT: loop .LBB19_7{{$}}
847 ; OPT-NOT: block
848 ; OPT: br_if {{[^,]*}}, .LBB19_1{{$}}
849 ; OPT-NEXT: .LBB19_2:
850 ; OPT-NEXT: block .LBB19_6{{$}}
851 ; OPT-NEXT: loop .LBB19_5{{$}}
852 ; OPT-NOT: block
853 ; OPT: .LBB19_3:
854 ; OPT-NEXT: loop .LBB19_5{{$}}
855 ; OPT-NOT: block
856 ; OPT: br_if {{[^,]*}}, .LBB19_1{{$}}
857 ; OPT-NOT: block
858 ; OPT: tableswitch {{[^,]*}}, .LBB19_3, .LBB19_3, .LBB19_5, .LBB19_1, .LBB19_2, .LBB19_6{{$}}
859 ; OPT-NEXT: .LBB19_5:
860860 ; OPT-NEXT: return{{$}}
861 ; OPT-NEXT: BB19_6:
862 ; OPT-NOT: block
863 ; OPT: br BB19_1{{$}}
864 ; OPT-NEXT: BB19_7:
861 ; OPT-NEXT: .LBB19_6:
862 ; OPT-NOT: block
863 ; OPT: br .LBB19_1{{$}}
864 ; OPT-NEXT: .LBB19_7:
865865 define void @test10() {
866866 bb0:
867867 br label %bb1
900900 ; Test a CFG DAG with interesting merging.
901901
902902 ; CHECK-LABEL: test11:
903 ; CHECK: block BB20_8{{$}}
904 ; CHECK-NEXT: block BB20_7{{$}}
905 ; CHECK-NEXT: block BB20_6{{$}}
906 ; CHECK-NEXT: block BB20_4{{$}}
907 ; CHECK-NEXT: br_if {{[^,]*}}, BB20_4{{$}}
908 ; CHECK-NOT: block
909 ; CHECK: block BB20_3{{$}}
910 ; CHECK: br_if {{[^,]*}}, BB20_3{{$}}
911 ; CHECK-NOT: block
912 ; CHECK: br_if {{[^,]*}}, BB20_6{{$}}
913 ; CHECK-NEXT: BB20_3:
903 ; CHECK: block .LBB20_8{{$}}
904 ; CHECK-NEXT: block .LBB20_7{{$}}
905 ; CHECK-NEXT: block .LBB20_6{{$}}
906 ; CHECK-NEXT: block .LBB20_4{{$}}
907 ; CHECK-NEXT: br_if {{[^,]*}}, .LBB20_4{{$}}
908 ; CHECK-NOT: block
909 ; CHECK: block .LBB20_3{{$}}
910 ; CHECK: br_if {{[^,]*}}, .LBB20_3{{$}}
911 ; CHECK-NOT: block
912 ; CHECK: br_if {{[^,]*}}, .LBB20_6{{$}}
913 ; CHECK-NEXT: .LBB20_3:
914914 ; CHECK-NOT: block
915915 ; CHECK: return{{$}}
916 ; CHECK-NEXT: BB20_4:
917 ; CHECK-NOT: block
918 ; CHECK: br_if {{[^,]*}}, BB20_8{{$}}
919 ; CHECK-NOT: block
920 ; CHECK: br_if {{[^,]*}}, BB20_7{{$}}
921 ; CHECK-NEXT: BB20_6:
916 ; CHECK-NEXT: .LBB20_4:
917 ; CHECK-NOT: block
918 ; CHECK: br_if {{[^,]*}}, .LBB20_8{{$}}
919 ; CHECK-NOT: block
920 ; CHECK: br_if {{[^,]*}}, .LBB20_7{{$}}
921 ; CHECK-NEXT: .LBB20_6:
922922 ; CHECK-NOT: block
923923 ; CHECK: return{{$}}
924 ; CHECK-NEXT: BB20_7:
924 ; CHECK-NEXT: .LBB20_7:
925925 ; CHECK-NOT: block
926926 ; CHECK: return{{$}}
927 ; CHECK-NEXT: BB20_8:
927 ; CHECK-NEXT: .LBB20_8:
928928 ; CHECK-NOT: block
929929 ; CHECK: return{{$}}
930930 ; OPT-LABEL: test11:
931 ; OPT: block BB20_8{{$}}
932 ; OPT-NEXT: block BB20_4{{$}}
933 ; OPT-NEXT: br_if $0, BB20_4{{$}}
934 ; OPT-NOT: block
935 ; OPT: block BB20_3{{$}}
936 ; OPT: br_if $0, BB20_3{{$}}
937 ; OPT-NOT: block
938 ; OPT: br_if $0, BB20_8{{$}}
939 ; OPT-NEXT: BB20_3:
931 ; OPT: block .LBB20_8{{$}}
932 ; OPT-NEXT: block .LBB20_4{{$}}
933 ; OPT-NEXT: br_if $0, .LBB20_4{{$}}
934 ; OPT-NOT: block
935 ; OPT: block .LBB20_3{{$}}
936 ; OPT: br_if $0, .LBB20_3{{$}}
937 ; OPT-NOT: block
938 ; OPT: br_if $0, .LBB20_8{{$}}
939 ; OPT-NEXT: .LBB20_3:
940940 ; OPT-NOT: block
941941 ; OPT: return{{$}}
942 ; OPT-NEXT: BB20_4:
943 ; OPT-NOT: block
944 ; OPT: block BB20_6{{$}}
945 ; OPT-NOT: block
946 ; OPT: br_if $pop9, BB20_6{{$}}
942 ; OPT-NEXT: .LBB20_4:
943 ; OPT-NOT: block
944 ; OPT: block .LBB20_6{{$}}
945 ; OPT-NOT: block
946 ; OPT: br_if $pop9, .LBB20_6{{$}}
947947 ; OPT-NOT: block
948948 ; OPT: return{{$}}
949 ; OPT-NEXT: BB20_6:
950 ; OPT-NOT: block
951 ; OPT: br_if $0, BB20_8{{$}}
949 ; OPT-NEXT: .LBB20_6:
950 ; OPT-NOT: block
951 ; OPT: br_if $0, .LBB20_8{{$}}
952952 ; OPT-NOT: block
953953 ; OPT: return{{$}}
954 ; OPT-NEXT: BB20_8:
954 ; OPT-NEXT: .LBB20_8:
955955 ; OPT-NOT: block
956956 ; OPT: return{{$}}
957957 define void @test11() {
985985 }
986986
987987 ; CHECK-LABEL: test12:
988 ; CHECK: BB21_1:
989 ; CHECK-NEXT: loop BB21_8{{$}}
990 ; CHECK-NOT: block
991 ; CHECK: block BB21_7{{$}}
992 ; CHECK-NEXT: block BB21_6{{$}}
993 ; CHECK-NEXT: block BB21_4{{$}}
994 ; CHECK: br_if {{[^,]*}}, BB21_4{{$}}
995 ; CHECK-NOT: block
996 ; CHECK: br_if {{[^,]*}}, BB21_7{{$}}
997 ; CHECK-NOT: block
998 ; CHECK: br_if {{[^,]*}}, BB21_7{{$}}
999 ; CHECK-NEXT: br BB21_6{{$}}
1000 ; CHECK-NEXT: BB21_4:
1001 ; CHECK-NOT: block
1002 ; CHECK: br_if {{[^,]*}}, BB21_7{{$}}
1003 ; CHECK-NOT: block
1004 ; CHECK: br_if {{[^,]*}}, BB21_7{{$}}
1005 ; CHECK-NEXT: BB21_6:
988 ; CHECK: .LBB21_1:
989 ; CHECK-NEXT: loop .LBB21_8{{$}}
990 ; CHECK-NOT: block
991 ; CHECK: block .LBB21_7{{$}}
992 ; CHECK-NEXT: block .LBB21_6{{$}}
993 ; CHECK-NEXT: block .LBB21_4{{$}}
994 ; CHECK: br_if {{[^,]*}}, .LBB21_4{{$}}
995 ; CHECK-NOT: block
996 ; CHECK: br_if {{[^,]*}}, .LBB21_7{{$}}
997 ; CHECK-NOT: block
998 ; CHECK: br_if {{[^,]*}}, .LBB21_7{{$}}
999 ; CHECK-NEXT: br .LBB21_6{{$}}
1000 ; CHECK-NEXT: .LBB21_4:
1001 ; CHECK-NOT: block
1002 ; CHECK: br_if {{[^,]*}}, .LBB21_7{{$}}
1003 ; CHECK-NOT: block
1004 ; CHECK: br_if {{[^,]*}}, .LBB21_7{{$}}
1005 ; CHECK-NEXT: .LBB21_6:
10061006 ; CHECK-NEXT: return{{$}}
1007 ; CHECK-NEXT: BB21_7:
1008 ; CHECK-NOT: block
1009 ; CHECK: br BB21_1{{$}}
1010 ; CHECK-NEXT: BB21_8:
1007 ; CHECK-NEXT: .LBB21_7:
1008 ; CHECK-NOT: block
1009 ; CHECK: br .LBB21_1{{$}}
1010 ; CHECK-NEXT: .LBB21_8:
10111011 ; OPT-LABEL: test12:
1012 ; OPT: BB21_1:
1013 ; OPT-NEXT: loop BB21_8{{$}}
1014 ; OPT-NOT: block
1015 ; OPT: block BB21_7{{$}}
1016 ; OPT-NEXT: block BB21_6{{$}}
1017 ; OPT-NEXT: block BB21_4{{$}}
1018 ; OPT: br_if {{[^,]*}}, BB21_4{{$}}
1019 ; OPT-NOT: block
1020 ; OPT: br_if {{[^,]*}}, BB21_7{{$}}
1021 ; OPT-NOT: block
1022 ; OPT: br_if {{[^,]*}}, BB21_7{{$}}
1023 ; OPT-NEXT: br BB21_6{{$}}
1024 ; OPT-NEXT: BB21_4:
1025 ; OPT-NOT: block
1026 ; OPT: br_if {{[^,]*}}, BB21_7{{$}}
1027 ; OPT-NOT: block
1028 ; OPT: br_if {{[^,]*}}, BB21_7{{$}}
1029 ; OPT-NEXT: BB21_6:
1012 ; OPT: .LBB21_1:
1013 ; OPT-NEXT: loop .LBB21_8{{$}}
1014 ; OPT-NOT: block
1015 ; OPT: block .LBB21_7{{$}}
1016 ; OPT-NEXT: block .LBB21_6{{$}}
1017 ; OPT-NEXT: block .LBB21_4{{$}}
1018 ; OPT: br_if {{[^,]*}}, .LBB21_4{{$}}
1019 ; OPT-NOT: block
1020 ; OPT: br_if {{[^,]*}}, .LBB21_7{{$}}
1021 ; OPT-NOT: block
1022 ; OPT: br_if {{[^,]*}}, .LBB21_7{{$}}
1023 ; OPT-NEXT: br .LBB21_6{{$}}
1024 ; OPT-NEXT: .LBB21_4:
1025 ; OPT-NOT: block
1026 ; OPT: br_if {{[^,]*}}, .LBB21_7{{$}}
1027 ; OPT-NOT: block
1028 ; OPT: br_if {{[^,]*}}, .LBB21_7{{$}}
1029 ; OPT-NEXT: .LBB21_6:
10301030 ; OPT-NEXT: return{{$}}
1031 ; OPT-NEXT: BB21_7:
1032 ; OPT-NOT: block
1033 ; OPT: br BB21_1{{$}}
1034 ; OPT-NEXT: BB21_8:
1031 ; OPT-NEXT: .LBB21_7:
1032 ; OPT-NOT: block
1033 ; OPT: br .LBB21_1{{$}}
1034 ; OPT-NEXT: .LBB21_8:
10351035 define void @test12(i8* %arg) {
10361036 bb:
10371037 br label %bb1
10611061
10621062 ; CHECK-LABEL: test13:
10631063 ; CHECK-NEXT: .local i32{{$}}
1064 ; CHECK: block BB22_2{{$}}
1065 ; CHECK: br_if $pop4, BB22_2{{$}}
1064 ; CHECK: block .LBB22_2{{$}}
1065 ; CHECK: br_if $pop4, .LBB22_2{{$}}
10661066 ; CHECK-NEXT: return{{$}}
1067 ; CHECK-NEXT: BB22_2:
1068 ; CHECK: block BB22_4{{$}}
1069 ; CHECK-NEXT: br_if $0, BB22_4{{$}}
1070 ; CHECK: BB22_4:
1071 ; CHECK: block BB22_5{{$}}
1072 ; CHECK: br_if $pop6, BB22_5{{$}}
1073 ; CHECK-NEXT: BB22_5:
1067 ; CHECK-NEXT: .LBB22_2:
1068 ; CHECK: block .LBB22_4{{$}}
1069 ; CHECK-NEXT: br_if $0, .LBB22_4{{$}}
1070 ; CHECK: .LBB22_4:
1071 ; CHECK: block .LBB22_5{{$}}
1072 ; CHECK: br_if $pop6, .LBB22_5{{$}}
1073 ; CHECK-NEXT: .LBB22_5:
10741074 ; CHECK-NEXT: unreachable{{$}}
10751075 ; OPT-LABEL: test13:
10761076 ; OPT-NEXT: .local i32{{$}}
1077 ; OPT: block BB22_2{{$}}
1078 ; OPT: br_if $pop4, BB22_2{{$}}
1077 ; OPT: block .LBB22_2{{$}}
1078 ; OPT: br_if $pop4, .LBB22_2{{$}}
10791079 ; OPT-NEXT: return{{$}}
1080 ; OPT-NEXT: BB22_2:
1081 ; OPT: block BB22_4{{$}}
1082 ; OPT-NEXT: br_if $0, BB22_4{{$}}
1083 ; OPT: BB22_4:
1084 ; OPT: block BB22_5{{$}}
1085 ; OPT: br_if $pop6, BB22_5{{$}}
1086 ; OPT-NEXT: BB22_5:
1080 ; OPT-NEXT: .LBB22_2:
1081 ; OPT: block .LBB22_4{{$}}
1082 ; OPT-NEXT: br_if $0, .LBB22_4{{$}}
1083 ; OPT: .LBB22_4:
1084 ; OPT: block .LBB22_5{{$}}
1085 ; OPT: br_if $pop6, .LBB22_5{{$}}
1086 ; OPT-NEXT: .LBB22_5:
10871087 ; OPT-NEXT: unreachable{{$}}
10881088 define void @test13() noinline optnone {
10891089 bb:
2424 ; Swap phis.
2525
2626 ; CHECK-LABEL: test1:
27 ; CHECK: BB1_1:
27 ; CHECK: .LBB1_1:
2828 ; CHECK: copy_local $[[NUM0:[0-9]+]]=, $[[NUM1:[0-9]+]]{{$}}
2929 ; CHECK: copy_local $[[NUM1]]=, $[[NUM2:[0-9]+]]{{$}}
3030 ; CHECK: copy_local $[[NUM2]]=, $[[NUM0]]{{$}}
5454 ; CHECK-NEXT: .local i32, i32{{$}}
5555 ; CHECK-NEXT: i32.const $5=, 2{{$}}
5656 ; CHECK-NEXT: i32.const $4=, 1{{$}}
57 ; CHECK-NEXT: block BB4_2{{$}}
57 ; CHECK-NEXT: block .LBB4_2{{$}}
5858 ; CHECK-NEXT: i32.lt_s $push0=, $0, $4{{$}}
5959 ; CHECK-NEXT: i32.lt_s $push1=, $1, $5{{$}}
6060 ; CHECK-NEXT: i32.xor $push4=, $pop0, $pop1{{$}}
6363 ; CHECK-NEXT: i32.xor $push5=, $pop2, $pop3{{$}}
6464 ; CHECK-NEXT: i32.xor $push6=, $pop4, $pop5{{$}}
6565 ; CHECK-NEXT: i32.ne $push7=, $pop6, $4{{$}}
66 ; CHECK-NEXT: br_if $pop7, BB4_2{{$}}
66 ; CHECK-NEXT: br_if $pop7, .LBB4_2{{$}}
6767 ; CHECK-NEXT: i32.const $push8=, 0{{$}}
6868 ; CHECK-NEXT: return $pop8{{$}}
69 ; CHECK-NEXT: BB4_2:
69 ; CHECK-NEXT: .LBB4_2:
7070 ; CHECK-NEXT: return $4{{$}}
7171 define i32 @stack_uses(i32 %x, i32 %y, i32 %z, i32 %w) {
7272 entry:
9191 ; CHECK-NEXT: .param i32, i32, i32{{$}}
9292 ; CHECK-NEXT: .local i32{{$}}
9393 ; CHECK-NEXT: i32.load $3=, 0($2){{$}}
94 ; CHECK-NEXT: block BB5_3{{$}}
94 ; CHECK-NEXT: block .LBB5_3{{$}}
9595 ; CHECK-NEXT: i32.ge_u $push0=, $3, $1{{$}}
96 ; CHECK-NEXT: br_if $pop0, BB5_3{{$}}
96 ; CHECK-NEXT: br_if $pop0, .LBB5_3{{$}}
9797 ; CHECK-NEXT: i32.lt_u $push1=, $3, $0{{$}}
98 ; CHECK-NEXT: br_if $pop1, BB5_3{{$}}
98 ; CHECK-NEXT: br_if $pop1, .LBB5_3{{$}}
9999 ; CHECK-NEXT: i32.store $discard=, 0($2), $3{{$}}
100 ; CHECK-NEXT: BB5_3:
100 ; CHECK-NEXT: .LBB5_3:
101101 ; CHECK-NEXT: return{{$}}
102102 define void @multiple_uses(i32* %arg0, i32* %arg1, i32* %arg2) nounwind {
103103 bb:
1313 declare void @foo5()
1414
1515 ; CHECK-LABEL: bar32:
16 ; CHECK: block BB0_8{{$}}
17 ; CHECK: block BB0_7{{$}}
18 ; CHECK: block BB0_6{{$}}
19 ; CHECK: block BB0_5{{$}}
20 ; CHECK: block BB0_4{{$}}
21 ; CHECK: block BB0_3{{$}}
22 ; CHECK: block BB0_2{{$}}
23 ; CHECK: tableswitch {{[^,]*}}, BB0_2, BB0_2, BB0_2, BB0_2, BB0_2, BB0_2, BB0_2, BB0_2, BB0_3, BB0_3, BB0_3, BB0_3, BB0_3, BB0_3, BB0_3, BB0_3, BB0_4, BB0_4, BB0_4, BB0_4, BB0_4, BB0_4, BB0_5, BB0_6, BB0_7{{$}}
24 ; CHECK: BB0_2:
16 ; CHECK: block .LBB0_8{{$}}
17 ; CHECK: block .LBB0_7{{$}}
18 ; CHECK: block .LBB0_6{{$}}
19 ; CHECK: block .LBB0_5{{$}}
20 ; CHECK: block .LBB0_4{{$}}
21 ; CHECK: block .LBB0_3{{$}}
22 ; CHECK: block .LBB0_2{{$}}
23 ; CHECK: tableswitch {{[^,]*}}, .LBB0_2, .LBB0_2, .LBB0_2, .LBB0_2, .LBB0_2, .LBB0_2, .LBB0_2, .LBB0_2, .LBB0_3, .LBB0_3, .LBB0_3, .LBB0_3, .LBB0_3, .LBB0_3, .LBB0_3, .LBB0_3, .LBB0_4, .LBB0_4, .LBB0_4, .LBB0_4, .LBB0_4, .LBB0_4, .LBB0_5, .LBB0_6, .LBB0_7{{$}}
24 ; CHECK: .LBB0_2:
2525 ; CHECK: call foo0
26 ; CHECK: BB0_3:
26 ; CHECK: .LBB0_3:
2727 ; CHECK: call foo1
28 ; CHECK: BB0_4:
28 ; CHECK: .LBB0_4:
2929 ; CHECK: call foo2
30 ; CHECK: BB0_5:
30 ; CHECK: .LBB0_5:
3131 ; CHECK: call foo3
32 ; CHECK: BB0_6:
32 ; CHECK: .LBB0_6:
3333 ; CHECK: call foo4
34 ; CHECK: BB0_7:
34 ; CHECK: .LBB0_7:
3535 ; CHECK: call foo5
36 ; CHECK: BB0_8:
36 ; CHECK: .LBB0_8:
3737 ; CHECK: return{{$}}
3838 define void @bar32(i32 %n) {
3939 entry:
9393 }
9494
9595 ; CHECK-LABEL: bar64:
96 ; CHECK: block BB1_8{{$}}
97 ; CHECK: block BB1_7{{$}}
98 ; CHECK: block BB1_6{{$}}
99 ; CHECK: block BB1_5{{$}}
100 ; CHECK: block BB1_4{{$}}
101 ; CHECK: block BB1_3{{$}}
102 ; CHECK: block BB1_2{{$}}
103 ; CHECK: tableswitch {{[^,]*}}, BB1_2, BB1_2, BB1_2, BB1_2, BB1_2, BB1_2, BB1_2, BB1_2, BB1_3, BB1_3, BB1_3, BB1_3, BB1_3, BB1_3, BB1_3, BB1_3, BB1_4, BB1_4, BB1_4, BB1_4, BB1_4, BB1_4, BB1_5, BB1_6, BB1_7{{$}}
104 ; CHECK: BB1_2:
96 ; CHECK: block .LBB1_8{{$}}
97 ; CHECK: block .LBB1_7{{$}}
98 ; CHECK: block .LBB1_6{{$}}
99 ; CHECK: block .LBB1_5{{$}}
100 ; CHECK: block .LBB1_4{{$}}
101 ; CHECK: block .LBB1_3{{$}}
102 ; CHECK: block .LBB1_2{{$}}
103 ; CHECK: tableswitch {{[^,]*}}, .LBB1_2, .LBB1_2, .LBB1_2, .LBB1_2, .LBB1_2, .LBB1_2, .LBB1_2, .LBB1_2, .LBB1_3, .LBB1_3, .LBB1_3, .LBB1_3, .LBB1_3, .LBB1_3, .LBB1_3, .LBB1_3, .LBB1_4, .LBB1_4, .LBB1_4, .LBB1_4, .LBB1_4, .LBB1_4, .LBB1_5, .LBB1_6, .LBB1_7{{$}}
104 ; CHECK: .LBB1_2:
105105 ; CHECK: call foo0
106 ; CHECK: BB1_3:
106 ; CHECK: .LBB1_3:
107107 ; CHECK: call foo1
108 ; CHECK: BB1_4:
108 ; CHECK: .LBB1_4:
109109 ; CHECK: call foo2
110 ; CHECK: BB1_5:
110 ; CHECK: .LBB1_5:
111111 ; CHECK: call foo3
112 ; CHECK: BB1_6:
112 ; CHECK: .LBB1_6:
113113 ; CHECK: call foo4
114 ; CHECK: BB1_7:
114 ; CHECK: .LBB1_7:
115115 ; CHECK: call foo5
116 ; CHECK: BB1_8:
116 ; CHECK: .LBB1_8:
117117 ; CHECK: return{{$}}
118118 define void @bar64(i64 %n) {
119119 entry: