1 # RUN: llc -mtriple=aarch64-linux-gnu -run-pass=greedy %s -o - | FileCheck %s
2 # RUN: llc -mtriple=aarch64-linux-gnu -start-before=greedy -stop-after=aarch64-expand-pseudo %s -o - | FileCheck %s --check-prefix=EXPAND
5 source_filename = "<stdin>"
6 target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
7 target triple = "aarch64--linux-gnu"
9 define aarch64_sve_vector_pcs void @spills_fills_stack_id_ppr() #0 { entry: unreachable }
10 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr() #0 { entry: unreachable }
11 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr2() #0 { entry: unreachable }
12 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr2strided() #0 { entry: unreachable }
13 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr3() #0 { entry: unreachable }
14 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr4() #0 { entry: unreachable }
15 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr4strided() #0 { entry: unreachable }
17 attributes #0 = { nounwind "target-features"="+sve" }
21 name: spills_fills_stack_id_ppr
22 tracksRegLiveness: true
24 - { id: 0, class: ppr }
27 - { reg: '$p0', virtual-reg: '%0' }
32 ; CHECK-LABEL: name: spills_fills_stack_id_ppr
34 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 2, alignment: 2
35 ; CHECK-NEXT: stack-id: scalable-vector, callee-saved-register: ''
37 ; EXPAND-LABEL: name: spills_fills_stack_id_ppr
38 ; EXPAND: STR_PXI $p0, $sp, 7
39 ; EXPAND: $p0 = LDR_PXI $sp, 7
64 name: spills_fills_stack_id_zpr
65 tracksRegLiveness: true
67 - { id: 0, class: zpr }
70 - { reg: '$z0', virtual-reg: '%0' }
75 ; CHECK-LABEL: name: spills_fills_stack_id_zpr
77 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 16, alignment: 16
78 ; CHECK-NEXT: stack-id: scalable-vector, callee-saved-register: ''
80 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr
81 ; EXPAND: STR_ZXI $z0, $sp, 0
82 ; EXPAND: $z0 = LDR_ZXI $sp, 0
86 $z0_z1_z2_z3 = IMPLICIT_DEF
87 $z4_z5_z6_z7 = IMPLICIT_DEF
88 $z8_z9_z10_z11 = IMPLICIT_DEF
89 $z12_z13_z14_z15 = IMPLICIT_DEF
90 $z16_z17_z18_z19 = IMPLICIT_DEF
91 $z20_z21_z22_z23 = IMPLICIT_DEF
92 $z24_z25_z26_z27 = IMPLICIT_DEF
93 $z28_z29_z30_z31 = IMPLICIT_DEF
99 name: spills_fills_stack_id_zpr2
100 tracksRegLiveness: true
102 - { id: 0, class: zpr2 }
105 - { reg: '$z0_z1', virtual-reg: '%0' }
110 ; CHECK-LABEL: name: spills_fills_stack_id_zpr2
112 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 32, alignment: 16
113 ; CHECK-NEXT: stack-id: scalable-vector
115 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr2
116 ; EXPAND: STR_ZXI $z0, $sp, 0
117 ; EXPAND: STR_ZXI $z1, $sp, 1
118 ; EXPAND: $z0 = LDR_ZXI $sp, 0
119 ; EXPAND: $z1 = LDR_ZXI $sp, 1
121 %0:zpr2 = COPY $z0_z1
123 $z0_z1_z2_z3 = IMPLICIT_DEF
124 $z4_z5_z6_z7 = IMPLICIT_DEF
125 $z8_z9_z10_z11 = IMPLICIT_DEF
126 $z12_z13_z14_z15 = IMPLICIT_DEF
127 $z16_z17_z18_z19 = IMPLICIT_DEF
128 $z20_z21_z22_z23 = IMPLICIT_DEF
129 $z24_z25_z26_z27 = IMPLICIT_DEF
130 $z28_z29_z30_z31 = IMPLICIT_DEF
136 name: spills_fills_stack_id_zpr2strided
137 tracksRegLiveness: true
139 - { id: 0, class: zpr2strided }
142 - { reg: '$z0_z8', virtual-reg: '%0' }
155 ; CHECK-LABEL: name: spills_fills_stack_id_zpr2strided
157 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 32, alignment: 16
158 ; CHECK-NEXT: stack-id: scalable-vector
160 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr2strided
161 ; EXPAND: STR_ZXI $z0, $sp, 0
162 ; EXPAND: STR_ZXI $z8, $sp, 1
163 ; EXPAND: $z0 = LDR_ZXI $sp, 0
164 ; EXPAND: $z8 = LDR_ZXI $sp, 1
166 %0:zpr2strided = COPY $z0_z8
168 $z0_z1_z2_z3 = IMPLICIT_DEF
169 $z4_z5_z6_z7 = IMPLICIT_DEF
170 $z8_z9_z10_z11 = IMPLICIT_DEF
171 $z12_z13_z14_z15 = IMPLICIT_DEF
172 $z16_z17_z18_z19 = IMPLICIT_DEF
173 $z20_z21_z22_z23 = IMPLICIT_DEF
174 $z24_z25_z26_z27 = IMPLICIT_DEF
175 $z28_z29_z30_z31 = IMPLICIT_DEF
181 name: spills_fills_stack_id_zpr3
182 tracksRegLiveness: true
184 - { id: 0, class: zpr3 }
187 - { reg: '$z0_z1_z2', virtual-reg: '%0' }
192 ; CHECK-LABEL: name: spills_fills_stack_id_zpr3
194 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 48, alignment: 16
195 ; CHECK-NEXT: stack-id: scalable-vector
197 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr3
198 ; EXPAND: STR_ZXI $z0, $sp, 0
199 ; EXPAND: STR_ZXI $z1, $sp, 1
200 ; EXPAND: STR_ZXI $z2, $sp, 2
201 ; EXPAND: $z0 = LDR_ZXI $sp, 0
202 ; EXPAND: $z1 = LDR_ZXI $sp, 1
203 ; EXPAND: $z2 = LDR_ZXI $sp, 2
205 %0:zpr3 = COPY $z0_z1_z2
207 $z0_z1_z2_z3 = IMPLICIT_DEF
208 $z4_z5_z6_z7 = IMPLICIT_DEF
209 $z8_z9_z10_z11 = IMPLICIT_DEF
210 $z12_z13_z14_z15 = IMPLICIT_DEF
211 $z16_z17_z18_z19 = IMPLICIT_DEF
212 $z20_z21_z22_z23 = IMPLICIT_DEF
213 $z24_z25_z26_z27 = IMPLICIT_DEF
214 $z28_z29_z30_z31 = IMPLICIT_DEF
220 name: spills_fills_stack_id_zpr4
221 tracksRegLiveness: true
223 - { id: 0, class: zpr4 }
226 - { reg: '$z0_z1_z2_z3', virtual-reg: '%0' }
229 liveins: $z0_z1_z2_z3
231 ; CHECK-LABEL: name: spills_fills_stack_id_zpr4
233 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 64, alignment: 16
234 ; CHECK-NEXT: stack-id: scalable-vector
236 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr4
237 ; EXPAND: STR_ZXI $z0, $sp, 0
238 ; EXPAND: STR_ZXI $z1, $sp, 1
239 ; EXPAND: STR_ZXI $z2, $sp, 2
240 ; EXPAND: STR_ZXI $z3, $sp, 3
241 ; EXPAND: $z0 = LDR_ZXI $sp, 0
242 ; EXPAND: $z1 = LDR_ZXI $sp, 1
243 ; EXPAND: $z2 = LDR_ZXI $sp, 2
244 ; EXPAND: $z3 = LDR_ZXI $sp, 3
246 %0:zpr4 = COPY $z0_z1_z2_z3
248 $z0_z1_z2_z3 = IMPLICIT_DEF
249 $z4_z5_z6_z7 = IMPLICIT_DEF
250 $z8_z9_z10_z11 = IMPLICIT_DEF
251 $z12_z13_z14_z15 = IMPLICIT_DEF
252 $z16_z17_z18_z19 = IMPLICIT_DEF
253 $z20_z21_z22_z23 = IMPLICIT_DEF
254 $z24_z25_z26_z27 = IMPLICIT_DEF
255 $z28_z29_z30_z31 = IMPLICIT_DEF
257 $z0_z1_z2_z3 = COPY %0
261 name: spills_fills_stack_id_zpr4strided
262 tracksRegLiveness: true
264 - { id: 0, class: zpr4strided }
267 - { reg: '$z0_z4_z8_z12', virtual-reg: '%0' }
270 liveins: $z0_z1_z2_z3
272 $z0_z4_z8_z12 = COPY $z0_z1_z2_z3
277 liveins: $z0_z4_z8_z12
279 ; CHECK-LABEL: name: spills_fills_stack_id_zpr4strided
281 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 64, alignment: 16
282 ; CHECK-NEXT: stack-id: scalable-vector
284 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr4strided
285 ; EXPAND: STR_ZXI $z0, $sp, 0
286 ; EXPAND: STR_ZXI $z4, $sp, 1
287 ; EXPAND: STR_ZXI $z8, $sp, 2
288 ; EXPAND: STR_ZXI $z12, $sp, 3
289 ; EXPAND: $z0 = LDR_ZXI $sp, 0
290 ; EXPAND: $z4 = LDR_ZXI $sp, 1
291 ; EXPAND: $z8 = LDR_ZXI $sp, 2
292 ; EXPAND: $z12 = LDR_ZXI $sp, 3
294 %0:zpr4strided = COPY $z0_z4_z8_z12
296 $z0_z1_z2_z3 = IMPLICIT_DEF
297 $z4_z5_z6_z7 = IMPLICIT_DEF
298 $z8_z9_z10_z11 = IMPLICIT_DEF
299 $z12_z13_z14_z15 = IMPLICIT_DEF
300 $z16_z17_z18_z19 = IMPLICIT_DEF
301 $z20_z21_z22_z23 = IMPLICIT_DEF
302 $z24_z25_z26_z27 = IMPLICIT_DEF
303 $z28_z29_z30_z31 = IMPLICIT_DEF
305 $z0_z4_z8_z12 = COPY %0