@@ -108,35 +108,39 @@ define <vscale x 1 x double> @foo(<vscale x 1 x double> %a, <vscale x 1 x double
108
108
;
109
109
; SPILL-O2-ZCMP-LABEL: foo:
110
110
; SPILL-O2-ZCMP: # %bb.0:
111
- ; SPILL-O2-ZCMP-NEXT: cm.push {ra, s0}, -16
112
- ; SPILL-O2-ZCMP-NEXT: .cfi_def_cfa_offset 16
111
+ ; SPILL-O2-ZCMP-NEXT: cm.push {ra, s0}, -32
112
+ ; SPILL-O2-ZCMP-NEXT: .cfi_def_cfa_offset 32
113
113
; SPILL-O2-ZCMP-NEXT: .cfi_offset ra, -8
114
114
; SPILL-O2-ZCMP-NEXT: .cfi_offset s0, -4
115
115
; SPILL-O2-ZCMP-NEXT: csrr a1, vlenb
116
116
; SPILL-O2-ZCMP-NEXT: slli a1, a1, 1
117
117
; SPILL-O2-ZCMP-NEXT: sub sp, sp, a1
118
- ; SPILL-O2-ZCMP-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10 , 0x22, 0x11, 0x02, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 2 * vlenb
118
+ ; SPILL-O2-ZCMP-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x20 , 0x22, 0x11, 0x02, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 32 + 2 * vlenb
119
119
; SPILL-O2-ZCMP-NEXT: mv s0, a0
120
- ; SPILL-O2-ZCMP-NEXT: vs1r.v v8, (sp) # vscale x 8-byte Folded Spill
120
+ ; SPILL-O2-ZCMP-NEXT: addi a1, sp, 16
121
+ ; SPILL-O2-ZCMP-NEXT: vs1r.v v8, (a1) # vscale x 8-byte Folded Spill
121
122
; SPILL-O2-ZCMP-NEXT: vsetvli zero, a0, e64, m1, ta, ma
122
123
; SPILL-O2-ZCMP-NEXT: vfadd.vv v9, v8, v9
123
124
; SPILL-O2-ZCMP-NEXT: csrr a0, vlenb
124
125
; SPILL-O2-ZCMP-NEXT: add a0, a0, sp
126
+ ; SPILL-O2-ZCMP-NEXT: addi a0, a0, 16
125
127
; SPILL-O2-ZCMP-NEXT: vs1r.v v9, (a0) # vscale x 8-byte Folded Spill
126
128
; SPILL-O2-ZCMP-NEXT: lui a0, %hi(.L.str)
127
129
; SPILL-O2-ZCMP-NEXT: addi a0, a0, %lo(.L.str)
128
130
; SPILL-O2-ZCMP-NEXT: call puts
129
131
; SPILL-O2-ZCMP-NEXT: csrr a0, vlenb
130
132
; SPILL-O2-ZCMP-NEXT: add a0, a0, sp
133
+ ; SPILL-O2-ZCMP-NEXT: addi a0, a0, 16
131
134
; SPILL-O2-ZCMP-NEXT: vl1r.v v8, (a0) # vscale x 8-byte Folded Reload
132
- ; SPILL-O2-ZCMP-NEXT: vl1r.v v9, (sp) # vscale x 8-byte Folded Reload
135
+ ; SPILL-O2-ZCMP-NEXT: addi a0, sp, 16
136
+ ; SPILL-O2-ZCMP-NEXT: vl1r.v v9, (a0) # vscale x 8-byte Folded Reload
133
137
; SPILL-O2-ZCMP-NEXT: vsetvli zero, s0, e64, m1, ta, ma
134
138
; SPILL-O2-ZCMP-NEXT: vfadd.vv v8, v9, v8
135
139
; SPILL-O2-ZCMP-NEXT: csrr a0, vlenb
136
140
; SPILL-O2-ZCMP-NEXT: slli a0, a0, 1
137
141
; SPILL-O2-ZCMP-NEXT: add sp, sp, a0
138
- ; SPILL-O2-ZCMP-NEXT: .cfi_def_cfa sp, 16
139
- ; SPILL-O2-ZCMP-NEXT: cm.popret {ra, s0}, 16
142
+ ; SPILL-O2-ZCMP-NEXT: .cfi_def_cfa sp, 32
143
+ ; SPILL-O2-ZCMP-NEXT: cm.popret {ra, s0}, 32
140
144
;
141
145
; SPILL-O0-VSETVLI-LABEL: foo:
142
146
; SPILL-O0-VSETVLI: # %bb.0:
@@ -227,33 +231,37 @@ define <vscale x 1 x double> @foo(<vscale x 1 x double> %a, <vscale x 1 x double
227
231
;
228
232
; SPILL-O2-ZCMP-VSETVLI-LABEL: foo:
229
233
; SPILL-O2-ZCMP-VSETVLI: # %bb.0:
230
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: cm.push {ra, s0}, -16
231
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_def_cfa_offset 16
234
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: cm.push {ra, s0}, -32
235
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_def_cfa_offset 32
232
236
; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_offset ra, -8
233
237
; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_offset s0, -4
234
238
; SPILL-O2-ZCMP-VSETVLI-NEXT: vsetvli a1, zero, e8, m2, ta, ma
235
239
; SPILL-O2-ZCMP-VSETVLI-NEXT: sub sp, sp, a1
236
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10 , 0x22, 0x11, 0x02, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 2 * vlenb
240
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x20 , 0x22, 0x11, 0x02, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 32 + 2 * vlenb
237
241
; SPILL-O2-ZCMP-VSETVLI-NEXT: mv s0, a0
238
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: vs1r.v v8, (sp) # vscale x 8-byte Folded Spill
242
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: addi a1, sp, 16
243
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: vs1r.v v8, (a1) # vscale x 8-byte Folded Spill
239
244
; SPILL-O2-ZCMP-VSETVLI-NEXT: vsetvli zero, a0, e64, m1, ta, ma
240
245
; SPILL-O2-ZCMP-VSETVLI-NEXT: vfadd.vv v9, v8, v9
241
246
; SPILL-O2-ZCMP-VSETVLI-NEXT: csrr a0, vlenb
242
247
; SPILL-O2-ZCMP-VSETVLI-NEXT: add a0, a0, sp
248
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: addi a0, a0, 16
243
249
; SPILL-O2-ZCMP-VSETVLI-NEXT: vs1r.v v9, (a0) # vscale x 8-byte Folded Spill
244
250
; SPILL-O2-ZCMP-VSETVLI-NEXT: lui a0, %hi(.L.str)
245
251
; SPILL-O2-ZCMP-VSETVLI-NEXT: addi a0, a0, %lo(.L.str)
246
252
; SPILL-O2-ZCMP-VSETVLI-NEXT: call puts
247
253
; SPILL-O2-ZCMP-VSETVLI-NEXT: csrr a0, vlenb
248
254
; SPILL-O2-ZCMP-VSETVLI-NEXT: add a0, a0, sp
255
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: addi a0, a0, 16
249
256
; SPILL-O2-ZCMP-VSETVLI-NEXT: vl1r.v v8, (a0) # vscale x 8-byte Folded Reload
250
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: vl1r.v v9, (sp) # vscale x 8-byte Folded Reload
257
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: addi a0, sp, 16
258
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: vl1r.v v9, (a0) # vscale x 8-byte Folded Reload
251
259
; SPILL-O2-ZCMP-VSETVLI-NEXT: vsetvli zero, s0, e64, m1, ta, ma
252
260
; SPILL-O2-ZCMP-VSETVLI-NEXT: vfadd.vv v8, v9, v8
253
261
; SPILL-O2-ZCMP-VSETVLI-NEXT: vsetvli a0, zero, e8, m2, ta, ma
254
262
; SPILL-O2-ZCMP-VSETVLI-NEXT: add sp, sp, a0
255
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_def_cfa sp, 16
256
- ; SPILL-O2-ZCMP-VSETVLI-NEXT: cm.popret {ra, s0}, 16
263
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: .cfi_def_cfa sp, 32
264
+ ; SPILL-O2-ZCMP-VSETVLI-NEXT: cm.popret {ra, s0}, 32
257
265
{
258
266
%x = call <vscale x 1 x double > @llvm.riscv.vfadd.nxv1f64.nxv1f64 (<vscale x 1 x double > undef , <vscale x 1 x double > %a , <vscale x 1 x double > %b , i32 7 , i32 %gvl )
259
267
%call = call signext i32 @puts (ptr @.str )
0 commit comments