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
10 kind: label-difference32
13 blocks: [ '%bb.9', '%bb.5', '%bb.2', '%bb.2', '%bb.2' ]
15 ; CHECK-LABEL: name: widget
17 ; CHECK-NEXT: successors: %bb.1(0x80000000)
18 ; CHECK-NEXT: liveins: $w0, $w1, $x2, $x3, $x4, $w5, $w6
20 ; CHECK-NEXT: [[DEF:%[0-9]+]]:gpr64common = IMPLICIT_DEF
21 ; CHECK-NEXT: [[DEF1:%[0-9]+]]:gpr64 = IMPLICIT_DEF
22 ; CHECK-NEXT: [[DEF2:%[0-9]+]]:gpr32common = IMPLICIT_DEF
23 ; CHECK-NEXT: [[DEF3:%[0-9]+]]:gpr32 = IMPLICIT_DEF
24 ; CHECK-NEXT: [[DEF4:%[0-9]+]]:gpr32 = IMPLICIT_DEF
25 ; CHECK-NEXT: [[DEF5:%[0-9]+]]:gpr64common = IMPLICIT_DEF
26 ; CHECK-NEXT: [[DEF6:%[0-9]+]]:gpr32 = IMPLICIT_DEF
27 ; CHECK-NEXT: undef [[DEF7:%[0-9]+]].sub_32:gpr64 = IMPLICIT_DEF
28 ; CHECK-NEXT: [[DEF8:%[0-9]+]]:gpr64common = IMPLICIT_DEF
29 ; CHECK-NEXT: [[DEF9:%[0-9]+]]:gpr32 = IMPLICIT_DEF
30 ; CHECK-NEXT: dead [[DEF10:%[0-9]+]]:gpr64 = IMPLICIT_DEF
31 ; CHECK-NEXT: undef [[DEF11:%[0-9]+]].sub_32:gpr64 = IMPLICIT_DEF implicit-def dead %11
32 ; CHECK-NEXT: STRXui [[DEF11]], %stack.0, 0 :: (store (s64) into %stack.0)
35 ; CHECK-NEXT: successors: %bb.2(0x80000000)
38 ; CHECK-NEXT: successors: %bb.3(0x0fbefbf0), %bb.4(0x70410410)
40 ; CHECK-NEXT: Bcc 8, %bb.3, implicit killed undef $nzcv
44 ; CHECK-NEXT: successors: %bb.11(0x00000000), %bb.2(0x80000000)
46 ; CHECK-NEXT: dead $wzr = SUBSWri [[DEF2]], 64, 0, implicit-def $nzcv
47 ; CHECK-NEXT: Bcc 0, %bb.11, implicit killed undef $nzcv
51 ; CHECK-NEXT: successors: %bb.9(0x01288b01), %bb.5(0x01288b01), %bb.2(0x11f46a91), %bb.6(0x23e8d524), %bb.7(0x47d1aa49)
53 ; CHECK-NEXT: dead early-clobber %12:gpr64, dead early-clobber %13:gpr64sp = JumpTableDest32 [[DEF8]], [[DEF7]], %jump-table.0
54 ; CHECK-NEXT: BR undef %18:gpr64
57 ; CHECK-NEXT: successors: %bb.8(0x80000000)
62 ; CHECK-NEXT: successors: %bb.2(0x80000000)
64 ; CHECK-NEXT: STRWui [[DEF9]], [[DEF5]], 0 :: (store (s32))
68 ; CHECK-NEXT: successors: %bb.2(0x80000000)
70 ; CHECK-NEXT: STRWui $wzr, [[DEF]], 0 :: (store (s32))
71 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
72 ; CHECK-NEXT: $w0 = COPY [[DEF4]]
73 ; CHECK-NEXT: $x1 = COPY [[DEF1]]
74 ; CHECK-NEXT: BL 0, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
75 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
76 ; CHECK-NEXT: ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
77 ; CHECK-NEXT: $w0 = COPY [[DEF6]]
78 ; CHECK-NEXT: ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
82 ; CHECK-NEXT: successors: %bb.8(0x80000000)
87 ; CHECK-NEXT: successors: %bb.10(0x40000000), %bb.1(0x40000000)
89 ; CHECK-NEXT: undef [[DEF12:%[0-9]+]].sub_32:gpr64 = IMPLICIT_DEF
90 ; CHECK-NEXT: STRXui [[DEF12]], %stack.0, 0 :: (store (s64) into %stack.0)
91 ; CHECK-NEXT: TBZW [[DEF3]], 0, %bb.1
92 ; CHECK-NEXT: B %bb.10
95 ; CHECK-NEXT: successors: %bb.1(0x80000000)
97 ; CHECK-NEXT: ADJCALLSTACKDOWN 32, 0, implicit-def dead $sp, implicit $sp
98 ; CHECK-NEXT: ADJCALLSTACKUP 32, 0, implicit-def dead $sp, implicit $sp
102 ; CHECK-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui %stack.0, 0 :: (load (s64) from %stack.0)
103 ; CHECK-NEXT: dead undef [[COPY:%[0-9]+]].sub_32:gpr64 = COPY [[LDRXui]].sub_32
104 ; CHECK-NEXT: ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp
105 ; CHECK-NEXT: ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp
107 liveins: $w0, $w1, $x2, $x3, $x4, $w5, $w6
109 %0:gpr64common = IMPLICIT_DEF
110 %1:gpr64 = IMPLICIT_DEF
111 %2:gpr32common = IMPLICIT_DEF
112 %3:gpr32 = IMPLICIT_DEF
113 %4:gpr32 = IMPLICIT_DEF
114 %5:gpr64common = IMPLICIT_DEF
115 %6:gpr32 = IMPLICIT_DEF
116 undef %7.sub_32:gpr64 = IMPLICIT_DEF
117 %8:gpr64common = IMPLICIT_DEF
118 %9:gpr32 = IMPLICIT_DEF
119 %10:gpr64 = IMPLICIT_DEF
120 undef %10.sub_32:gpr64 = IMPLICIT_DEF implicit-def %11:gpr64
125 successors: %bb.3(0x0fbefbf0), %bb.4(0x70410410)
127 Bcc 8, %bb.3, implicit killed undef $nzcv
131 successors: %bb.11(0x00000000), %bb.2(0x80000000)
133 dead $wzr = SUBSWri %2, 64, 0, implicit-def $nzcv
134 Bcc 0, %bb.11, implicit killed undef $nzcv
138 successors: %bb.9(0x01288b01), %bb.5(0x01288b01), %bb.2(0x11f46a91), %bb.6(0x23e8d524), %bb.7(0x47d1aa49)
140 early-clobber %12:gpr64, dead early-clobber %13:gpr64sp = JumpTableDest32 %8, %7, %jump-table.0
147 STRWui %9, %5, 0 :: (store (s32))
151 STRWui $wzr, %0, 0 :: (store (s32))
152 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
155 BL 0, csr_darwin_aarch64_aapcs, implicit-def dead $lr, implicit $sp, implicit-def $sp, implicit-def dead $w0
156 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
157 ADJCALLSTACKDOWN 0, 0, implicit-def dead $sp, implicit $sp
159 ADJCALLSTACKUP 0, 0, implicit-def dead $sp, implicit $sp
166 successors: %bb.10, %bb.1
168 undef %10.sub_32:gpr64 = IMPLICIT_DEF
173 ADJCALLSTACKDOWN 32, 0, implicit-def dead $sp, implicit $sp
174 ADJCALLSTACKUP 32, 0, implicit-def dead $sp, implicit $sp
178 undef %14.sub_32:gpr64 = COPY %10.sub_32
179 ADJCALLSTACKDOWN 8, 0, implicit-def dead $sp, implicit $sp
180 ADJCALLSTACKUP 8, 0, implicit-def dead $sp, implicit $sp