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_zpr3() #0 { entry: unreachable }
13 define aarch64_sve_vector_pcs void @spills_fills_stack_id_zpr4() #0 { entry: unreachable }
15 attributes #0 = { nounwind "target-features"="+sve" }
19 name: spills_fills_stack_id_ppr
20 tracksRegLiveness: true
22 - { id: 0, class: ppr }
25 - { reg: '$p0', virtual-reg: '%0' }
30 ; CHECK-LABEL: name: spills_fills_stack_id_ppr
32 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 2, alignment: 2
33 ; CHECK-NEXT: stack-id: scalable-vector, callee-saved-register: ''
35 ; EXPAND-LABEL: name: spills_fills_stack_id_ppr
36 ; EXPAND: STR_PXI $p0, $sp, 7
37 ; EXPAND: $p0 = LDR_PXI $sp, 7
62 name: spills_fills_stack_id_zpr
63 tracksRegLiveness: true
65 - { id: 0, class: zpr }
68 - { reg: '$z0', virtual-reg: '%0' }
73 ; CHECK-LABEL: name: spills_fills_stack_id_zpr
75 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 16, alignment: 16
76 ; CHECK-NEXT: stack-id: scalable-vector, callee-saved-register: ''
78 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr
79 ; EXPAND: STR_ZXI $z0, $sp, 0
80 ; EXPAND: $z0 = LDR_ZXI $sp, 0
84 $z0_z1_z2_z3 = IMPLICIT_DEF
85 $z4_z5_z6_z7 = IMPLICIT_DEF
86 $z8_z9_z10_z11 = IMPLICIT_DEF
87 $z12_z13_z14_z15 = IMPLICIT_DEF
88 $z16_z17_z18_z19 = IMPLICIT_DEF
89 $z20_z21_z22_z23 = IMPLICIT_DEF
90 $z24_z25_z26_z27 = IMPLICIT_DEF
91 $z28_z29_z30_z31 = IMPLICIT_DEF
97 name: spills_fills_stack_id_zpr2
98 tracksRegLiveness: true
100 - { id: 0, class: zpr2 }
103 - { reg: '$z0_z1', virtual-reg: '%0' }
108 ; CHECK-LABEL: name: spills_fills_stack_id_zpr2
110 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 32, alignment: 16
111 ; CHECK-NEXT: stack-id: scalable-vector
113 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr2
114 ; EXPAND: STR_ZXI $z0, $sp, 0
115 ; EXPAND: STR_ZXI $z1, $sp, 1
116 ; EXPAND: $z0 = LDR_ZXI $sp, 0
117 ; EXPAND: $z1 = LDR_ZXI $sp, 1
119 %0:zpr2 = COPY $z0_z1
121 $z0_z1_z2_z3 = IMPLICIT_DEF
122 $z4_z5_z6_z7 = IMPLICIT_DEF
123 $z8_z9_z10_z11 = IMPLICIT_DEF
124 $z12_z13_z14_z15 = IMPLICIT_DEF
125 $z16_z17_z18_z19 = IMPLICIT_DEF
126 $z20_z21_z22_z23 = IMPLICIT_DEF
127 $z24_z25_z26_z27 = IMPLICIT_DEF
128 $z28_z29_z30_z31 = IMPLICIT_DEF
134 name: spills_fills_stack_id_zpr3
135 tracksRegLiveness: true
137 - { id: 0, class: zpr3 }
140 - { reg: '$z0_z1_z2', virtual-reg: '%0' }
145 ; CHECK-LABEL: name: spills_fills_stack_id_zpr3
147 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 48, alignment: 16
148 ; CHECK-NEXT: stack-id: scalable-vector
150 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr3
151 ; EXPAND: STR_ZXI $z0, $sp, 0
152 ; EXPAND: STR_ZXI $z1, $sp, 1
153 ; EXPAND: STR_ZXI $z2, $sp, 2
154 ; EXPAND: $z0 = LDR_ZXI $sp, 0
155 ; EXPAND: $z1 = LDR_ZXI $sp, 1
156 ; EXPAND: $z2 = LDR_ZXI $sp, 2
158 %0:zpr3 = COPY $z0_z1_z2
160 $z0_z1_z2_z3 = IMPLICIT_DEF
161 $z4_z5_z6_z7 = IMPLICIT_DEF
162 $z8_z9_z10_z11 = IMPLICIT_DEF
163 $z12_z13_z14_z15 = IMPLICIT_DEF
164 $z16_z17_z18_z19 = IMPLICIT_DEF
165 $z20_z21_z22_z23 = IMPLICIT_DEF
166 $z24_z25_z26_z27 = IMPLICIT_DEF
167 $z28_z29_z30_z31 = IMPLICIT_DEF
173 name: spills_fills_stack_id_zpr4
174 tracksRegLiveness: true
176 - { id: 0, class: zpr4 }
179 - { reg: '$z0_z1_z2_z3', virtual-reg: '%0' }
182 liveins: $z0_z1_z2_z3
184 ; CHECK-LABEL: name: spills_fills_stack_id_zpr4
186 ; CHECK: - { id: 0, name: '', type: spill-slot, offset: 0, size: 64, alignment: 16
187 ; CHECK-NEXT: stack-id: scalable-vector
189 ; EXPAND-LABEL: name: spills_fills_stack_id_zpr4
190 ; EXPAND: STR_ZXI $z0, $sp, 0
191 ; EXPAND: STR_ZXI $z1, $sp, 1
192 ; EXPAND: STR_ZXI $z2, $sp, 2
193 ; EXPAND: STR_ZXI $z3, $sp, 3
194 ; EXPAND: $z0 = LDR_ZXI $sp, 0
195 ; EXPAND: $z1 = LDR_ZXI $sp, 1
196 ; EXPAND: $z2 = LDR_ZXI $sp, 2
197 ; EXPAND: $z3 = LDR_ZXI $sp, 3
199 %0:zpr4 = COPY $z0_z1_z2_z3
201 $z0_z1_z2_z3 = IMPLICIT_DEF
202 $z4_z5_z6_z7 = IMPLICIT_DEF
203 $z8_z9_z10_z11 = IMPLICIT_DEF
204 $z12_z13_z14_z15 = IMPLICIT_DEF
205 $z16_z17_z18_z19 = IMPLICIT_DEF
206 $z20_z21_z22_z23 = IMPLICIT_DEF
207 $z24_z25_z26_z27 = IMPLICIT_DEF
208 $z28_z29_z30_z31 = IMPLICIT_DEF
210 $z0_z1_z2_z3 = COPY %0