1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>)
13 define <vscale x 1 x float> @vfwmacc_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc) {
14 ; ZVFH-LABEL: vfwmacc_vv_nxv1f32:
16 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfwmacc.vv v8, v9, v10
20 ; ZVFHMIN-LABEL: vfwmacc_vv_nxv1f32:
22 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
24 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
25 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
26 ; ZVFHMIN-NEXT: vfmacc.vv v8, v11, v9
28 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
29 %ve = fpext <vscale x 1 x half> %vc to <vscale x 1 x float>
30 %vf = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vd, <vscale x 1 x float> %ve, <vscale x 1 x float> %va)
31 ret <vscale x 1 x float> %vf
34 define <vscale x 1 x float> @vfwmacc_vf_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, half %c) {
35 ; ZVFH-LABEL: vfwmacc_vf_nxv1f32:
37 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfwmacc.vf v8, fa0, v9
41 ; ZVFHMIN-LABEL: vfwmacc_vf_nxv1f32:
43 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
44 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
45 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
46 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
47 ; ZVFHMIN-NEXT: vfmacc.vf v8, fa5, v10
49 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
50 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
51 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
52 %ve = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
53 %vf = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vd, <vscale x 1 x float> %ve, <vscale x 1 x float> %va)
54 ret <vscale x 1 x float> %vf
57 define <vscale x 1 x float> @vfwnmacc_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc) {
58 ; ZVFH-LABEL: vfwnmacc_vv_nxv1f32:
60 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
61 ; ZVFH-NEXT: vfwnmacc.vv v8, v9, v10
64 ; ZVFHMIN-LABEL: vfwnmacc_vv_nxv1f32:
66 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
67 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
68 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
69 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
70 ; ZVFHMIN-NEXT: vfnmacc.vv v8, v11, v9
72 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
73 %ve = fpext <vscale x 1 x half> %vc to <vscale x 1 x float>
74 %vf = fneg <vscale x 1 x float> %va
75 %vg = fneg <vscale x 1 x float> %vd
76 %vh = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vg, <vscale x 1 x float> %ve, <vscale x 1 x float> %vf)
77 ret <vscale x 1 x float> %vh
80 define <vscale x 1 x float> @vfwnmacc_vf_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, half %c) {
81 ; ZVFH-LABEL: vfwnmacc_vf_nxv1f32:
83 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
84 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v9
87 ; ZVFHMIN-LABEL: vfwnmacc_vf_nxv1f32:
89 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
90 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
91 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
92 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
93 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v10
95 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
96 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
97 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
98 %ve = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
99 %vf = fneg <vscale x 1 x float> %va
100 %vg = fneg <vscale x 1 x float> %vd
101 %vh = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vg, <vscale x 1 x float> %ve, <vscale x 1 x float> %vf)
102 ret <vscale x 1 x float> %vh
105 define <vscale x 1 x float> @vfwnmacc_fv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, half %c) {
106 ; ZVFH-LABEL: vfwnmacc_fv_nxv1f32:
108 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
109 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v9
112 ; ZVFHMIN-LABEL: vfwnmacc_fv_nxv1f32:
114 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
115 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
116 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
117 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
118 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v10
120 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
121 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
122 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
123 %ve = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
124 %vf = fneg <vscale x 1 x float> %va
125 %vg = fneg <vscale x 1 x float> %ve
126 %vh = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vd, <vscale x 1 x float> %vg, <vscale x 1 x float> %vf)
127 ret <vscale x 1 x float> %vh
130 define <vscale x 1 x float> @vfwmsac_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc) {
131 ; ZVFH-LABEL: vfwmsac_vv_nxv1f32:
133 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
134 ; ZVFH-NEXT: vfwmsac.vv v8, v9, v10
137 ; ZVFHMIN-LABEL: vfwmsac_vv_nxv1f32:
139 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
140 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
141 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
142 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
143 ; ZVFHMIN-NEXT: vfmsac.vv v8, v11, v9
145 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
146 %ve = fpext <vscale x 1 x half> %vc to <vscale x 1 x float>
147 %vf = fneg <vscale x 1 x float> %va
148 %vg = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vd, <vscale x 1 x float> %ve, <vscale x 1 x float> %vf)
149 ret <vscale x 1 x float> %vg
152 define <vscale x 1 x float> @vfwmsac_vf_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, half %c) {
153 ; ZVFH-LABEL: vfwmsac_vf_nxv1f32:
155 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
156 ; ZVFH-NEXT: vfwmsac.vf v8, fa0, v9
159 ; ZVFHMIN-LABEL: vfwmsac_vf_nxv1f32:
161 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
162 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
163 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
164 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
165 ; ZVFHMIN-NEXT: vfmsac.vf v8, fa5, v10
167 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
168 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
169 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
170 %ve = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
171 %vf = fneg <vscale x 1 x float> %va
172 %vg = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vd, <vscale x 1 x float> %ve, <vscale x 1 x float> %vf)
173 ret <vscale x 1 x float> %vg
176 define <vscale x 1 x float> @vfwnmsac_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %vc) {
177 ; ZVFH-LABEL: vfwnmsac_vv_nxv1f32:
179 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
180 ; ZVFH-NEXT: vfwnmsac.vv v8, v9, v10
183 ; ZVFHMIN-LABEL: vfwnmsac_vv_nxv1f32:
185 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
186 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
187 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
188 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
189 ; ZVFHMIN-NEXT: vfnmsac.vv v8, v11, v9
191 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
192 %ve = fpext <vscale x 1 x half> %vc to <vscale x 1 x float>
193 %vf = fneg <vscale x 1 x float> %vd
194 %vg = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vf, <vscale x 1 x float> %ve, <vscale x 1 x float> %va)
195 ret <vscale x 1 x float> %vg
198 define <vscale x 1 x float> @vfwnmsac_vf_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, half %c) {
199 ; ZVFH-LABEL: vfwnmsac_vf_nxv1f32:
201 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
202 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v9
205 ; ZVFHMIN-LABEL: vfwnmsac_vf_nxv1f32:
207 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
208 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
209 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
210 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
211 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v10
213 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
214 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
215 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
216 %ve = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
217 %vf = fneg <vscale x 1 x float> %vd
218 %vg = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vf, <vscale x 1 x float> %ve, <vscale x 1 x float> %va)
219 ret <vscale x 1 x float> %vg
222 define <vscale x 1 x float> @vfwnmsac_fv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x half> %vb, half %c) {
223 ; ZVFH-LABEL: vfwnmsac_fv_nxv1f32:
225 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
226 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v9
229 ; ZVFHMIN-LABEL: vfwnmsac_fv_nxv1f32:
231 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
232 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
233 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
234 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
235 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v10
237 %head = insertelement <vscale x 1 x half> poison, half %c, i32 0
238 %splat = shufflevector <vscale x 1 x half> %head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
239 %vd = fpext <vscale x 1 x half> %vb to <vscale x 1 x float>
240 %ve = fpext <vscale x 1 x half> %splat to <vscale x 1 x float>
241 %vf = fneg <vscale x 1 x float> %ve
242 %vg = call <vscale x 1 x float> @llvm.fma.v1f32(<vscale x 1 x float> %vd, <vscale x 1 x float> %vf, <vscale x 1 x float> %va)
243 ret <vscale x 1 x float> %vg
246 declare <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>)
248 define <vscale x 2 x float> @vfwmacc_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %vc) {
249 ; ZVFH-LABEL: vfwmacc_vv_nxv2f32:
251 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
252 ; ZVFH-NEXT: vfwmacc.vv v8, v9, v10
255 ; ZVFHMIN-LABEL: vfwmacc_vv_nxv2f32:
257 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
258 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
259 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
260 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
261 ; ZVFHMIN-NEXT: vfmacc.vv v8, v11, v9
263 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
264 %ve = fpext <vscale x 2 x half> %vc to <vscale x 2 x float>
265 %vf = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vd, <vscale x 2 x float> %ve, <vscale x 2 x float> %va)
266 ret <vscale x 2 x float> %vf
269 define <vscale x 2 x float> @vfwmacc_vf_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, half %c) {
270 ; ZVFH-LABEL: vfwmacc_vf_nxv2f32:
272 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
273 ; ZVFH-NEXT: vfwmacc.vf v8, fa0, v9
276 ; ZVFHMIN-LABEL: vfwmacc_vf_nxv2f32:
278 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
279 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
280 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
281 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
282 ; ZVFHMIN-NEXT: vfmacc.vf v8, fa5, v10
284 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
285 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
286 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
287 %ve = fpext <vscale x 2 x half> %splat to <vscale x 2 x float>
288 %vf = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vd, <vscale x 2 x float> %ve, <vscale x 2 x float> %va)
289 ret <vscale x 2 x float> %vf
292 define <vscale x 2 x float> @vfwnmacc_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %vc) {
293 ; ZVFH-LABEL: vfwnmacc_vv_nxv2f32:
295 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
296 ; ZVFH-NEXT: vfwnmacc.vv v8, v9, v10
299 ; ZVFHMIN-LABEL: vfwnmacc_vv_nxv2f32:
301 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
302 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
303 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
304 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
305 ; ZVFHMIN-NEXT: vfnmacc.vv v8, v11, v9
307 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
308 %ve = fpext <vscale x 2 x half> %vc to <vscale x 2 x float>
309 %vf = fneg <vscale x 2 x float> %va
310 %vg = fneg <vscale x 2 x float> %vd
311 %vh = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vg, <vscale x 2 x float> %ve, <vscale x 2 x float> %vf)
312 ret <vscale x 2 x float> %vh
315 define <vscale x 2 x float> @vfwnmacc_vf_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, half %c) {
316 ; ZVFH-LABEL: vfwnmacc_vf_nxv2f32:
318 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
319 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v9
322 ; ZVFHMIN-LABEL: vfwnmacc_vf_nxv2f32:
324 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
325 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
326 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
327 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
328 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v10
330 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
331 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
332 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
333 %ve = fpext <vscale x 2 x half> %splat to <vscale x 2 x float>
334 %vf = fneg <vscale x 2 x float> %va
335 %vg = fneg <vscale x 2 x float> %vd
336 %vh = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vg, <vscale x 2 x float> %ve, <vscale x 2 x float> %vf)
337 ret <vscale x 2 x float> %vh
340 define <vscale x 2 x float> @vfwnmacc_fv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, half %c) {
341 ; ZVFH-LABEL: vfwnmacc_fv_nxv2f32:
343 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
344 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v9
347 ; ZVFHMIN-LABEL: vfwnmacc_fv_nxv2f32:
349 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
350 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
351 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
352 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
353 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v10
355 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
356 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
357 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
358 %ve = fpext <vscale x 2 x half> %splat to <vscale x 2 x float>
359 %vf = fneg <vscale x 2 x float> %va
360 %vg = fneg <vscale x 2 x float> %ve
361 %vh = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vd, <vscale x 2 x float> %vg, <vscale x 2 x float> %vf)
362 ret <vscale x 2 x float> %vh
365 define <vscale x 2 x float> @vfwmsac_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %vc) {
366 ; ZVFH-LABEL: vfwmsac_vv_nxv2f32:
368 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
369 ; ZVFH-NEXT: vfwmsac.vv v8, v9, v10
372 ; ZVFHMIN-LABEL: vfwmsac_vv_nxv2f32:
374 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
375 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
376 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
377 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
378 ; ZVFHMIN-NEXT: vfmsac.vv v8, v11, v9
380 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
381 %ve = fpext <vscale x 2 x half> %vc to <vscale x 2 x float>
382 %vf = fneg <vscale x 2 x float> %va
383 %vg = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vd, <vscale x 2 x float> %ve, <vscale x 2 x float> %vf)
384 ret <vscale x 2 x float> %vg
387 define <vscale x 2 x float> @vfwmsac_vf_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, half %c) {
388 ; ZVFH-LABEL: vfwmsac_vf_nxv2f32:
390 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
391 ; ZVFH-NEXT: vfwmsac.vf v8, fa0, v9
394 ; ZVFHMIN-LABEL: vfwmsac_vf_nxv2f32:
396 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
397 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
398 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
399 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
400 ; ZVFHMIN-NEXT: vfmsac.vf v8, fa5, v10
402 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
403 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
404 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
405 %ve = fpext <vscale x 2 x half> %splat to <vscale x 2 x float>
406 %vf = fneg <vscale x 2 x float> %va
407 %vg = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vd, <vscale x 2 x float> %ve, <vscale x 2 x float> %vf)
408 ret <vscale x 2 x float> %vg
411 define <vscale x 2 x float> @vfwnmsac_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %vc) {
412 ; ZVFH-LABEL: vfwnmsac_vv_nxv2f32:
414 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
415 ; ZVFH-NEXT: vfwnmsac.vv v8, v9, v10
418 ; ZVFHMIN-LABEL: vfwnmsac_vv_nxv2f32:
420 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
421 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v9
422 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v10
423 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
424 ; ZVFHMIN-NEXT: vfnmsac.vv v8, v11, v9
426 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
427 %ve = fpext <vscale x 2 x half> %vc to <vscale x 2 x float>
428 %vf = fneg <vscale x 2 x float> %vd
429 %vg = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vf, <vscale x 2 x float> %ve, <vscale x 2 x float> %va)
430 ret <vscale x 2 x float> %vg
433 define <vscale x 2 x float> @vfwnmsac_vf_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, half %c) {
434 ; ZVFH-LABEL: vfwnmsac_vf_nxv2f32:
436 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
437 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v9
440 ; ZVFHMIN-LABEL: vfwnmsac_vf_nxv2f32:
442 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
443 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
444 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
445 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
446 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v10
448 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
449 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
450 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
451 %ve = fpext <vscale x 2 x half> %splat to <vscale x 2 x float>
452 %vf = fneg <vscale x 2 x float> %vd
453 %vg = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vf, <vscale x 2 x float> %ve, <vscale x 2 x float> %va)
454 ret <vscale x 2 x float> %vg
457 define <vscale x 2 x float> @vfwnmsac_fv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x half> %vb, half %c) {
458 ; ZVFH-LABEL: vfwnmsac_fv_nxv2f32:
460 ; ZVFH-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
461 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v9
464 ; ZVFHMIN-LABEL: vfwnmsac_fv_nxv2f32:
466 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
467 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
468 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
469 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
470 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v10
472 %head = insertelement <vscale x 2 x half> poison, half %c, i32 0
473 %splat = shufflevector <vscale x 2 x half> %head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
474 %vd = fpext <vscale x 2 x half> %vb to <vscale x 2 x float>
475 %ve = fpext <vscale x 2 x half> %splat to <vscale x 2 x float>
476 %vf = fneg <vscale x 2 x float> %ve
477 %vg = call <vscale x 2 x float> @llvm.fma.v2f32(<vscale x 2 x float> %vd, <vscale x 2 x float> %vf, <vscale x 2 x float> %va)
478 ret <vscale x 2 x float> %vg
482 declare <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>)
484 define <vscale x 4 x float> @vfwmacc_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %vc) {
485 ; ZVFH-LABEL: vfwmacc_vv_nxv4f32:
487 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
488 ; ZVFH-NEXT: vfwmacc.vv v8, v10, v11
491 ; ZVFHMIN-LABEL: vfwmacc_vv_nxv4f32:
493 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
494 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
495 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v11
496 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
497 ; ZVFHMIN-NEXT: vfmacc.vv v8, v12, v14
499 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
500 %ve = fpext <vscale x 4 x half> %vc to <vscale x 4 x float>
501 %vf = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vd, <vscale x 4 x float> %ve, <vscale x 4 x float> %va)
502 ret <vscale x 4 x float> %vf
505 define <vscale x 4 x float> @vfwmacc_vf_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, half %c) {
506 ; ZVFH-LABEL: vfwmacc_vf_nxv4f32:
508 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
509 ; ZVFH-NEXT: vfwmacc.vf v8, fa0, v10
512 ; ZVFHMIN-LABEL: vfwmacc_vf_nxv4f32:
514 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
515 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
516 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
517 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
518 ; ZVFHMIN-NEXT: vfmacc.vf v8, fa5, v12
520 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
521 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
522 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
523 %ve = fpext <vscale x 4 x half> %splat to <vscale x 4 x float>
524 %vf = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vd, <vscale x 4 x float> %ve, <vscale x 4 x float> %va)
525 ret <vscale x 4 x float> %vf
528 define <vscale x 4 x float> @vfwnmacc_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %vc) {
529 ; ZVFH-LABEL: vfwnmacc_vv_nxv4f32:
531 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
532 ; ZVFH-NEXT: vfwnmacc.vv v8, v10, v11
535 ; ZVFHMIN-LABEL: vfwnmacc_vv_nxv4f32:
537 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
538 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
539 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v11
540 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
541 ; ZVFHMIN-NEXT: vfnmacc.vv v8, v12, v14
543 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
544 %ve = fpext <vscale x 4 x half> %vc to <vscale x 4 x float>
545 %vf = fneg <vscale x 4 x float> %va
546 %vg = fneg <vscale x 4 x float> %vd
547 %vh = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vg, <vscale x 4 x float> %ve, <vscale x 4 x float> %vf)
548 ret <vscale x 4 x float> %vh
551 define <vscale x 4 x float> @vfwnmacc_vf_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, half %c) {
552 ; ZVFH-LABEL: vfwnmacc_vf_nxv4f32:
554 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
555 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v10
558 ; ZVFHMIN-LABEL: vfwnmacc_vf_nxv4f32:
560 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
561 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
562 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
563 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
564 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v12
566 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
567 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
568 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
569 %ve = fpext <vscale x 4 x half> %splat to <vscale x 4 x float>
570 %vf = fneg <vscale x 4 x float> %va
571 %vg = fneg <vscale x 4 x float> %vd
572 %vh = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vg, <vscale x 4 x float> %ve, <vscale x 4 x float> %vf)
573 ret <vscale x 4 x float> %vh
576 define <vscale x 4 x float> @vfwnmacc_fv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, half %c) {
577 ; ZVFH-LABEL: vfwnmacc_fv_nxv4f32:
579 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
580 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v10
583 ; ZVFHMIN-LABEL: vfwnmacc_fv_nxv4f32:
585 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
586 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
587 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
588 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
589 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v12
591 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
592 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
593 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
594 %ve = fpext <vscale x 4 x half> %splat to <vscale x 4 x float>
595 %vf = fneg <vscale x 4 x float> %va
596 %vg = fneg <vscale x 4 x float> %ve
597 %vh = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vd, <vscale x 4 x float> %vg, <vscale x 4 x float> %vf)
598 ret <vscale x 4 x float> %vh
601 define <vscale x 4 x float> @vfwmsac_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %vc) {
602 ; ZVFH-LABEL: vfwmsac_vv_nxv4f32:
604 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
605 ; ZVFH-NEXT: vfwmsac.vv v8, v10, v11
608 ; ZVFHMIN-LABEL: vfwmsac_vv_nxv4f32:
610 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
611 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
612 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v11
613 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
614 ; ZVFHMIN-NEXT: vfmsac.vv v8, v12, v14
616 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
617 %ve = fpext <vscale x 4 x half> %vc to <vscale x 4 x float>
618 %vf = fneg <vscale x 4 x float> %va
619 %vg = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vd, <vscale x 4 x float> %ve, <vscale x 4 x float> %vf)
620 ret <vscale x 4 x float> %vg
623 define <vscale x 4 x float> @vfwmsac_vf_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, half %c) {
624 ; ZVFH-LABEL: vfwmsac_vf_nxv4f32:
626 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
627 ; ZVFH-NEXT: vfwmsac.vf v8, fa0, v10
630 ; ZVFHMIN-LABEL: vfwmsac_vf_nxv4f32:
632 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
633 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
634 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
635 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
636 ; ZVFHMIN-NEXT: vfmsac.vf v8, fa5, v12
638 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
639 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
640 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
641 %ve = fpext <vscale x 4 x half> %splat to <vscale x 4 x float>
642 %vf = fneg <vscale x 4 x float> %va
643 %vg = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vd, <vscale x 4 x float> %ve, <vscale x 4 x float> %vf)
644 ret <vscale x 4 x float> %vg
647 define <vscale x 4 x float> @vfwnmsac_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %vc) {
648 ; ZVFH-LABEL: vfwnmsac_vv_nxv4f32:
650 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
651 ; ZVFH-NEXT: vfwnmsac.vv v8, v10, v11
654 ; ZVFHMIN-LABEL: vfwnmsac_vv_nxv4f32:
656 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
657 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
658 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v11
659 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
660 ; ZVFHMIN-NEXT: vfnmsac.vv v8, v12, v14
662 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
663 %ve = fpext <vscale x 4 x half> %vc to <vscale x 4 x float>
664 %vf = fneg <vscale x 4 x float> %vd
665 %vg = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vf, <vscale x 4 x float> %ve, <vscale x 4 x float> %va)
666 ret <vscale x 4 x float> %vg
669 define <vscale x 4 x float> @vfwnmsac_vf_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, half %c) {
670 ; ZVFH-LABEL: vfwnmsac_vf_nxv4f32:
672 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
673 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v10
676 ; ZVFHMIN-LABEL: vfwnmsac_vf_nxv4f32:
678 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
679 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
680 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
681 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
682 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v12
684 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
685 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
686 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
687 %ve = fpext <vscale x 4 x half> %splat to <vscale x 4 x float>
688 %vf = fneg <vscale x 4 x float> %vd
689 %vg = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vf, <vscale x 4 x float> %ve, <vscale x 4 x float> %va)
690 ret <vscale x 4 x float> %vg
693 define <vscale x 4 x float> @vfwnmsac_fv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x half> %vb, half %c) {
694 ; ZVFH-LABEL: vfwnmsac_fv_nxv4f32:
696 ; ZVFH-NEXT: vsetvli a0, zero, e16, m1, ta, ma
697 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v10
700 ; ZVFHMIN-LABEL: vfwnmsac_fv_nxv4f32:
702 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
703 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
704 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
705 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
706 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v12
708 %head = insertelement <vscale x 4 x half> poison, half %c, i32 0
709 %splat = shufflevector <vscale x 4 x half> %head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
710 %vd = fpext <vscale x 4 x half> %vb to <vscale x 4 x float>
711 %ve = fpext <vscale x 4 x half> %splat to <vscale x 4 x float>
712 %vf = fneg <vscale x 4 x float> %ve
713 %vg = call <vscale x 4 x float> @llvm.fma.v4f32(<vscale x 4 x float> %vd, <vscale x 4 x float> %vf, <vscale x 4 x float> %va)
714 ret <vscale x 4 x float> %vg
717 declare <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x float>)
719 define <vscale x 8 x float> @vfwmacc_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %vc) {
720 ; ZVFH-LABEL: vfwmacc_vv_nxv8f32:
722 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
723 ; ZVFH-NEXT: vfwmacc.vv v8, v12, v14
726 ; ZVFHMIN-LABEL: vfwmacc_vv_nxv8f32:
728 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
729 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
730 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v14
731 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
732 ; ZVFHMIN-NEXT: vfmacc.vv v8, v16, v20
734 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
735 %ve = fpext <vscale x 8 x half> %vc to <vscale x 8 x float>
736 %vf = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vd, <vscale x 8 x float> %ve, <vscale x 8 x float> %va)
737 ret <vscale x 8 x float> %vf
740 define <vscale x 8 x float> @vfwmacc_vf_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, half %c) {
741 ; ZVFH-LABEL: vfwmacc_vf_nxv8f32:
743 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
744 ; ZVFH-NEXT: vfwmacc.vf v8, fa0, v12
747 ; ZVFHMIN-LABEL: vfwmacc_vf_nxv8f32:
749 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
750 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
751 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
752 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
753 ; ZVFHMIN-NEXT: vfmacc.vf v8, fa5, v16
755 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
756 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
757 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
758 %ve = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
759 %vf = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vd, <vscale x 8 x float> %ve, <vscale x 8 x float> %va)
760 ret <vscale x 8 x float> %vf
763 define <vscale x 8 x float> @vfwnmacc_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %vc) {
764 ; ZVFH-LABEL: vfwnmacc_vv_nxv8f32:
766 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
767 ; ZVFH-NEXT: vfwnmacc.vv v8, v12, v14
770 ; ZVFHMIN-LABEL: vfwnmacc_vv_nxv8f32:
772 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
773 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
774 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v14
775 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
776 ; ZVFHMIN-NEXT: vfnmacc.vv v8, v16, v20
778 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
779 %ve = fpext <vscale x 8 x half> %vc to <vscale x 8 x float>
780 %vf = fneg <vscale x 8 x float> %va
781 %vg = fneg <vscale x 8 x float> %vd
782 %vh = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vg, <vscale x 8 x float> %ve, <vscale x 8 x float> %vf)
783 ret <vscale x 8 x float> %vh
786 define <vscale x 8 x float> @vfwnmacc_vf_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, half %c) {
787 ; ZVFH-LABEL: vfwnmacc_vf_nxv8f32:
789 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
790 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v12
793 ; ZVFHMIN-LABEL: vfwnmacc_vf_nxv8f32:
795 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
796 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
797 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
798 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
799 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v16
801 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
802 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
803 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
804 %ve = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
805 %vf = fneg <vscale x 8 x float> %va
806 %vg = fneg <vscale x 8 x float> %vd
807 %vh = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vg, <vscale x 8 x float> %ve, <vscale x 8 x float> %vf)
808 ret <vscale x 8 x float> %vh
811 define <vscale x 8 x float> @vfwnmacc_fv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, half %c) {
812 ; ZVFH-LABEL: vfwnmacc_fv_nxv8f32:
814 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
815 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v12
818 ; ZVFHMIN-LABEL: vfwnmacc_fv_nxv8f32:
820 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
821 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
822 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
823 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
824 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v16
826 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
827 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
828 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
829 %ve = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
830 %vf = fneg <vscale x 8 x float> %va
831 %vg = fneg <vscale x 8 x float> %ve
832 %vh = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vd, <vscale x 8 x float> %vg, <vscale x 8 x float> %vf)
833 ret <vscale x 8 x float> %vh
836 define <vscale x 8 x float> @vfwmsac_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %vc) {
837 ; ZVFH-LABEL: vfwmsac_vv_nxv8f32:
839 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
840 ; ZVFH-NEXT: vfwmsac.vv v8, v12, v14
843 ; ZVFHMIN-LABEL: vfwmsac_vv_nxv8f32:
845 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
846 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
847 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v14
848 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
849 ; ZVFHMIN-NEXT: vfmsac.vv v8, v16, v20
851 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
852 %ve = fpext <vscale x 8 x half> %vc to <vscale x 8 x float>
853 %vf = fneg <vscale x 8 x float> %va
854 %vg = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vd, <vscale x 8 x float> %ve, <vscale x 8 x float> %vf)
855 ret <vscale x 8 x float> %vg
858 define <vscale x 8 x float> @vfwmsac_vf_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, half %c) {
859 ; ZVFH-LABEL: vfwmsac_vf_nxv8f32:
861 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
862 ; ZVFH-NEXT: vfwmsac.vf v8, fa0, v12
865 ; ZVFHMIN-LABEL: vfwmsac_vf_nxv8f32:
867 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
868 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
869 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
870 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
871 ; ZVFHMIN-NEXT: vfmsac.vf v8, fa5, v16
873 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
874 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
875 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
876 %ve = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
877 %vf = fneg <vscale x 8 x float> %va
878 %vg = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vd, <vscale x 8 x float> %ve, <vscale x 8 x float> %vf)
879 ret <vscale x 8 x float> %vg
882 define <vscale x 8 x float> @vfwnmsac_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %vc) {
883 ; ZVFH-LABEL: vfwnmsac_vv_nxv8f32:
885 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
886 ; ZVFH-NEXT: vfwnmsac.vv v8, v12, v14
889 ; ZVFHMIN-LABEL: vfwnmsac_vv_nxv8f32:
891 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
892 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
893 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v14
894 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
895 ; ZVFHMIN-NEXT: vfnmsac.vv v8, v16, v20
897 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
898 %ve = fpext <vscale x 8 x half> %vc to <vscale x 8 x float>
899 %vf = fneg <vscale x 8 x float> %vd
900 %vg = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vf, <vscale x 8 x float> %ve, <vscale x 8 x float> %va)
901 ret <vscale x 8 x float> %vg
904 define <vscale x 8 x float> @vfwnmsac_vf_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, half %c) {
905 ; ZVFH-LABEL: vfwnmsac_vf_nxv8f32:
907 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
908 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v12
911 ; ZVFHMIN-LABEL: vfwnmsac_vf_nxv8f32:
913 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
914 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
915 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
916 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
917 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v16
919 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
920 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
921 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
922 %ve = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
923 %vf = fneg <vscale x 8 x float> %vd
924 %vg = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vf, <vscale x 8 x float> %ve, <vscale x 8 x float> %va)
925 ret <vscale x 8 x float> %vg
928 define <vscale x 8 x float> @vfwnmsac_fv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x half> %vb, half %c) {
929 ; ZVFH-LABEL: vfwnmsac_fv_nxv8f32:
931 ; ZVFH-NEXT: vsetvli a0, zero, e16, m2, ta, ma
932 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v12
935 ; ZVFHMIN-LABEL: vfwnmsac_fv_nxv8f32:
937 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
938 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
939 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
940 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
941 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v16
943 %head = insertelement <vscale x 8 x half> poison, half %c, i32 0
944 %splat = shufflevector <vscale x 8 x half> %head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
945 %vd = fpext <vscale x 8 x half> %vb to <vscale x 8 x float>
946 %ve = fpext <vscale x 8 x half> %splat to <vscale x 8 x float>
947 %vf = fneg <vscale x 8 x float> %ve
948 %vg = call <vscale x 8 x float> @llvm.fma.v8f32(<vscale x 8 x float> %vd, <vscale x 8 x float> %vf, <vscale x 8 x float> %va)
949 ret <vscale x 8 x float> %vg
952 declare <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x float>)
954 define <vscale x 16 x float> @vfwmacc_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %vc) {
955 ; ZVFH-LABEL: vfwmacc_vv_nxv16f32:
957 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
958 ; ZVFH-NEXT: vfwmacc.vv v8, v16, v20
961 ; ZVFHMIN-LABEL: vfwmacc_vv_nxv16f32:
963 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
964 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
965 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v20
966 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
967 ; ZVFHMIN-NEXT: vfmacc.vv v8, v24, v0
969 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
970 %ve = fpext <vscale x 16 x half> %vc to <vscale x 16 x float>
971 %vf = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vd, <vscale x 16 x float> %ve, <vscale x 16 x float> %va)
972 ret <vscale x 16 x float> %vf
975 define <vscale x 16 x float> @vfwmacc_vf_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, half %c) {
976 ; ZVFH-LABEL: vfwmacc_vf_nxv16f32:
978 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
979 ; ZVFH-NEXT: vfwmacc.vf v8, fa0, v16
982 ; ZVFHMIN-LABEL: vfwmacc_vf_nxv16f32:
984 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
985 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
986 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
987 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
988 ; ZVFHMIN-NEXT: vfmacc.vf v8, fa5, v24
990 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
991 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
992 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
993 %ve = fpext <vscale x 16 x half> %splat to <vscale x 16 x float>
994 %vf = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vd, <vscale x 16 x float> %ve, <vscale x 16 x float> %va)
995 ret <vscale x 16 x float> %vf
998 define <vscale x 16 x float> @vfwnmacc_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %vc) {
999 ; ZVFH-LABEL: vfwnmacc_vv_nxv16f32:
1001 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1002 ; ZVFH-NEXT: vfwnmacc.vv v8, v16, v20
1005 ; ZVFHMIN-LABEL: vfwnmacc_vv_nxv16f32:
1007 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1008 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1009 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v20
1010 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1011 ; ZVFHMIN-NEXT: vfnmacc.vv v8, v24, v0
1013 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1014 %ve = fpext <vscale x 16 x half> %vc to <vscale x 16 x float>
1015 %vf = fneg <vscale x 16 x float> %va
1016 %vg = fneg <vscale x 16 x float> %vd
1017 %vh = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vg, <vscale x 16 x float> %ve, <vscale x 16 x float> %vf)
1018 ret <vscale x 16 x float> %vh
1021 define <vscale x 16 x float> @vfwnmacc_vf_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, half %c) {
1022 ; ZVFH-LABEL: vfwnmacc_vf_nxv16f32:
1024 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1025 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v16
1028 ; ZVFHMIN-LABEL: vfwnmacc_vf_nxv16f32:
1030 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1031 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1032 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1033 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1034 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v24
1036 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
1037 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1038 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1039 %ve = fpext <vscale x 16 x half> %splat to <vscale x 16 x float>
1040 %vf = fneg <vscale x 16 x float> %va
1041 %vg = fneg <vscale x 16 x float> %vd
1042 %vh = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vg, <vscale x 16 x float> %ve, <vscale x 16 x float> %vf)
1043 ret <vscale x 16 x float> %vh
1046 define <vscale x 16 x float> @vfwnmacc_fv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, half %c) {
1047 ; ZVFH-LABEL: vfwnmacc_fv_nxv16f32:
1049 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1050 ; ZVFH-NEXT: vfwnmacc.vf v8, fa0, v16
1053 ; ZVFHMIN-LABEL: vfwnmacc_fv_nxv16f32:
1055 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1056 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1057 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1058 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1059 ; ZVFHMIN-NEXT: vfnmacc.vf v8, fa5, v24
1061 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
1062 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1063 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1064 %ve = fpext <vscale x 16 x half> %splat to <vscale x 16 x float>
1065 %vf = fneg <vscale x 16 x float> %va
1066 %vg = fneg <vscale x 16 x float> %ve
1067 %vh = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vd, <vscale x 16 x float> %vg, <vscale x 16 x float> %vf)
1068 ret <vscale x 16 x float> %vh
1071 define <vscale x 16 x float> @vfwmsac_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %vc) {
1072 ; ZVFH-LABEL: vfwmsac_vv_nxv16f32:
1074 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1075 ; ZVFH-NEXT: vfwmsac.vv v8, v16, v20
1078 ; ZVFHMIN-LABEL: vfwmsac_vv_nxv16f32:
1080 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1081 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1082 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v20
1083 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1084 ; ZVFHMIN-NEXT: vfmsac.vv v8, v24, v0
1086 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1087 %ve = fpext <vscale x 16 x half> %vc to <vscale x 16 x float>
1088 %vf = fneg <vscale x 16 x float> %va
1089 %vg = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vd, <vscale x 16 x float> %ve, <vscale x 16 x float> %vf)
1090 ret <vscale x 16 x float> %vg
1093 define <vscale x 16 x float> @vfwmsac_vf_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, half %c) {
1094 ; ZVFH-LABEL: vfwmsac_vf_nxv16f32:
1096 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1097 ; ZVFH-NEXT: vfwmsac.vf v8, fa0, v16
1100 ; ZVFHMIN-LABEL: vfwmsac_vf_nxv16f32:
1102 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1103 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1104 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1105 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1106 ; ZVFHMIN-NEXT: vfmsac.vf v8, fa5, v24
1108 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
1109 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1110 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1111 %ve = fpext <vscale x 16 x half> %splat to <vscale x 16 x float>
1112 %vf = fneg <vscale x 16 x float> %va
1113 %vg = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vd, <vscale x 16 x float> %ve, <vscale x 16 x float> %vf)
1114 ret <vscale x 16 x float> %vg
1117 define <vscale x 16 x float> @vfwnmsac_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %vc) {
1118 ; ZVFH-LABEL: vfwnmsac_vv_nxv16f32:
1120 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1121 ; ZVFH-NEXT: vfwnmsac.vv v8, v16, v20
1124 ; ZVFHMIN-LABEL: vfwnmsac_vv_nxv16f32:
1126 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1127 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1128 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v20
1129 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1130 ; ZVFHMIN-NEXT: vfnmsac.vv v8, v24, v0
1132 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1133 %ve = fpext <vscale x 16 x half> %vc to <vscale x 16 x float>
1134 %vf = fneg <vscale x 16 x float> %vd
1135 %vg = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vf, <vscale x 16 x float> %ve, <vscale x 16 x float> %va)
1136 ret <vscale x 16 x float> %vg
1139 define <vscale x 16 x float> @vfwnmsac_vf_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, half %c) {
1140 ; ZVFH-LABEL: vfwnmsac_vf_nxv16f32:
1142 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1143 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v16
1146 ; ZVFHMIN-LABEL: vfwnmsac_vf_nxv16f32:
1148 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1149 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1150 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1151 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1152 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v24
1154 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
1155 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1156 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1157 %ve = fpext <vscale x 16 x half> %splat to <vscale x 16 x float>
1158 %vf = fneg <vscale x 16 x float> %vd
1159 %vg = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vf, <vscale x 16 x float> %ve, <vscale x 16 x float> %va)
1160 ret <vscale x 16 x float> %vg
1163 define <vscale x 16 x float> @vfwnmsac_fv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x half> %vb, half %c) {
1164 ; ZVFH-LABEL: vfwnmsac_fv_nxv16f32:
1166 ; ZVFH-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1167 ; ZVFH-NEXT: vfwnmsac.vf v8, fa0, v16
1170 ; ZVFHMIN-LABEL: vfwnmsac_fv_nxv16f32:
1172 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
1173 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v16
1174 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
1175 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
1176 ; ZVFHMIN-NEXT: vfnmsac.vf v8, fa5, v24
1178 %head = insertelement <vscale x 16 x half> poison, half %c, i32 0
1179 %splat = shufflevector <vscale x 16 x half> %head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
1180 %vd = fpext <vscale x 16 x half> %vb to <vscale x 16 x float>
1181 %ve = fpext <vscale x 16 x half> %splat to <vscale x 16 x float>
1182 %vf = fneg <vscale x 16 x float> %ve
1183 %vg = call <vscale x 16 x float> @llvm.fma.v16f32(<vscale x 16 x float> %vd, <vscale x 16 x float> %vf, <vscale x 16 x float> %va)
1184 ret <vscale x 16 x float> %vg
1187 declare <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>)
1189 define <vscale x 1 x double> @vfwmacc_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc) {
1190 ; CHECK-LABEL: vfwmacc_vv_nxv1f64:
1192 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1193 ; CHECK-NEXT: vfwmacc.vv v8, v9, v10
1195 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1196 %ve = fpext <vscale x 1 x float> %vc to <vscale x 1 x double>
1197 %vf = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vd, <vscale x 1 x double> %ve, <vscale x 1 x double> %va)
1198 ret <vscale x 1 x double> %vf
1201 define <vscale x 1 x double> @vfwmacc_vf_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, float %c) {
1202 ; CHECK-LABEL: vfwmacc_vf_nxv1f64:
1204 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1205 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v9
1207 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
1208 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1209 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1210 %ve = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1211 %vf = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vd, <vscale x 1 x double> %ve, <vscale x 1 x double> %va)
1212 ret <vscale x 1 x double> %vf
1215 define <vscale x 1 x double> @vfwnmacc_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc) {
1216 ; CHECK-LABEL: vfwnmacc_vv_nxv1f64:
1218 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1219 ; CHECK-NEXT: vfwnmacc.vv v8, v9, v10
1221 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1222 %ve = fpext <vscale x 1 x float> %vc to <vscale x 1 x double>
1223 %vf = fneg <vscale x 1 x double> %va
1224 %vg = fneg <vscale x 1 x double> %vd
1225 %vh = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vg, <vscale x 1 x double> %ve, <vscale x 1 x double> %vf)
1226 ret <vscale x 1 x double> %vh
1229 define <vscale x 1 x double> @vfwnmacc_vf_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, float %c) {
1230 ; CHECK-LABEL: vfwnmacc_vf_nxv1f64:
1232 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1233 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
1235 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
1236 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1237 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1238 %ve = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1239 %vf = fneg <vscale x 1 x double> %va
1240 %vg = fneg <vscale x 1 x double> %vd
1241 %vh = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vg, <vscale x 1 x double> %ve, <vscale x 1 x double> %vf)
1242 ret <vscale x 1 x double> %vh
1245 define <vscale x 1 x double> @vfwnmacc_fv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, float %c) {
1246 ; CHECK-LABEL: vfwnmacc_fv_nxv1f64:
1248 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1249 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
1251 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
1252 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1253 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1254 %ve = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1255 %vf = fneg <vscale x 1 x double> %va
1256 %vg = fneg <vscale x 1 x double> %ve
1257 %vh = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vd, <vscale x 1 x double> %vg, <vscale x 1 x double> %vf)
1258 ret <vscale x 1 x double> %vh
1261 define <vscale x 1 x double> @vfwmsac_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc) {
1262 ; CHECK-LABEL: vfwmsac_vv_nxv1f64:
1264 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1265 ; CHECK-NEXT: vfwmsac.vv v8, v9, v10
1267 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1268 %ve = fpext <vscale x 1 x float> %vc to <vscale x 1 x double>
1269 %vf = fneg <vscale x 1 x double> %va
1270 %vg = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vd, <vscale x 1 x double> %ve, <vscale x 1 x double> %vf)
1271 ret <vscale x 1 x double> %vg
1274 define <vscale x 1 x double> @vfwmsac_vf_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, float %c) {
1275 ; CHECK-LABEL: vfwmsac_vf_nxv1f64:
1277 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1278 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v9
1280 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
1281 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1282 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1283 %ve = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1284 %vf = fneg <vscale x 1 x double> %va
1285 %vg = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vd, <vscale x 1 x double> %ve, <vscale x 1 x double> %vf)
1286 ret <vscale x 1 x double> %vg
1289 define <vscale x 1 x double> @vfwnmsac_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %vc) {
1290 ; CHECK-LABEL: vfwnmsac_vv_nxv1f64:
1292 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1293 ; CHECK-NEXT: vfwnmsac.vv v8, v9, v10
1295 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1296 %ve = fpext <vscale x 1 x float> %vc to <vscale x 1 x double>
1297 %vf = fneg <vscale x 1 x double> %vd
1298 %vg = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vf, <vscale x 1 x double> %ve, <vscale x 1 x double> %va)
1299 ret <vscale x 1 x double> %vg
1302 define <vscale x 1 x double> @vfwnmsac_vf_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, float %c) {
1303 ; CHECK-LABEL: vfwnmsac_vf_nxv1f64:
1305 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1306 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
1308 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
1309 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1310 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1311 %ve = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1312 %vf = fneg <vscale x 1 x double> %vd
1313 %vg = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vf, <vscale x 1 x double> %ve, <vscale x 1 x double> %va)
1314 ret <vscale x 1 x double> %vg
1317 define <vscale x 1 x double> @vfwnmsac_fv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x float> %vb, float %c) {
1318 ; CHECK-LABEL: vfwnmsac_fv_nxv1f64:
1320 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
1321 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
1323 %head = insertelement <vscale x 1 x float> poison, float %c, i32 0
1324 %splat = shufflevector <vscale x 1 x float> %head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
1325 %vd = fpext <vscale x 1 x float> %vb to <vscale x 1 x double>
1326 %ve = fpext <vscale x 1 x float> %splat to <vscale x 1 x double>
1327 %vf = fneg <vscale x 1 x double> %ve
1328 %vg = call <vscale x 1 x double> @llvm.fma.v1f64(<vscale x 1 x double> %vd, <vscale x 1 x double> %vf, <vscale x 1 x double> %va)
1329 ret <vscale x 1 x double> %vg
1332 declare <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>)
1334 define <vscale x 2 x double> @vfwmacc_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %vc) {
1335 ; CHECK-LABEL: vfwmacc_vv_nxv2f64:
1337 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1338 ; CHECK-NEXT: vfwmacc.vv v8, v10, v11
1340 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1341 %ve = fpext <vscale x 2 x float> %vc to <vscale x 2 x double>
1342 %vf = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vd, <vscale x 2 x double> %ve, <vscale x 2 x double> %va)
1343 ret <vscale x 2 x double> %vf
1346 define <vscale x 2 x double> @vfwmacc_vf_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, float %c) {
1347 ; CHECK-LABEL: vfwmacc_vf_nxv2f64:
1349 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1350 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v10
1352 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
1353 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1354 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1355 %ve = fpext <vscale x 2 x float> %splat to <vscale x 2 x double>
1356 %vf = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vd, <vscale x 2 x double> %ve, <vscale x 2 x double> %va)
1357 ret <vscale x 2 x double> %vf
1360 define <vscale x 2 x double> @vfwnmacc_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %vc) {
1361 ; CHECK-LABEL: vfwnmacc_vv_nxv2f64:
1363 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1364 ; CHECK-NEXT: vfwnmacc.vv v8, v10, v11
1366 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1367 %ve = fpext <vscale x 2 x float> %vc to <vscale x 2 x double>
1368 %vf = fneg <vscale x 2 x double> %va
1369 %vg = fneg <vscale x 2 x double> %vd
1370 %vh = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vg, <vscale x 2 x double> %ve, <vscale x 2 x double> %vf)
1371 ret <vscale x 2 x double> %vh
1374 define <vscale x 2 x double> @vfwnmacc_vf_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, float %c) {
1375 ; CHECK-LABEL: vfwnmacc_vf_nxv2f64:
1377 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1378 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v10
1380 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
1381 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1382 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1383 %ve = fpext <vscale x 2 x float> %splat to <vscale x 2 x double>
1384 %vf = fneg <vscale x 2 x double> %va
1385 %vg = fneg <vscale x 2 x double> %vd
1386 %vh = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vg, <vscale x 2 x double> %ve, <vscale x 2 x double> %vf)
1387 ret <vscale x 2 x double> %vh
1390 define <vscale x 2 x double> @vfwnmacc_fv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, float %c) {
1391 ; CHECK-LABEL: vfwnmacc_fv_nxv2f64:
1393 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1394 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v10
1396 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
1397 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1398 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1399 %ve = fpext <vscale x 2 x float> %splat to <vscale x 2 x double>
1400 %vf = fneg <vscale x 2 x double> %va
1401 %vg = fneg <vscale x 2 x double> %ve
1402 %vh = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vd, <vscale x 2 x double> %vg, <vscale x 2 x double> %vf)
1403 ret <vscale x 2 x double> %vh
1406 define <vscale x 2 x double> @vfwmsac_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %vc) {
1407 ; CHECK-LABEL: vfwmsac_vv_nxv2f64:
1409 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1410 ; CHECK-NEXT: vfwmsac.vv v8, v10, v11
1412 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1413 %ve = fpext <vscale x 2 x float> %vc to <vscale x 2 x double>
1414 %vf = fneg <vscale x 2 x double> %va
1415 %vg = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vd, <vscale x 2 x double> %ve, <vscale x 2 x double> %vf)
1416 ret <vscale x 2 x double> %vg
1419 define <vscale x 2 x double> @vfwmsac_vf_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, float %c) {
1420 ; CHECK-LABEL: vfwmsac_vf_nxv2f64:
1422 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1423 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v10
1425 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
1426 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1427 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1428 %ve = fpext <vscale x 2 x float> %splat to <vscale x 2 x double>
1429 %vf = fneg <vscale x 2 x double> %va
1430 %vg = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vd, <vscale x 2 x double> %ve, <vscale x 2 x double> %vf)
1431 ret <vscale x 2 x double> %vg
1434 define <vscale x 2 x double> @vfwnmsac_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %vc) {
1435 ; CHECK-LABEL: vfwnmsac_vv_nxv2f64:
1437 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1438 ; CHECK-NEXT: vfwnmsac.vv v8, v10, v11
1440 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1441 %ve = fpext <vscale x 2 x float> %vc to <vscale x 2 x double>
1442 %vf = fneg <vscale x 2 x double> %vd
1443 %vg = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vf, <vscale x 2 x double> %ve, <vscale x 2 x double> %va)
1444 ret <vscale x 2 x double> %vg
1447 define <vscale x 2 x double> @vfwnmsac_vf_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, float %c) {
1448 ; CHECK-LABEL: vfwnmsac_vf_nxv2f64:
1450 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1451 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v10
1453 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
1454 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1455 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1456 %ve = fpext <vscale x 2 x float> %splat to <vscale x 2 x double>
1457 %vf = fneg <vscale x 2 x double> %vd
1458 %vg = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vf, <vscale x 2 x double> %ve, <vscale x 2 x double> %va)
1459 ret <vscale x 2 x double> %vg
1462 define <vscale x 2 x double> @vfwnmsac_fv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x float> %vb, float %c) {
1463 ; CHECK-LABEL: vfwnmsac_fv_nxv2f64:
1465 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
1466 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v10
1468 %head = insertelement <vscale x 2 x float> poison, float %c, i32 0
1469 %splat = shufflevector <vscale x 2 x float> %head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1470 %vd = fpext <vscale x 2 x float> %vb to <vscale x 2 x double>
1471 %ve = fpext <vscale x 2 x float> %splat to <vscale x 2 x double>
1472 %vf = fneg <vscale x 2 x double> %ve
1473 %vg = call <vscale x 2 x double> @llvm.fma.v2f64(<vscale x 2 x double> %vd, <vscale x 2 x double> %vf, <vscale x 2 x double> %va)
1474 ret <vscale x 2 x double> %vg
1478 declare <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x double>)
1480 define <vscale x 4 x double> @vfwmacc_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %vc) {
1481 ; CHECK-LABEL: vfwmacc_vv_nxv4f64:
1483 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1484 ; CHECK-NEXT: vfwmacc.vv v8, v12, v14
1486 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1487 %ve = fpext <vscale x 4 x float> %vc to <vscale x 4 x double>
1488 %vf = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vd, <vscale x 4 x double> %ve, <vscale x 4 x double> %va)
1489 ret <vscale x 4 x double> %vf
1492 define <vscale x 4 x double> @vfwmacc_vf_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, float %c) {
1493 ; CHECK-LABEL: vfwmacc_vf_nxv4f64:
1495 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1496 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v12
1498 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
1499 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1500 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1501 %ve = fpext <vscale x 4 x float> %splat to <vscale x 4 x double>
1502 %vf = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vd, <vscale x 4 x double> %ve, <vscale x 4 x double> %va)
1503 ret <vscale x 4 x double> %vf
1506 define <vscale x 4 x double> @vfwnmacc_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %vc) {
1507 ; CHECK-LABEL: vfwnmacc_vv_nxv4f64:
1509 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1510 ; CHECK-NEXT: vfwnmacc.vv v8, v12, v14
1512 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1513 %ve = fpext <vscale x 4 x float> %vc to <vscale x 4 x double>
1514 %vf = fneg <vscale x 4 x double> %va
1515 %vg = fneg <vscale x 4 x double> %vd
1516 %vh = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vg, <vscale x 4 x double> %ve, <vscale x 4 x double> %vf)
1517 ret <vscale x 4 x double> %vh
1520 define <vscale x 4 x double> @vfwnmacc_vf_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, float %c) {
1521 ; CHECK-LABEL: vfwnmacc_vf_nxv4f64:
1523 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1524 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v12
1526 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
1527 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1528 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1529 %ve = fpext <vscale x 4 x float> %splat to <vscale x 4 x double>
1530 %vf = fneg <vscale x 4 x double> %va
1531 %vg = fneg <vscale x 4 x double> %vd
1532 %vh = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vg, <vscale x 4 x double> %ve, <vscale x 4 x double> %vf)
1533 ret <vscale x 4 x double> %vh
1536 define <vscale x 4 x double> @vfwnmacc_fv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, float %c) {
1537 ; CHECK-LABEL: vfwnmacc_fv_nxv4f64:
1539 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1540 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v12
1542 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
1543 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1544 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1545 %ve = fpext <vscale x 4 x float> %splat to <vscale x 4 x double>
1546 %vf = fneg <vscale x 4 x double> %va
1547 %vg = fneg <vscale x 4 x double> %ve
1548 %vh = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vd, <vscale x 4 x double> %vg, <vscale x 4 x double> %vf)
1549 ret <vscale x 4 x double> %vh
1552 define <vscale x 4 x double> @vfwmsac_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %vc) {
1553 ; CHECK-LABEL: vfwmsac_vv_nxv4f64:
1555 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1556 ; CHECK-NEXT: vfwmsac.vv v8, v12, v14
1558 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1559 %ve = fpext <vscale x 4 x float> %vc to <vscale x 4 x double>
1560 %vf = fneg <vscale x 4 x double> %va
1561 %vg = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vd, <vscale x 4 x double> %ve, <vscale x 4 x double> %vf)
1562 ret <vscale x 4 x double> %vg
1565 define <vscale x 4 x double> @vfwmsac_vf_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, float %c) {
1566 ; CHECK-LABEL: vfwmsac_vf_nxv4f64:
1568 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1569 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v12
1571 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
1572 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1573 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1574 %ve = fpext <vscale x 4 x float> %splat to <vscale x 4 x double>
1575 %vf = fneg <vscale x 4 x double> %va
1576 %vg = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vd, <vscale x 4 x double> %ve, <vscale x 4 x double> %vf)
1577 ret <vscale x 4 x double> %vg
1580 define <vscale x 4 x double> @vfwnmsac_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %vc) {
1581 ; CHECK-LABEL: vfwnmsac_vv_nxv4f64:
1583 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1584 ; CHECK-NEXT: vfwnmsac.vv v8, v12, v14
1586 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1587 %ve = fpext <vscale x 4 x float> %vc to <vscale x 4 x double>
1588 %vf = fneg <vscale x 4 x double> %vd
1589 %vg = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vf, <vscale x 4 x double> %ve, <vscale x 4 x double> %va)
1590 ret <vscale x 4 x double> %vg
1593 define <vscale x 4 x double> @vfwnmsac_vf_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, float %c) {
1594 ; CHECK-LABEL: vfwnmsac_vf_nxv4f64:
1596 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1597 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v12
1599 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
1600 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1601 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1602 %ve = fpext <vscale x 4 x float> %splat to <vscale x 4 x double>
1603 %vf = fneg <vscale x 4 x double> %vd
1604 %vg = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vf, <vscale x 4 x double> %ve, <vscale x 4 x double> %va)
1605 ret <vscale x 4 x double> %vg
1608 define <vscale x 4 x double> @vfwnmsac_fv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x float> %vb, float %c) {
1609 ; CHECK-LABEL: vfwnmsac_fv_nxv4f64:
1611 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
1612 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v12
1614 %head = insertelement <vscale x 4 x float> poison, float %c, i32 0
1615 %splat = shufflevector <vscale x 4 x float> %head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1616 %vd = fpext <vscale x 4 x float> %vb to <vscale x 4 x double>
1617 %ve = fpext <vscale x 4 x float> %splat to <vscale x 4 x double>
1618 %vf = fneg <vscale x 4 x double> %ve
1619 %vg = call <vscale x 4 x double> @llvm.fma.v4f64(<vscale x 4 x double> %vd, <vscale x 4 x double> %vf, <vscale x 4 x double> %va)
1620 ret <vscale x 4 x double> %vg
1623 declare <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x double>)
1625 define <vscale x 8 x double> @vfwmacc_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %vc) {
1626 ; CHECK-LABEL: vfwmacc_vv_nxv8f64:
1628 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1629 ; CHECK-NEXT: vfwmacc.vv v8, v16, v20
1631 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1632 %ve = fpext <vscale x 8 x float> %vc to <vscale x 8 x double>
1633 %vf = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vd, <vscale x 8 x double> %ve, <vscale x 8 x double> %va)
1634 ret <vscale x 8 x double> %vf
1637 define <vscale x 8 x double> @vfwmacc_vf_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, float %c) {
1638 ; CHECK-LABEL: vfwmacc_vf_nxv8f64:
1640 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1641 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v16
1643 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
1644 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1645 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1646 %ve = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
1647 %vf = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vd, <vscale x 8 x double> %ve, <vscale x 8 x double> %va)
1648 ret <vscale x 8 x double> %vf
1651 define <vscale x 8 x double> @vfwnmacc_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %vc) {
1652 ; CHECK-LABEL: vfwnmacc_vv_nxv8f64:
1654 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1655 ; CHECK-NEXT: vfwnmacc.vv v8, v16, v20
1657 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1658 %ve = fpext <vscale x 8 x float> %vc to <vscale x 8 x double>
1659 %vf = fneg <vscale x 8 x double> %va
1660 %vg = fneg <vscale x 8 x double> %vd
1661 %vh = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vg, <vscale x 8 x double> %ve, <vscale x 8 x double> %vf)
1662 ret <vscale x 8 x double> %vh
1665 define <vscale x 8 x double> @vfwnmacc_vf_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, float %c) {
1666 ; CHECK-LABEL: vfwnmacc_vf_nxv8f64:
1668 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1669 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v16
1671 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
1672 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1673 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1674 %ve = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
1675 %vf = fneg <vscale x 8 x double> %va
1676 %vg = fneg <vscale x 8 x double> %vd
1677 %vh = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vg, <vscale x 8 x double> %ve, <vscale x 8 x double> %vf)
1678 ret <vscale x 8 x double> %vh
1681 define <vscale x 8 x double> @vfwnmacc_fv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, float %c) {
1682 ; CHECK-LABEL: vfwnmacc_fv_nxv8f64:
1684 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1685 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v16
1687 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
1688 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1689 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1690 %ve = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
1691 %vf = fneg <vscale x 8 x double> %va
1692 %vg = fneg <vscale x 8 x double> %ve
1693 %vh = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vd, <vscale x 8 x double> %vg, <vscale x 8 x double> %vf)
1694 ret <vscale x 8 x double> %vh
1697 define <vscale x 8 x double> @vfwmsac_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %vc) {
1698 ; CHECK-LABEL: vfwmsac_vv_nxv8f64:
1700 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1701 ; CHECK-NEXT: vfwmsac.vv v8, v16, v20
1703 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1704 %ve = fpext <vscale x 8 x float> %vc to <vscale x 8 x double>
1705 %vf = fneg <vscale x 8 x double> %va
1706 %vg = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vd, <vscale x 8 x double> %ve, <vscale x 8 x double> %vf)
1707 ret <vscale x 8 x double> %vg
1710 define <vscale x 8 x double> @vfwmsac_vf_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, float %c) {
1711 ; CHECK-LABEL: vfwmsac_vf_nxv8f64:
1713 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1714 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v16
1716 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
1717 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1718 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1719 %ve = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
1720 %vf = fneg <vscale x 8 x double> %va
1721 %vg = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vd, <vscale x 8 x double> %ve, <vscale x 8 x double> %vf)
1722 ret <vscale x 8 x double> %vg
1725 define <vscale x 8 x double> @vfwnmsac_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %vc) {
1726 ; CHECK-LABEL: vfwnmsac_vv_nxv8f64:
1728 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1729 ; CHECK-NEXT: vfwnmsac.vv v8, v16, v20
1731 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1732 %ve = fpext <vscale x 8 x float> %vc to <vscale x 8 x double>
1733 %vf = fneg <vscale x 8 x double> %vd
1734 %vg = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vf, <vscale x 8 x double> %ve, <vscale x 8 x double> %va)
1735 ret <vscale x 8 x double> %vg
1738 define <vscale x 8 x double> @vfwnmsac_vf_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, float %c) {
1739 ; CHECK-LABEL: vfwnmsac_vf_nxv8f64:
1741 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1742 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v16
1744 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
1745 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1746 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1747 %ve = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
1748 %vf = fneg <vscale x 8 x double> %vd
1749 %vg = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vf, <vscale x 8 x double> %ve, <vscale x 8 x double> %va)
1750 ret <vscale x 8 x double> %vg
1753 define <vscale x 8 x double> @vfwnmsac_fv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x float> %vb, float %c) {
1754 ; CHECK-LABEL: vfwnmsac_fv_nxv8f64:
1756 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
1757 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v16
1759 %head = insertelement <vscale x 8 x float> poison, float %c, i32 0
1760 %splat = shufflevector <vscale x 8 x float> %head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1761 %vd = fpext <vscale x 8 x float> %vb to <vscale x 8 x double>
1762 %ve = fpext <vscale x 8 x float> %splat to <vscale x 8 x double>
1763 %vf = fneg <vscale x 8 x double> %ve
1764 %vg = call <vscale x 8 x double> @llvm.fma.v8f64(<vscale x 8 x double> %vd, <vscale x 8 x double> %vf, <vscale x 8 x double> %va)
1765 ret <vscale x 8 x double> %vg