1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+m,+d,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+m,+d,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+m,+d,+zfhmin,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+m,+d,+zfhmin,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 ; This tests a mix of vfmsac and vfmsub by using different operand orders to
12 ; trigger commuting in TwoAddressInstructionPass.
14 declare <vscale x 1 x half> @llvm.experimental.constrained.fma.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, metadata, metadata)
16 define <vscale x 1 x half> @vfmsub_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc) strictfp {
17 ; ZVFH-LABEL: vfmsub_vv_nxv1f16:
19 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
20 ; ZVFH-NEXT: vfmsub.vv v8, v9, v10
23 ; ZVFHMIN-LABEL: vfmsub_vv_nxv1f16:
25 ; ZVFHMIN-NEXT: lui a0, 8
26 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
27 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
28 ; ZVFHMIN-NEXT: vxor.vx v9, v10, a0
29 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
30 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
31 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
32 ; ZVFHMIN-NEXT: vfmadd.vv v9, v11, v10
33 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
34 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
36 %neg = fneg <vscale x 1 x half> %vc
37 %vd = call <vscale x 1 x half> @llvm.experimental.constrained.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
38 ret <vscale x 1 x half> %vd
41 define <vscale x 1 x half> @vfmsub_vf_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, half %c) strictfp {
42 ; ZVFH-LABEL: vfmsub_vf_nxv1f16:
44 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
45 ; ZVFH-NEXT: vfmsub.vf v8, fa0, v9
48 ; ZVFHMIN-LABEL: vfmsub_vf_nxv1f16:
50 ; ZVFHMIN-NEXT: fmv.x.h a0, fa0
51 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
52 ; ZVFHMIN-NEXT: vmv.v.x v10, a0
53 ; ZVFHMIN-NEXT: lui a0, 8
54 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8
55 ; ZVFHMIN-NEXT: vxor.vx v8, v9, a0
56 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
57 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
58 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
59 ; ZVFHMIN-NEXT: vfmadd.vv v12, v11, v9
60 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
61 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
63 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
64 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
65 %neg = fneg <vscale x 1 x half> %vb
66 %vd = call <vscale x 1 x half> @llvm.experimental.constrained.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %splat, <vscale x 1 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
67 ret <vscale x 1 x half> %vd
70 declare <vscale x 2 x half> @llvm.experimental.constrained.fma.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, metadata, metadata)
72 define <vscale x 2 x half> @vfmsub_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %vc) strictfp {
73 ; ZVFH-LABEL: vfmsub_vv_nxv2f16:
75 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
76 ; ZVFH-NEXT: vfmsub.vv v8, v10, v9
79 ; ZVFHMIN-LABEL: vfmsub_vv_nxv2f16:
81 ; ZVFHMIN-NEXT: lui a0, 8
82 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
83 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v10
84 ; ZVFHMIN-NEXT: vxor.vx v9, v9, a0
85 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
86 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
87 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
88 ; ZVFHMIN-NEXT: vfmadd.vv v9, v11, v10
89 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
90 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
92 %neg = fneg <vscale x 2 x half> %vb
93 %vd = call <vscale x 2 x half> @llvm.experimental.constrained.fma.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vc, <vscale x 2 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
94 ret <vscale x 2 x half> %vd
97 define <vscale x 2 x half> @vfmsub_vf_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, half %c) strictfp {
98 ; ZVFH-LABEL: vfmsub_vf_nxv2f16:
100 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
101 ; ZVFH-NEXT: vfmsac.vf v8, fa0, v9
104 ; ZVFHMIN-LABEL: vfmsub_vf_nxv2f16:
106 ; ZVFHMIN-NEXT: fmv.x.h a0, fa0
107 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
108 ; ZVFHMIN-NEXT: vmv.v.x v10, a0
109 ; ZVFHMIN-NEXT: lui a0, 8
110 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
111 ; ZVFHMIN-NEXT: vxor.vx v8, v8, a0
112 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
113 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
114 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
115 ; ZVFHMIN-NEXT: vfmadd.vv v12, v11, v9
116 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
117 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
119 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
120 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
121 %neg = fneg <vscale x 2 x half> %va
122 %vd = call <vscale x 2 x half> @llvm.experimental.constrained.fma.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x half> %splat, <vscale x 2 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
123 ret <vscale x 2 x half> %vd
126 declare <vscale x 4 x half> @llvm.experimental.constrained.fma.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, metadata, metadata)
128 define <vscale x 4 x half> @vfmsub_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %vc) strictfp {
129 ; ZVFH-LABEL: vfmsub_vv_nxv4f16:
131 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
132 ; ZVFH-NEXT: vfmsub.vv v8, v9, v10
135 ; ZVFHMIN-LABEL: vfmsub_vv_nxv4f16:
137 ; ZVFHMIN-NEXT: lui a0, 8
138 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
139 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
140 ; ZVFHMIN-NEXT: vxor.vx v8, v10, a0
141 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
142 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v9
143 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
144 ; ZVFHMIN-NEXT: vfmadd.vv v14, v12, v10
145 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
146 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v14
148 %neg = fneg <vscale x 4 x half> %vc
149 %vd = call <vscale x 4 x half> @llvm.experimental.constrained.fma.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x half> %va, <vscale x 4 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
150 ret <vscale x 4 x half> %vd
153 define <vscale x 4 x half> @vfmsub_vf_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, half %c) strictfp {
154 ; ZVFH-LABEL: vfmsub_vf_nxv4f16:
156 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
157 ; ZVFH-NEXT: vfmsub.vf v8, fa0, v9
160 ; ZVFHMIN-LABEL: vfmsub_vf_nxv4f16:
162 ; ZVFHMIN-NEXT: fmv.x.h a0, fa0
163 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
164 ; ZVFHMIN-NEXT: vmv.v.x v10, a0
165 ; ZVFHMIN-NEXT: lui a0, 8
166 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
167 ; ZVFHMIN-NEXT: vxor.vx v8, v9, a0
168 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v8
169 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
170 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
171 ; ZVFHMIN-NEXT: vfmadd.vv v16, v12, v14
172 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
173 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
175 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
176 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
177 %neg = fneg <vscale x 4 x half> %vb
178 %vd = call <vscale x 4 x half> @llvm.experimental.constrained.fma.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %splat, <vscale x 4 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
179 ret <vscale x 4 x half> %vd
182 declare <vscale x 8 x half> @llvm.experimental.constrained.fma.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, metadata, metadata)
184 define <vscale x 8 x half> @vfmsub_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %vc) strictfp {
185 ; ZVFH-LABEL: vfmsub_vv_nxv8f16:
187 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
188 ; ZVFH-NEXT: vfmsac.vv v8, v12, v10
191 ; ZVFHMIN-LABEL: vfmsub_vv_nxv8f16:
193 ; ZVFHMIN-NEXT: lui a0, 8
194 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
195 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
196 ; ZVFHMIN-NEXT: vxor.vx v8, v8, a0
197 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
198 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v10
199 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
200 ; ZVFHMIN-NEXT: vfmadd.vv v20, v16, v12
201 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
202 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v20
204 %neg = fneg <vscale x 8 x half> %va
205 %vd = call <vscale x 8 x half> @llvm.experimental.constrained.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %vc, <vscale x 8 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
206 ret <vscale x 8 x half> %vd
209 define <vscale x 8 x half> @vfmsub_vf_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, half %c) strictfp {
210 ; ZVFH-LABEL: vfmsub_vf_nxv8f16:
212 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
213 ; ZVFH-NEXT: vfmsac.vf v8, fa0, v10
216 ; ZVFHMIN-LABEL: vfmsub_vf_nxv8f16:
218 ; ZVFHMIN-NEXT: fmv.x.h a0, fa0
219 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
220 ; ZVFHMIN-NEXT: vmv.v.x v12, a0
221 ; ZVFHMIN-NEXT: lui a0, 8
222 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
223 ; ZVFHMIN-NEXT: vxor.vx v8, v8, a0
224 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v8
225 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
226 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
227 ; ZVFHMIN-NEXT: vfmadd.vv v24, v16, v20
228 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
229 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v24
231 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
232 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
233 %neg = fneg <vscale x 8 x half> %va
234 %vd = call <vscale x 8 x half> @llvm.experimental.constrained.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %splat, <vscale x 8 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
235 ret <vscale x 8 x half> %vd
238 declare <vscale x 16 x half> @llvm.experimental.constrained.fma.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x half>, metadata, metadata)
240 define <vscale x 16 x half> @vfmsub_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %vc) strictfp {
241 ; ZVFH-LABEL: vfmsub_vv_nxv16f16:
243 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
244 ; ZVFH-NEXT: vfmsub.vv v8, v16, v12
247 ; ZVFHMIN-LABEL: vfmsub_vv_nxv16f16:
249 ; ZVFHMIN-NEXT: addi sp, sp, -16
250 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
251 ; ZVFHMIN-NEXT: csrr a0, vlenb
252 ; ZVFHMIN-NEXT: slli a0, a0, 2
253 ; ZVFHMIN-NEXT: sub sp, sp, a0
254 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x04, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 4 * vlenb
255 ; ZVFHMIN-NEXT: addi a0, sp, 16
256 ; ZVFHMIN-NEXT: vs4r.v v16, (a0) # Unknown-size Folded Spill
257 ; ZVFHMIN-NEXT: lui a0, 8
258 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
259 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
260 ; ZVFHMIN-NEXT: vxor.vx v8, v12, a0
261 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v8
262 ; ZVFHMIN-NEXT: addi a0, sp, 16
263 ; ZVFHMIN-NEXT: vl4r.v v8, (a0) # Unknown-size Folded Reload
264 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
265 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
266 ; ZVFHMIN-NEXT: vfmadd.vv v24, v16, v0
267 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
268 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v24
269 ; ZVFHMIN-NEXT: csrr a0, vlenb
270 ; ZVFHMIN-NEXT: slli a0, a0, 2
271 ; ZVFHMIN-NEXT: add sp, sp, a0
272 ; ZVFHMIN-NEXT: .cfi_def_cfa sp, 16
273 ; ZVFHMIN-NEXT: addi sp, sp, 16
274 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 0
276 %neg = fneg <vscale x 16 x half> %vb
277 %vd = call <vscale x 16 x half> @llvm.experimental.constrained.fma.nxv16f16(<vscale x 16 x half> %vc, <vscale x 16 x half> %va, <vscale x 16 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
278 ret <vscale x 16 x half> %vd
281 define <vscale x 16 x half> @vfmsub_vf_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, half %c) strictfp {
282 ; ZVFH-LABEL: vfmsub_vf_nxv16f16:
284 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
285 ; ZVFH-NEXT: vfmsub.vf v8, fa0, v12
288 ; ZVFHMIN-LABEL: vfmsub_vf_nxv16f16:
290 ; ZVFHMIN-NEXT: addi sp, sp, -16
291 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
292 ; ZVFHMIN-NEXT: csrr a0, vlenb
293 ; ZVFHMIN-NEXT: slli a0, a0, 2
294 ; ZVFHMIN-NEXT: sub sp, sp, a0
295 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x04, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 4 * vlenb
296 ; ZVFHMIN-NEXT: fmv.x.h a0, fa0
297 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
298 ; ZVFHMIN-NEXT: vmv.v.x v16, a0
299 ; ZVFHMIN-NEXT: addi a0, sp, 16
300 ; ZVFHMIN-NEXT: vs4r.v v16, (a0) # Unknown-size Folded Spill
301 ; ZVFHMIN-NEXT: lui a0, 8
302 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
303 ; ZVFHMIN-NEXT: vxor.vx v8, v12, a0
304 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v8
305 ; ZVFHMIN-NEXT: addi a0, sp, 16
306 ; ZVFHMIN-NEXT: vl4r.v v8, (a0) # Unknown-size Folded Reload
307 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
308 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
309 ; ZVFHMIN-NEXT: vfmadd.vv v16, v24, v0
310 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
311 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
312 ; ZVFHMIN-NEXT: csrr a0, vlenb
313 ; ZVFHMIN-NEXT: slli a0, a0, 2
314 ; ZVFHMIN-NEXT: add sp, sp, a0
315 ; ZVFHMIN-NEXT: .cfi_def_cfa sp, 16
316 ; ZVFHMIN-NEXT: addi sp, sp, 16
317 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 0
319 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
320 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
321 %neg = fneg <vscale x 16 x half> %vb
322 %vd = call <vscale x 16 x half> @llvm.experimental.constrained.fma.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %splat, <vscale x 16 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
323 ret <vscale x 16 x half> %vd
326 declare <vscale x 32 x half> @llvm.experimental.constrained.fma.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x half>, metadata, metadata)
328 define <vscale x 32 x half> @vfmsub_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x half> %vc) strictfp {
329 ; ZVFH-LABEL: vfmsub_vv_nxv32f16:
331 ; ZVFH-NEXT: vl8re16.v v24, (a0)
332 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
333 ; ZVFH-NEXT: vfmsac.vv v8, v16, v24
336 ; ZVFHMIN-LABEL: vfmsub_vv_nxv32f16:
338 ; ZVFHMIN-NEXT: addi sp, sp, -16
339 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
340 ; ZVFHMIN-NEXT: csrr a1, vlenb
341 ; ZVFHMIN-NEXT: li a2, 24
342 ; ZVFHMIN-NEXT: mul a1, a1, a2
343 ; ZVFHMIN-NEXT: sub sp, sp, a1
344 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb
345 ; ZVFHMIN-NEXT: csrr a1, vlenb
346 ; ZVFHMIN-NEXT: slli a1, a1, 4
347 ; ZVFHMIN-NEXT: add a1, sp, a1
348 ; ZVFHMIN-NEXT: addi a1, a1, 16
349 ; ZVFHMIN-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
350 ; ZVFHMIN-NEXT: vl8re16.v v24, (a0)
351 ; ZVFHMIN-NEXT: csrr a0, vlenb
352 ; ZVFHMIN-NEXT: slli a0, a0, 3
353 ; ZVFHMIN-NEXT: add a0, sp, a0
354 ; ZVFHMIN-NEXT: addi a0, a0, 16
355 ; ZVFHMIN-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
356 ; ZVFHMIN-NEXT: lui a0, 8
357 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
358 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v16
359 ; ZVFHMIN-NEXT: addi a1, sp, 16
360 ; ZVFHMIN-NEXT: vs8r.v v0, (a1) # Unknown-size Folded Spill
361 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m8, ta, ma
362 ; ZVFHMIN-NEXT: vxor.vx v8, v8, a0
363 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
364 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
365 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v24
366 ; ZVFHMIN-NEXT: addi a0, sp, 16
367 ; ZVFHMIN-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
368 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
369 ; ZVFHMIN-NEXT: vfmadd.vv v0, v24, v16
370 ; ZVFHMIN-NEXT: csrr a0, vlenb
371 ; ZVFHMIN-NEXT: slli a0, a0, 4
372 ; ZVFHMIN-NEXT: add a0, sp, a0
373 ; ZVFHMIN-NEXT: addi a0, a0, 16
374 ; ZVFHMIN-NEXT: vl8r.v v16, (a0) # Unknown-size Folded Reload
375 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
376 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
377 ; ZVFHMIN-NEXT: addi a0, sp, 16
378 ; ZVFHMIN-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
379 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
380 ; ZVFHMIN-NEXT: csrr a0, vlenb
381 ; ZVFHMIN-NEXT: slli a0, a0, 3
382 ; ZVFHMIN-NEXT: add a0, sp, a0
383 ; ZVFHMIN-NEXT: addi a0, a0, 16
384 ; ZVFHMIN-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
385 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
386 ; ZVFHMIN-NEXT: addi a0, sp, 16
387 ; ZVFHMIN-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
388 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
389 ; ZVFHMIN-NEXT: vfmadd.vv v16, v8, v24
390 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
391 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v0
392 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
393 ; ZVFHMIN-NEXT: csrr a0, vlenb
394 ; ZVFHMIN-NEXT: li a1, 24
395 ; ZVFHMIN-NEXT: mul a0, a0, a1
396 ; ZVFHMIN-NEXT: add sp, sp, a0
397 ; ZVFHMIN-NEXT: .cfi_def_cfa sp, 16
398 ; ZVFHMIN-NEXT: addi sp, sp, 16
399 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 0
401 %neg = fneg <vscale x 32 x half> %va
402 %vd = call <vscale x 32 x half> @llvm.experimental.constrained.fma.nxv32f16(<vscale x 32 x half> %vc, <vscale x 32 x half> %vb, <vscale x 32 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
403 ret <vscale x 32 x half> %vd
406 define <vscale x 32 x half> @vfmsub_vf_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, half %c) strictfp {
407 ; ZVFH-LABEL: vfmsub_vf_nxv32f16:
409 ; ZVFH-NEXT: vsetvli a0, zero, e16, m8, ta, ma
410 ; ZVFH-NEXT: vfmsac.vf v8, fa0, v16
413 ; ZVFHMIN-LABEL: vfmsub_vf_nxv32f16:
415 ; ZVFHMIN-NEXT: addi sp, sp, -16
416 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
417 ; ZVFHMIN-NEXT: csrr a0, vlenb
418 ; ZVFHMIN-NEXT: li a1, 24
419 ; ZVFHMIN-NEXT: mul a0, a0, a1
420 ; ZVFHMIN-NEXT: sub sp, sp, a0
421 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb
422 ; ZVFHMIN-NEXT: csrr a0, vlenb
423 ; ZVFHMIN-NEXT: slli a0, a0, 3
424 ; ZVFHMIN-NEXT: add a0, sp, a0
425 ; ZVFHMIN-NEXT: addi a0, a0, 16
426 ; ZVFHMIN-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill
427 ; ZVFHMIN-NEXT: fmv.x.h a0, fa0
428 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m8, ta, ma
429 ; ZVFHMIN-NEXT: vmv.v.x v24, a0
430 ; ZVFHMIN-NEXT: csrr a0, vlenb
431 ; ZVFHMIN-NEXT: slli a0, a0, 4
432 ; ZVFHMIN-NEXT: add a0, sp, a0
433 ; ZVFHMIN-NEXT: addi a0, a0, 16
434 ; ZVFHMIN-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
435 ; ZVFHMIN-NEXT: lui a0, 8
436 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
437 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
438 ; ZVFHMIN-NEXT: addi a1, sp, 16
439 ; ZVFHMIN-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
440 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m8, ta, ma
441 ; ZVFHMIN-NEXT: vxor.vx v8, v8, a0
442 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
443 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
444 ; ZVFHMIN-NEXT: csrr a0, vlenb
445 ; ZVFHMIN-NEXT: slli a0, a0, 4
446 ; ZVFHMIN-NEXT: add a0, sp, a0
447 ; ZVFHMIN-NEXT: addi a0, a0, 16
448 ; ZVFHMIN-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
449 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v24
450 ; ZVFHMIN-NEXT: addi a0, sp, 16
451 ; ZVFHMIN-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
452 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
453 ; ZVFHMIN-NEXT: vfmadd.vv v0, v24, v16
454 ; ZVFHMIN-NEXT: csrr a0, vlenb
455 ; ZVFHMIN-NEXT: slli a0, a0, 3
456 ; ZVFHMIN-NEXT: add a0, sp, a0
457 ; ZVFHMIN-NEXT: addi a0, a0, 16
458 ; ZVFHMIN-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
459 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
460 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v28
461 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
462 ; ZVFHMIN-NEXT: csrr a0, vlenb
463 ; ZVFHMIN-NEXT: slli a0, a0, 3
464 ; ZVFHMIN-NEXT: add a0, sp, a0
465 ; ZVFHMIN-NEXT: addi a0, a0, 16
466 ; ZVFHMIN-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
467 ; ZVFHMIN-NEXT: csrr a0, vlenb
468 ; ZVFHMIN-NEXT: slli a0, a0, 4
469 ; ZVFHMIN-NEXT: add a0, sp, a0
470 ; ZVFHMIN-NEXT: addi a0, a0, 16
471 ; ZVFHMIN-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
472 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v28
473 ; ZVFHMIN-NEXT: csrr a0, vlenb
474 ; ZVFHMIN-NEXT: slli a0, a0, 3
475 ; ZVFHMIN-NEXT: add a0, sp, a0
476 ; ZVFHMIN-NEXT: addi a0, a0, 16
477 ; ZVFHMIN-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
478 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
479 ; ZVFHMIN-NEXT: vfmadd.vv v16, v8, v24
480 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
481 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v0
482 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
483 ; ZVFHMIN-NEXT: csrr a0, vlenb
484 ; ZVFHMIN-NEXT: li a1, 24
485 ; ZVFHMIN-NEXT: mul a0, a0, a1
486 ; ZVFHMIN-NEXT: add sp, sp, a0
487 ; ZVFHMIN-NEXT: .cfi_def_cfa sp, 16
488 ; ZVFHMIN-NEXT: addi sp, sp, 16
489 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 0
491 %head = insertelement <vscale x 32 x half> poison, half %c, i32 0
492 %splat = shufflevector <vscale x 32 x half> %head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
493 %neg = fneg <vscale x 32 x half> %va
494 %vd = call <vscale x 32 x half> @llvm.experimental.constrained.fma.nxv32f16(<vscale x 32 x half> %vb, <vscale x 32 x half> %splat, <vscale x 32 x half> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
495 ret <vscale x 32 x half> %vd
498 declare <vscale x 1 x float> @llvm.experimental.constrained.fma.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, metadata, metadata)
500 define <vscale x 1 x float> @vfmsub_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc) strictfp {
501 ; CHECK-LABEL: vfmsub_vv_nxv1f32:
503 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
504 ; CHECK-NEXT: vfmsub.vv v8, v9, v10
506 %neg = fneg <vscale x 1 x float> %vc
507 %vd = call <vscale x 1 x float> @llvm.experimental.constrained.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
508 ret <vscale x 1 x float> %vd
511 define <vscale x 1 x float> @vfmsub_vf_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, float %c) strictfp {
512 ; CHECK-LABEL: vfmsub_vf_nxv1f32:
514 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
515 ; CHECK-NEXT: vfmsub.vf v8, fa0, v9
517 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
518 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
519 %neg = fneg <vscale x 1 x float> %vb
520 %vd = call <vscale x 1 x float> @llvm.experimental.constrained.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %splat, <vscale x 1 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
521 ret <vscale x 1 x float> %vd
524 declare <vscale x 2 x float> @llvm.experimental.constrained.fma.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, metadata, metadata)
526 define <vscale x 2 x float> @vfmsub_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %vc) strictfp {
527 ; CHECK-LABEL: vfmsub_vv_nxv2f32:
529 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
530 ; CHECK-NEXT: vfmsub.vv v8, v10, v9
532 %neg = fneg <vscale x 2 x float> %vb
533 %vd = call <vscale x 2 x float> @llvm.experimental.constrained.fma.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vc, <vscale x 2 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
534 ret <vscale x 2 x float> %vd
537 define <vscale x 2 x float> @vfmsub_vf_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, float %c) strictfp {
538 ; CHECK-LABEL: vfmsub_vf_nxv2f32:
540 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
541 ; CHECK-NEXT: vfmsac.vf v8, fa0, v9
543 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
544 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
545 %neg = fneg <vscale x 2 x float> %va
546 %vd = call <vscale x 2 x float> @llvm.experimental.constrained.fma.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x float> %splat, <vscale x 2 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
547 ret <vscale x 2 x float> %vd
550 declare <vscale x 4 x float> @llvm.experimental.constrained.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, metadata, metadata)
552 define <vscale x 4 x float> @vfmsub_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %vc) strictfp {
553 ; CHECK-LABEL: vfmsub_vv_nxv4f32:
555 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
556 ; CHECK-NEXT: vfmsub.vv v8, v10, v12
558 %neg = fneg <vscale x 4 x float> %vc
559 %vd = call <vscale x 4 x float> @llvm.experimental.constrained.fma.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x float> %va, <vscale x 4 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
560 ret <vscale x 4 x float> %vd
563 define <vscale x 4 x float> @vfmsub_vf_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, float %c) strictfp {
564 ; CHECK-LABEL: vfmsub_vf_nxv4f32:
566 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
567 ; CHECK-NEXT: vfmsub.vf v8, fa0, v10
569 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
570 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
571 %neg = fneg <vscale x 4 x float> %vb
572 %vd = call <vscale x 4 x float> @llvm.experimental.constrained.fma.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %splat, <vscale x 4 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
573 ret <vscale x 4 x float> %vd
576 declare <vscale x 8 x float> @llvm.experimental.constrained.fma.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x float>, metadata, metadata)
578 define <vscale x 8 x float> @vfmsub_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %vc) strictfp {
579 ; CHECK-LABEL: vfmsub_vv_nxv8f32:
581 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
582 ; CHECK-NEXT: vfmsac.vv v8, v16, v12
584 %neg = fneg <vscale x 8 x float> %va
585 %vd = call <vscale x 8 x float> @llvm.experimental.constrained.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %vc, <vscale x 8 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
586 ret <vscale x 8 x float> %vd
589 define <vscale x 8 x float> @vfmsub_vf_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, float %c) strictfp {
590 ; CHECK-LABEL: vfmsub_vf_nxv8f32:
592 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
593 ; CHECK-NEXT: vfmsac.vf v8, fa0, v12
595 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
596 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
597 %neg = fneg <vscale x 8 x float> %va
598 %vd = call <vscale x 8 x float> @llvm.experimental.constrained.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %splat, <vscale x 8 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
599 ret <vscale x 8 x float> %vd
602 declare <vscale x 16 x float> @llvm.experimental.constrained.fma.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x float>, metadata, metadata)
604 define <vscale x 16 x float> @vfmsub_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x float> %vc) strictfp {
605 ; CHECK-LABEL: vfmsub_vv_nxv16f32:
607 ; CHECK-NEXT: vl8re32.v v24, (a0)
608 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
609 ; CHECK-NEXT: vfmsub.vv v8, v24, v16
611 %neg = fneg <vscale x 16 x float> %vb
612 %vd = call <vscale x 16 x float> @llvm.experimental.constrained.fma.nxv16f32(<vscale x 16 x float> %vc, <vscale x 16 x float> %va, <vscale x 16 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
613 ret <vscale x 16 x float> %vd
616 define <vscale x 16 x float> @vfmsub_vf_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, float %c) strictfp {
617 ; CHECK-LABEL: vfmsub_vf_nxv16f32:
619 ; CHECK-NEXT: vsetvli a0, zero, e32, m8, ta, ma
620 ; CHECK-NEXT: vfmsub.vf v8, fa0, v16
622 %head = insertelement <vscale x 16 x float> poison, float %c, i32 0
623 %splat = shufflevector <vscale x 16 x float> %head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
624 %neg = fneg <vscale x 16 x float> %vb
625 %vd = call <vscale x 16 x float> @llvm.experimental.constrained.fma.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %splat, <vscale x 16 x float> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
626 ret <vscale x 16 x float> %vd
629 declare <vscale x 1 x double> @llvm.experimental.constrained.fma.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, metadata, metadata)
631 define <vscale x 1 x double> @vfmsub_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %vc) strictfp {
632 ; CHECK-LABEL: vfmsub_vv_nxv1f64:
634 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
635 ; CHECK-NEXT: vfmsub.vv v8, v9, v10
637 %neg = fneg <vscale x 1 x double> %vc
638 %vd = call <vscale x 1 x double> @llvm.experimental.constrained.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
639 ret <vscale x 1 x double> %vd
642 define <vscale x 1 x double> @vfmsub_vf_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, double %c) strictfp {
643 ; CHECK-LABEL: vfmsub_vf_nxv1f64:
645 ; CHECK-NEXT: vsetvli a0, zero, e64, m1, ta, ma
646 ; CHECK-NEXT: vfmsub.vf v8, fa0, v9
648 %head = insertelement <vscale x 1 x double> poison, double %c, i32 0
649 %splat = shufflevector <vscale x 1 x double> %head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
650 %neg = fneg <vscale x 1 x double> %vb
651 %vd = call <vscale x 1 x double> @llvm.experimental.constrained.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %splat, <vscale x 1 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
652 ret <vscale x 1 x double> %vd
655 declare <vscale x 2 x double> @llvm.experimental.constrained.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, metadata, metadata)
657 define <vscale x 2 x double> @vfmsub_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x double> %vc) strictfp {
658 ; CHECK-LABEL: vfmsub_vv_nxv2f64:
660 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
661 ; CHECK-NEXT: vfmsub.vv v8, v12, v10
663 %neg = fneg <vscale x 2 x double> %vb
664 %vd = call <vscale x 2 x double> @llvm.experimental.constrained.fma.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vc, <vscale x 2 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
665 ret <vscale x 2 x double> %vd
668 define <vscale x 2 x double> @vfmsub_vf_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, double %c) strictfp {
669 ; CHECK-LABEL: vfmsub_vf_nxv2f64:
671 ; CHECK-NEXT: vsetvli a0, zero, e64, m2, ta, ma
672 ; CHECK-NEXT: vfmsac.vf v8, fa0, v10
674 %head = insertelement <vscale x 2 x double> poison, double %c, i32 0
675 %splat = shufflevector <vscale x 2 x double> %head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
676 %neg = fneg <vscale x 2 x double> %va
677 %vd = call <vscale x 2 x double> @llvm.experimental.constrained.fma.nxv2f64(<vscale x 2 x double> %vb, <vscale x 2 x double> %splat, <vscale x 2 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
678 ret <vscale x 2 x double> %vd
681 declare <vscale x 4 x double> @llvm.experimental.constrained.fma.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x double>, metadata, metadata)
683 define <vscale x 4 x double> @vfmsub_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x double> %vc) strictfp {
684 ; CHECK-LABEL: vfmsub_vv_nxv4f64:
686 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
687 ; CHECK-NEXT: vfmsub.vv v8, v12, v16
689 %neg = fneg <vscale x 4 x double> %vc
690 %vd = call <vscale x 4 x double> @llvm.experimental.constrained.fma.nxv4f64(<vscale x 4 x double> %vb, <vscale x 4 x double> %va, <vscale x 4 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
691 ret <vscale x 4 x double> %vd
694 define <vscale x 4 x double> @vfmsub_vf_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, double %c) strictfp {
695 ; CHECK-LABEL: vfmsub_vf_nxv4f64:
697 ; CHECK-NEXT: vsetvli a0, zero, e64, m4, ta, ma
698 ; CHECK-NEXT: vfmsub.vf v8, fa0, v12
700 %head = insertelement <vscale x 4 x double> poison, double %c, i32 0
701 %splat = shufflevector <vscale x 4 x double> %head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
702 %neg = fneg <vscale x 4 x double> %vb
703 %vd = call <vscale x 4 x double> @llvm.experimental.constrained.fma.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %splat, <vscale x 4 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
704 ret <vscale x 4 x double> %vd
707 declare <vscale x 8 x double> @llvm.experimental.constrained.fma.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x double>, metadata, metadata)
709 define <vscale x 8 x double> @vfmsub_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x double> %vc) strictfp {
710 ; CHECK-LABEL: vfmsub_vv_nxv8f64:
712 ; CHECK-NEXT: vl8re64.v v24, (a0)
713 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
714 ; CHECK-NEXT: vfmsac.vv v8, v16, v24
716 %neg = fneg <vscale x 8 x double> %va
717 %vd = call <vscale x 8 x double> @llvm.experimental.constrained.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %vc, <vscale x 8 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
718 ret <vscale x 8 x double> %vd
721 define <vscale x 8 x double> @vfmsub_vf_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, double %c) strictfp {
722 ; CHECK-LABEL: vfmsub_vf_nxv8f64:
724 ; CHECK-NEXT: vsetvli a0, zero, e64, m8, ta, ma
725 ; CHECK-NEXT: vfmsac.vf v8, fa0, v16
727 %head = insertelement <vscale x 8 x double> poison, double %c, i32 0
728 %splat = shufflevector <vscale x 8 x double> %head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
729 %neg = fneg <vscale x 8 x double> %va
730 %vd = call <vscale x 8 x double> @llvm.experimental.constrained.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %splat, <vscale x 8 x double> %neg, metadata !"round.dynamic", metadata !"fpexcept.strict")
731 ret <vscale x 8 x double> %vd