1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 3
2 # RUN: llc -mtriple=arm64-apple-ios -run-pass=greedy -o - %s | FileCheck %s
6 tracksRegLiveness: true
8 kind: label-difference32
11 blocks: [ '%bb.9', '%bb.5', '%bb.2', '%bb.2', '%bb.2' ]
13 ; CHECK-LABEL: name: widget
15 ; CHECK-NEXT: successors: %bb.1(0x80000000)
16 ; CHECK-NEXT: liveins: $w0, $w1, $x2, $x3, $x4, $w5, $w6
18 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr64common = IMPLICIT_DEF
19 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:gpr64 = IMPLICIT_DEF
20 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:gpr32common = IMPLICIT_DEF
21 ; CHECK-NEXT: [[DEF3:%[0-9]+]]:gpr32 = IMPLICIT_DEF
22 ; CHECK-NEXT: [[DEF4:%[0-9]+]]:gpr32 = IMPLICIT_DEF
23 ; CHECK-NEXT: [[DEF5:%[0-9]+]]:gpr64common = IMPLICIT_DEF
24 ; CHECK-NEXT: [[DEF6:%[0-9]+]]:gpr32 = IMPLICIT_DEF
25 ; CHECK-NEXT: undef [[DEF7:%[0-9]+]].sub_32:gpr64 = IMPLICIT_DEF
26 ; CHECK-NEXT: [[DEF8:%[0-9]+]]:gpr64common = IMPLICIT_DEF
27 ; CHECK-NEXT: [[DEF9:%[0-9]+]]:gpr32 = IMPLICIT_DEF
28 ; CHECK-NEXT: dead [[DEF10:%[0-9]+]]:gpr64 = IMPLICIT_DEF
29 ; CHECK-NEXT: undef [[DEF11:%[0-9]+]].sub_32:gpr64 = IMPLICIT_DEF implicit-def dead %11
30 ; CHECK-NEXT: STRXui [[DEF11]], %stack.0, 0 :: (store (s64) into %stack.0)
33 ; CHECK-NEXT: successors: %bb.2(0x80000000)
37 ; CHECK-NEXT: successors: %bb.3(0x0fbefbf0), %bb.4(0x70410410)
39 ; CHECK-NEXT: Bcc 8, %bb.3, implicit killed undef $nzcv
43 ; CHECK-NEXT: successors: %bb.11(0x00000000), %bb.2(0x80000000)
45 ; CHECK-NEXT: dead $wzr = SUBSWri [[DEF2]], 64, 0, implicit-def $nzcv
46 ; CHECK-NEXT: Bcc 0, %bb.11, implicit killed undef $nzcv
50 ; CHECK-NEXT: successors: %bb.9(0x01288b01), %bb.5(0x01288b01), %bb.2(0x11f46a91), %bb.6(0x23e8d524), %bb.7(0x47d1aa49)
52 ; CHECK-NEXT: dead early-clobber %12:gpr64, dead early-clobber %13:gpr64sp = JumpTableDest32 [[DEF8]], [[DEF7]], %jump-table.0
53 ; CHECK-NEXT: BR undef %18:gpr64
56 ; CHECK-NEXT: successors: %bb.8(0x80000000)
61 ; CHECK-NEXT: successors: %bb.2(0x80000000)
63 ; CHECK-NEXT: STRWui [[DEF9]], [[DEF5]], 0 :: (store (s32))
67 ; CHECK-NEXT: successors: %bb.2(0x80000000)
69 ; CHECK-NEXT: STRWui $wzr, [[DEF]], 0 :: (store (s32))
70 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
71 ; CHECK-NEXT: $w0 = COPY [[DEF4]]
72 ; CHECK-NEXT: $x1 = COPY [[DEF1]]
73 ; CHECK-NEXT: BL 0, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
74 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
75 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
76 ; CHECK-NEXT: $w0 = COPY [[DEF6]]
77 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
81 ; CHECK-NEXT: successors: %bb.8(0x80000000)
86 ; CHECK-NEXT: successors: %bb.10(0x40000000), %bb.1(0x40000000)
88 ; CHECK-NEXT: undef [[DEF12:%[0-9]+]].sub_32:gpr64 = IMPLICIT_DEF
89 ; CHECK-NEXT: STRXui [[DEF12]], %stack.0, 0 :: (store (s64) into %stack.0)
90 ; CHECK-NEXT: TBZW [[DEF3]], 0, %bb.1
91 ; CHECK-NEXT: B %bb.10
94 ; CHECK-NEXT: successors: %bb.1(0x80000000)
96 ; CHECK-NEXT: ADJCALLSTACKDOWN 32, 0, implicit-def dead $sp, implicit $sp
97 ; CHECK-NEXT: ADJCALLSTACKUP 32, 0, implicit-def dead $sp, implicit $sp
101 ; CHECK-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui %stack.0, 0 :: (load (s64) from %stack.0)
102 ; CHECK-NEXT: dead undef [[COPY:%[0-9]+]].sub_32:gpr64 = COPY [[LDRXui]].sub_32
103 ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp
104 ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp
106 liveins: $w0, $w1, $x2, $x3, $x4, $w5, $w6
108 %0:gpr64common = IMPLICIT_DEF
109 %1:gpr64 = IMPLICIT_DEF
110 %2:gpr32common = IMPLICIT_DEF
111 %3:gpr32 = IMPLICIT_DEF
112 %4:gpr32 = IMPLICIT_DEF
113 %5:gpr64common = IMPLICIT_DEF
114 %6:gpr32 = IMPLICIT_DEF
115 undef %7.sub_32:gpr64 = IMPLICIT_DEF
116 %8:gpr64common = IMPLICIT_DEF
117 %9:gpr32 = IMPLICIT_DEF
118 %10:gpr64 = IMPLICIT_DEF
119 undef %10.sub_32:gpr64 = IMPLICIT_DEF implicit-def %11:gpr64
124 successors: %bb.3(0x0fbefbf0), %bb.4(0x70410410)
126 Bcc 8, %bb.3, implicit killed undef $nzcv
130 successors: %bb.11(0x00000000), %bb.2(0x80000000)
132 dead $wzr = SUBSWri %2, 64, 0, implicit-def $nzcv
133 Bcc 0, %bb.11, implicit killed undef $nzcv
137 successors: %bb.9(0x01288b01), %bb.5(0x01288b01), %bb.2(0x11f46a91), %bb.6(0x23e8d524), %bb.7(0x47d1aa49)
139 early-clobber %12:gpr64, dead early-clobber %13:gpr64sp = JumpTableDest32 %8, %7, %jump-table.0
146 STRWui %9, %5, 0 :: (store (s32))
150 STRWui $wzr, %0, 0 :: (store (s32))
151 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
154 BL 0, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
155 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
156 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
158 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
165 successors: %bb.10, %bb.1
167 undef %10.sub_32:gpr64 = IMPLICIT_DEF
172 ADJCALLSTACKDOWN 32, 0, implicit-def dead $sp, implicit $sp
173 ADJCALLSTACKUP 32, 0, implicit-def dead $sp, implicit $sp
177 undef %14.sub_32:gpr64 = COPY %10.sub_32
178 ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp
179 ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp