1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=aarch64 -run-pass=shrink-wrap -o - %s | FileCheck %s
5 define void @shrink_test1(i32 %a) {
7 %cmp5 = icmp sgt i32 %a, 0
8 br i1 %cmp5, label %BB0, label %exit
11 %call = call i32 @fun()
12 %c = icmp eq i32 %call, 0
13 br i1 %c, label %BB1, label %exit
16 %call2 = call i32 @fun()
19 exit: ; preds = %BB1, %BB0, %entry
23 define void @shrink_test2(i32 %a, ptr %P1, ptr %P2) {
25 %cmp5 = icmp sgt i32 %a, 0
26 br i1 %cmp5, label %BB01, label %exit
29 store i32 %a, ptr %P1, align 4
30 %c1 = icmp sgt i32 %a, 1
31 br i1 %c1, label %BB02, label %BB03
34 store i32 %a, ptr %P2, align 4
37 BB03: ; preds = %BB02, %BB01
38 %call03 = call i32 @fun()
39 %c03 = icmp eq i32 %call03, 0
40 br i1 %c03, label %BB04, label %BB05
43 %call04 = call i32 @fun()
46 BB05: ; preds = %BB04, %BB03
47 %call05 = call i32 @fun()
48 %c05 = icmp eq i32 %call05, 0
49 br i1 %c05, label %BB06, label %BB07
52 %call06 = call i32 @fun()
56 %call07 = call i32 @fun2()
59 exit: ; preds = %BB07, %BB06, %BB00
63 define void @noshrink_test1(i32 %a, i32 %v, i32 %v2) {
65 %cmp5 = icmp sgt i32 %a, 0
66 br i1 %cmp5, label %BB0, label %exit
69 %c = icmp eq i32 %a, 10
70 %c1 = icmp eq i32 %v, 10
71 %or.cond = select i1 %c, i1 %c1, i1 false
72 br i1 %or.cond, label %BB3, label %BB2
75 %c2 = icmp eq i32 %v2, 10
76 br i1 %c2, label %BB4, label %exit
79 %call3 = call i32 @fun()
83 %call4 = call i32 @fun2()
86 exit: ; preds = %BB4, %BB3, %BB2, %entry
90 define void @noshrink_test2(i32 %a) {
92 %cmp5 = icmp sgt i32 %a, 0
93 br i1 %cmp5, label %BB01, label %InfLoop.preheader
95 InfLoop.preheader: ; preds = %BB00
99 %call = call i32 @fun()
100 %c = icmp eq i32 %call, 0
101 br i1 %c, label %BB02, label %exit
103 BB02: ; preds = %BB01
104 %call2 = call i32 @fun()
107 InfLoop: ; preds = %InfLoop.preheader, %InfLoop
108 %call3 = call i32 @fun()
111 exit: ; preds = %BB02, %BB01
115 define void @noshrink_test3(i32 %a) {
117 %cmp5 = icmp sgt i32 %a, 0
118 %call02 = call i32 @fun()
119 br i1 %cmp5, label %BB02, label %BB01
121 BB01: ; preds = %BB00
122 %0 = icmp eq i32 %call02, 0
123 br i1 %0, label %BB01.1, label %exit
125 BB01.1: ; preds = %BB01
126 call void @abort() #0
129 BB02: ; preds = %BB00
130 %1 = icmp eq i32 %call02, 0
131 br i1 %1, label %BB03, label %BB04
133 BB03: ; preds = %BB02
134 %call03 = call i32 @fun()
135 %c03 = icmp eq i32 %call03, 0
136 br i1 %c03, label %BB04, label %exit
138 BB04: ; preds = %BB03, %BB02
139 %call04 = call i32 @fun()
142 exit: ; preds = %BB04, %BB03, %BB01
146 define void @noshrink_bb_as_inlineasmbr_target(i1 %cond) {
148 br i1 %cond, label %0, label %exit
151 callbr void asm sideeffect "", "!i,~{flags}"()
152 to label %1 [label %exit]
155 call void @dosomething()
158 exit: ; preds = %1, %0, %entry
164 declare void @abort()
165 declare void @dosomething()
170 tracksRegLiveness: true
171 tracksDebugUserValues: true
179 machineFunctionInfo: {}
181 ; CHECK-LABEL: name: shrink_test1
183 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.3(0x30000000)
184 ; CHECK-NEXT: liveins: $w0
186 ; CHECK-NEXT: dead $wzr = SUBSWri killed renamable $w0, 1, 0, implicit-def $nzcv
187 ; CHECK-NEXT: Bcc 11, %bb.3, implicit killed $nzcv
188 ; CHECK-NEXT: B %bb.1
190 ; CHECK-NEXT: bb.1.BB0:
191 ; CHECK-NEXT: successors: %bb.2(0x30000000), %bb.4(0x50000000)
193 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
194 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
195 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
196 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.4
197 ; CHECK-NEXT: B %bb.2
199 ; CHECK-NEXT: bb.2.BB1:
200 ; CHECK-NEXT: successors: %bb.4(0x80000000)
202 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
203 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
204 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
205 ; CHECK-NEXT: B %bb.4
207 ; CHECK-NEXT: bb.3.exit:
208 ; CHECK-NEXT: RET_ReallyLR
211 ; CHECK-NEXT: successors: %bb.3(0x80000000)
213 ; CHECK-NEXT: B %bb.3
215 successors: %bb.1(0x50000000), %bb.3(0x30000000)
218 dead $wzr = SUBSWri killed renamable $w0, 1, 0, implicit-def $nzcv
219 Bcc 11, %bb.3, implicit killed $nzcv
223 successors: %bb.2(0x30000000), %bb.3(0x50000000)
225 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
226 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
227 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
228 CBNZW killed renamable $w0, %bb.3
232 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
233 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
234 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
243 tracksRegLiveness: true
244 tracksDebugUserValues: true
254 machineFunctionInfo: {}
256 ; CHECK-LABEL: name: shrink_test2
258 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.8(0x30000000)
259 ; CHECK-NEXT: liveins: $w0, $x1, $x2
261 ; CHECK-NEXT: dead $wzr = SUBSWri renamable $w0, 1, 0, implicit-def $nzcv
262 ; CHECK-NEXT: Bcc 11, %bb.8, implicit killed $nzcv
263 ; CHECK-NEXT: B %bb.1
265 ; CHECK-NEXT: bb.1.BB01:
266 ; CHECK-NEXT: successors: %bb.2(0x40000000), %bb.3(0x40000000)
267 ; CHECK-NEXT: liveins: $w0, $x1, $x2
269 ; CHECK-NEXT: dead $wzr = SUBSWri renamable $w0, 2, 0, implicit-def $nzcv
270 ; CHECK-NEXT: STRWui renamable $w0, killed renamable $x1, 0 :: (store (s32) into %ir.P1)
271 ; CHECK-NEXT: Bcc 11, %bb.3, implicit killed $nzcv
272 ; CHECK-NEXT: B %bb.2
274 ; CHECK-NEXT: bb.2.BB02:
275 ; CHECK-NEXT: successors: %bb.3(0x80000000)
276 ; CHECK-NEXT: liveins: $w0, $x2
278 ; CHECK-NEXT: STRWui killed renamable $w0, killed renamable $x2, 0 :: (store (s32) into %ir.P2)
280 ; CHECK-NEXT: bb.3.BB03:
281 ; CHECK-NEXT: successors: %bb.4(0x30000000), %bb.5(0x50000000)
283 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
284 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
285 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
286 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.5
287 ; CHECK-NEXT: B %bb.4
289 ; CHECK-NEXT: bb.4.BB04:
290 ; CHECK-NEXT: successors: %bb.5(0x80000000)
292 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
293 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
294 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
296 ; CHECK-NEXT: bb.5.BB05:
297 ; CHECK-NEXT: successors: %bb.6(0x30000000), %bb.7(0x50000000)
299 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
300 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
301 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
302 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.7
303 ; CHECK-NEXT: B %bb.6
305 ; CHECK-NEXT: bb.6.BB06:
306 ; CHECK-NEXT: successors: %bb.9(0x80000000)
308 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
309 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
310 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
311 ; CHECK-NEXT: B %bb.9
313 ; CHECK-NEXT: bb.7.BB07:
314 ; CHECK-NEXT: successors: %bb.9(0x80000000)
316 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
317 ; CHECK-NEXT: BL @fun2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
318 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
319 ; CHECK-NEXT: B %bb.9
321 ; CHECK-NEXT: bb.8.exit:
322 ; CHECK-NEXT: RET_ReallyLR
325 ; CHECK-NEXT: successors: %bb.8(0x80000000)
327 ; CHECK-NEXT: B %bb.8
329 successors: %bb.1(0x50000000), %bb.8(0x30000000)
330 liveins: $w0, $x1, $x2
332 dead $wzr = SUBSWri renamable $w0, 1, 0, implicit-def $nzcv
333 Bcc 11, %bb.8, implicit killed $nzcv
337 successors: %bb.2, %bb.3
338 liveins: $w0, $x1, $x2
340 dead $wzr = SUBSWri renamable $w0, 2, 0, implicit-def $nzcv
341 STRWui renamable $w0, killed renamable $x1, 0 :: (store (s32) into %ir.P1)
342 Bcc 11, %bb.3, implicit killed $nzcv
348 STRWui killed renamable $w0, killed renamable $x2, 0 :: (store (s32) into %ir.P2)
351 successors: %bb.4(0x30000000), %bb.5(0x50000000)
353 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
354 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
355 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
356 CBNZW killed renamable $w0, %bb.5
360 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
361 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
362 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
365 successors: %bb.6(0x30000000), %bb.7(0x50000000)
367 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
368 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
369 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
370 CBNZW killed renamable $w0, %bb.7
374 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
375 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
376 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
380 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
381 BL @fun2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
382 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
391 tracksRegLiveness: true
392 tracksDebugUserValues: true
402 machineFunctionInfo: {}
404 ; CHECK-LABEL: name: noshrink_test1
406 ; CHECK-NEXT: successors: %bb.1(0x50000000), %bb.6(0x30000000)
407 ; CHECK-NEXT: liveins: $w0, $w1, $w2
409 ; CHECK-NEXT: dead $wzr = SUBSWri renamable $w0, 1, 0, implicit-def $nzcv
410 ; CHECK-NEXT: Bcc 11, %bb.6, implicit killed $nzcv
411 ; CHECK-NEXT: B %bb.1
413 ; CHECK-NEXT: bb.1.BB0:
414 ; CHECK-NEXT: successors: %bb.2(0x60000000), %bb.3(0x20000000)
415 ; CHECK-NEXT: liveins: $w0, $w1, $w2
417 ; CHECK-NEXT: dead $wzr = SUBSWri killed renamable $w0, 10, 0, implicit-def $nzcv
418 ; CHECK-NEXT: Bcc 1, %bb.3, implicit killed $nzcv
419 ; CHECK-NEXT: B %bb.2
421 ; CHECK-NEXT: bb.2.BB0:
422 ; CHECK-NEXT: successors: %bb.4(0x55555555), %bb.3(0x2aaaaaab)
423 ; CHECK-NEXT: liveins: $w1, $w2
425 ; CHECK-NEXT: dead $wzr = SUBSWri killed renamable $w1, 10, 0, implicit-def $nzcv
426 ; CHECK-NEXT: Bcc 0, %bb.4, implicit killed $nzcv
427 ; CHECK-NEXT: B %bb.3
429 ; CHECK-NEXT: bb.3.BB2:
430 ; CHECK-NEXT: successors: %bb.5(0x40000000), %bb.6(0x40000000)
431 ; CHECK-NEXT: liveins: $w2
433 ; CHECK-NEXT: dead $wzr = SUBSWri killed renamable $w2, 10, 0, implicit-def $nzcv
434 ; CHECK-NEXT: Bcc 0, %bb.5, implicit killed $nzcv
435 ; CHECK-NEXT: B %bb.6
437 ; CHECK-NEXT: bb.4.BB3:
438 ; CHECK-NEXT: successors: %bb.6(0x80000000)
440 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
441 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
442 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
443 ; CHECK-NEXT: B %bb.6
445 ; CHECK-NEXT: bb.5.BB4:
446 ; CHECK-NEXT: successors: %bb.6(0x80000000)
448 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
449 ; CHECK-NEXT: BL @fun2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
450 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
452 ; CHECK-NEXT: bb.6.exit:
453 ; CHECK-NEXT: RET_ReallyLR
455 successors: %bb.1(0x50000000), %bb.6(0x30000000)
456 liveins: $w0, $w1, $w2
458 dead $wzr = SUBSWri renamable $w0, 1, 0, implicit-def $nzcv
459 Bcc 11, %bb.6, implicit killed $nzcv
463 successors: %bb.2(0x60000000), %bb.3(0x20000000)
464 liveins: $w0, $w1, $w2
466 dead $wzr = SUBSWri killed renamable $w0, 10, 0, implicit-def $nzcv
467 Bcc 1, %bb.3, implicit killed $nzcv
471 successors: %bb.4(0x55555555), %bb.3(0x2aaaaaab)
474 dead $wzr = SUBSWri killed renamable $w1, 10, 0, implicit-def $nzcv
475 Bcc 0, %bb.4, implicit killed $nzcv
481 dead $wzr = SUBSWri killed renamable $w2, 10, 0, implicit-def $nzcv
482 Bcc 0, %bb.5, implicit killed $nzcv
486 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
487 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
488 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
492 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
493 BL @fun2, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
494 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
503 tracksRegLiveness: true
504 tracksDebugUserValues: true
512 machineFunctionInfo: {}
514 ; CHECK-LABEL: name: noshrink_test2
516 ; CHECK-NEXT: successors: %bb.2(0x50000000), %bb.1(0x30000000)
517 ; CHECK-NEXT: liveins: $w0
519 ; CHECK-NEXT: dead $wzr = SUBSWri killed renamable $w0, 0, 0, implicit-def $nzcv
520 ; CHECK-NEXT: Bcc 12, %bb.2, implicit killed $nzcv
523 ; CHECK-NEXT: successors: %bb.4(0x80000000)
525 ; CHECK-NEXT: B %bb.4
527 ; CHECK-NEXT: bb.2.BB01:
528 ; CHECK-NEXT: successors: %bb.3(0x30000000), %bb.5(0x50000000)
530 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
531 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
532 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
533 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.5
534 ; CHECK-NEXT: B %bb.3
536 ; CHECK-NEXT: bb.3.BB02:
537 ; CHECK-NEXT: successors: %bb.5(0x80000000)
539 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
540 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
541 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
542 ; CHECK-NEXT: B %bb.5
544 ; CHECK-NEXT: bb.4.InfLoop:
545 ; CHECK-NEXT: successors: %bb.4(0x80000000)
547 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
548 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
549 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
550 ; CHECK-NEXT: B %bb.4
552 ; CHECK-NEXT: bb.5.exit:
553 ; CHECK-NEXT: RET_ReallyLR
555 successors: %bb.2(0x50000000), %bb.1(0x30000000)
558 dead $wzr = SUBSWri killed renamable $w0, 0, 0, implicit-def $nzcv
559 Bcc 12, %bb.2, implicit killed $nzcv
565 successors: %bb.3(0x30000000), %bb.5(0x50000000)
567 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
568 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
569 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
570 CBNZW killed renamable $w0, %bb.5
574 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
575 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
576 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
580 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
581 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
582 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
592 tracksRegLiveness: true
593 tracksDebugUserValues: true
601 machineFunctionInfo: {}
603 ; CHECK-LABEL: name: noshrink_test3
605 ; CHECK-NEXT: successors: %bb.3(0x50000000), %bb.1(0x30000000)
606 ; CHECK-NEXT: liveins: $w0
608 ; CHECK-NEXT: renamable $w19 = COPY $w0
609 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
610 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
611 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
612 ; CHECK-NEXT: dead $wzr = SUBSWri killed renamable $w19, 0, 0, implicit-def $nzcv
613 ; CHECK-NEXT: Bcc 12, %bb.3, implicit killed $nzcv
614 ; CHECK-NEXT: B %bb.1
616 ; CHECK-NEXT: bb.1.BB01:
617 ; CHECK-NEXT: successors: %bb.2(0x00000800), %bb.6(0x7ffff800)
618 ; CHECK-NEXT: liveins: $w0
620 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.6
621 ; CHECK-NEXT: B %bb.2
623 ; CHECK-NEXT: bb.2.BB01.1:
624 ; CHECK-NEXT: successors: %bb.3(0x80000000)
626 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
627 ; CHECK-NEXT: BL @abort, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp
628 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
630 ; CHECK-NEXT: bb.3.BB02:
631 ; CHECK-NEXT: successors: %bb.4(0x30000000), %bb.5(0x50000000)
632 ; CHECK-NEXT: liveins: $w0
634 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.5
635 ; CHECK-NEXT: B %bb.4
637 ; CHECK-NEXT: bb.4.BB03:
638 ; CHECK-NEXT: successors: %bb.5(0x30000000), %bb.6(0x50000000)
640 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
641 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
642 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
643 ; CHECK-NEXT: CBNZW killed renamable $w0, %bb.6
644 ; CHECK-NEXT: B %bb.5
646 ; CHECK-NEXT: bb.5.BB04:
647 ; CHECK-NEXT: successors: %bb.6(0x80000000)
649 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
650 ; CHECK-NEXT: BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
651 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
653 ; CHECK-NEXT: bb.6.exit:
654 ; CHECK-NEXT: RET_ReallyLR
656 successors: %bb.3(0x50000000), %bb.1(0x30000000)
659 renamable $w19 = COPY $w0
660 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
661 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
662 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
663 dead $wzr = SUBSWri killed renamable $w19, 0, 0, implicit-def $nzcv
664 Bcc 12, %bb.3, implicit killed $nzcv
668 successors: %bb.2(0x00000800), %bb.6(0x7ffff800)
671 CBNZW killed renamable $w0, %bb.6
676 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
677 BL @abort, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp
678 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
681 successors: %bb.4(0x30000000), %bb.5(0x50000000)
684 CBNZW killed renamable $w0, %bb.5
688 successors: %bb.5(0x30000000), %bb.6(0x50000000)
690 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
691 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def $w0
692 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
693 CBNZW killed renamable $w0, %bb.6
697 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
698 BL @fun, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
699 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
706 name: noshrink_bb_as_inlineasmbr_target
709 - { reg: '$w0', virtual-reg: '' }
714 ; CHECK-LABEL: name: noshrink_bb_as_inlineasmbr_target
716 ; CHECK-NEXT: successors: %bb.1(0x40000000), %bb.3(0x40000000)
717 ; CHECK-NEXT: liveins: $w0
719 ; CHECK-NEXT: TBZW killed renamable $w0, 0, %bb.3
720 ; CHECK-NEXT: B %bb.1
722 ; CHECK-NEXT: bb.1 (%ir-block.0):
723 ; CHECK-NEXT: successors: %bb.2(0x80000000), %bb.3(0x00000000)
725 ; CHECK-NEXT: INLINEASM_BR &"", 1 /* sideeffect attdialect */, 13 /* imm */, %bb.3
726 ; CHECK-NEXT: B %bb.2
728 ; CHECK-NEXT: bb.2 (%ir-block.1):
729 ; CHECK-NEXT: successors: %bb.3(0x80000000)
731 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
732 ; CHECK-NEXT: BL @dosomething, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp
733 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
735 ; CHECK-NEXT: bb.3.exit (machine-block-address-taken, inlineasm-br-indirect-target):
736 ; CHECK-NEXT: RET_ReallyLR
738 successors: %bb.1(0x40000000), %bb.3(0x40000000)
741 TBZW killed renamable $w0, 0, %bb.3
745 successors: %bb.2(0x80000000), %bb.3(0x00000000)
747 INLINEASM_BR &"", 1 /* sideeffect attdialect */, 13 /* imm */, %bb.3
751 successors: %bb.3(0x80000000)
753 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
754 BL @dosomething, csr_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp
755 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
757 bb.3.exit (machine-block-address-taken, inlineasm-br-indirect-target):