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
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 declare <1 x float> @llvm.fma.v1f32(<1 x float>, <1 x float>, <1 x float>)
9 define <1 x float> @vfwmacc_vv_v1f32(<1 x float> %va, <1 x half> %vb, <1 x half> %vc) {
10 ; CHECK-LABEL: vfwmacc_vv_v1f32:
12 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
13 ; CHECK-NEXT: vfwmacc.vv v8, v9, v10
15 %vd = fpext <1 x half> %vb to <1 x float>
16 %ve = fpext <1 x half> %vc to <1 x float>
17 %vf = call <1 x float> @llvm.fma.v1f32(<1 x float> %vd, <1 x float> %ve, <1 x float> %va)
21 define <1 x float> @vfwmacc_vf_v1f32(<1 x float> %va, <1 x half> %vb, half %c) {
22 ; CHECK-LABEL: vfwmacc_vf_v1f32:
24 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
25 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v9
27 %head = insertelement <1 x half> poison, half %c, i32 0
28 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
29 %vd = fpext <1 x half> %vb to <1 x float>
30 %ve = fpext <1 x half> %splat to <1 x float>
31 %vf = call <1 x float> @llvm.fma.v1f32(<1 x float> %vd, <1 x float> %ve, <1 x float> %va)
35 define <1 x float> @vfwnmacc_vv_v1f32(<1 x float> %va, <1 x half> %vb, <1 x half> %vc) {
36 ; CHECK-LABEL: vfwnmacc_vv_v1f32:
38 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
39 ; CHECK-NEXT: vfwnmacc.vv v8, v9, v10
41 %vd = fpext <1 x half> %vb to <1 x float>
42 %ve = fpext <1 x half> %vc to <1 x float>
43 %vf = fneg <1 x float> %va
44 %vg = fneg <1 x float> %vd
45 %vh = call <1 x float> @llvm.fma.v1f32(<1 x float> %vg, <1 x float> %ve, <1 x float> %vf)
49 define <1 x float> @vfwnmacc_vf_v1f32(<1 x float> %va, <1 x half> %vb, half %c) {
50 ; CHECK-LABEL: vfwnmacc_vf_v1f32:
52 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
53 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
55 %head = insertelement <1 x half> poison, half %c, i32 0
56 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
57 %vd = fpext <1 x half> %vb to <1 x float>
58 %ve = fpext <1 x half> %splat to <1 x float>
59 %vf = fneg <1 x float> %va
60 %vg = fneg <1 x float> %vd
61 %vh = call <1 x float> @llvm.fma.v1f32(<1 x float> %vg, <1 x float> %ve, <1 x float> %vf)
65 define <1 x float> @vfwnmacc_fv_v1f32(<1 x float> %va, <1 x half> %vb, half %c) {
66 ; CHECK-LABEL: vfwnmacc_fv_v1f32:
68 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
69 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
71 %head = insertelement <1 x half> poison, half %c, i32 0
72 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
73 %vd = fpext <1 x half> %vb to <1 x float>
74 %ve = fpext <1 x half> %splat to <1 x float>
75 %vf = fneg <1 x float> %va
76 %vg = fneg <1 x float> %ve
77 %vh = call <1 x float> @llvm.fma.v1f32(<1 x float> %vd, <1 x float> %vg, <1 x float> %vf)
81 define <1 x float> @vfwmsac_vv_v1f32(<1 x float> %va, <1 x half> %vb, <1 x half> %vc) {
82 ; CHECK-LABEL: vfwmsac_vv_v1f32:
84 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
85 ; CHECK-NEXT: vfwmsac.vv v8, v9, v10
87 %vd = fpext <1 x half> %vb to <1 x float>
88 %ve = fpext <1 x half> %vc to <1 x float>
89 %vf = fneg <1 x float> %va
90 %vg = call <1 x float> @llvm.fma.v1f32(<1 x float> %vd, <1 x float> %ve, <1 x float> %vf)
94 define <1 x float> @vfwmsac_vf_v1f32(<1 x float> %va, <1 x half> %vb, half %c) {
95 ; CHECK-LABEL: vfwmsac_vf_v1f32:
97 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
98 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v9
100 %head = insertelement <1 x half> poison, half %c, i32 0
101 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
102 %vd = fpext <1 x half> %vb to <1 x float>
103 %ve = fpext <1 x half> %splat to <1 x float>
104 %vf = fneg <1 x float> %va
105 %vg = call <1 x float> @llvm.fma.v1f32(<1 x float> %vd, <1 x float> %ve, <1 x float> %vf)
109 define <1 x float> @vfwnmsac_vv_v1f32(<1 x float> %va, <1 x half> %vb, <1 x half> %vc) {
110 ; CHECK-LABEL: vfwnmsac_vv_v1f32:
112 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
113 ; CHECK-NEXT: vfwnmsac.vv v8, v9, v10
115 %vd = fpext <1 x half> %vb to <1 x float>
116 %ve = fpext <1 x half> %vc to <1 x float>
117 %vf = fneg <1 x float> %vd
118 %vg = call <1 x float> @llvm.fma.v1f32(<1 x float> %vf, <1 x float> %ve, <1 x float> %va)
122 define <1 x float> @vfwnmsac_vf_v1f32(<1 x float> %va, <1 x half> %vb, half %c) {
123 ; CHECK-LABEL: vfwnmsac_vf_v1f32:
125 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
126 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
128 %head = insertelement <1 x half> poison, half %c, i32 0
129 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
130 %vd = fpext <1 x half> %vb to <1 x float>
131 %ve = fpext <1 x half> %splat to <1 x float>
132 %vf = fneg <1 x float> %vd
133 %vg = call <1 x float> @llvm.fma.v1f32(<1 x float> %vf, <1 x float> %ve, <1 x float> %va)
137 define <1 x float> @vfwnmsac_fv_v1f32(<1 x float> %va, <1 x half> %vb, half %c) {
138 ; CHECK-LABEL: vfwnmsac_fv_v1f32:
140 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
141 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
143 %head = insertelement <1 x half> poison, half %c, i32 0
144 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
145 %vd = fpext <1 x half> %vb to <1 x float>
146 %ve = fpext <1 x half> %splat to <1 x float>
147 %vf = fneg <1 x float> %ve
148 %vg = call <1 x float> @llvm.fma.v1f32(<1 x float> %vd, <1 x float> %vf, <1 x float> %va)
152 declare <2 x float> @llvm.fma.v2f32(<2 x float>, <2 x float>, <2 x float>)
154 define <2 x float> @vfwmacc_vv_v2f32(<2 x float> %va, <2 x half> %vb, <2 x half> %vc) {
155 ; CHECK-LABEL: vfwmacc_vv_v2f32:
157 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
158 ; CHECK-NEXT: vfwmacc.vv v8, v9, v10
160 %vd = fpext <2 x half> %vb to <2 x float>
161 %ve = fpext <2 x half> %vc to <2 x float>
162 %vf = call <2 x float> @llvm.fma.v2f32(<2 x float> %vd, <2 x float> %ve, <2 x float> %va)
166 define <2 x float> @vfwmacc_vf_v2f32(<2 x float> %va, <2 x half> %vb, half %c) {
167 ; CHECK-LABEL: vfwmacc_vf_v2f32:
169 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
170 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v9
172 %head = insertelement <2 x half> poison, half %c, i32 0
173 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
174 %vd = fpext <2 x half> %vb to <2 x float>
175 %ve = fpext <2 x half> %splat to <2 x float>
176 %vf = call <2 x float> @llvm.fma.v2f32(<2 x float> %vd, <2 x float> %ve, <2 x float> %va)
180 define <2 x float> @vfwnmacc_vv_v2f32(<2 x float> %va, <2 x half> %vb, <2 x half> %vc) {
181 ; CHECK-LABEL: vfwnmacc_vv_v2f32:
183 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
184 ; CHECK-NEXT: vfwnmacc.vv v8, v9, v10
186 %vd = fpext <2 x half> %vb to <2 x float>
187 %ve = fpext <2 x half> %vc to <2 x float>
188 %vf = fneg <2 x float> %va
189 %vg = fneg <2 x float> %vd
190 %vh = call <2 x float> @llvm.fma.v2f32(<2 x float> %vg, <2 x float> %ve, <2 x float> %vf)
194 define <2 x float> @vfwnmacc_vf_v2f32(<2 x float> %va, <2 x half> %vb, half %c) {
195 ; CHECK-LABEL: vfwnmacc_vf_v2f32:
197 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
198 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
200 %head = insertelement <2 x half> poison, half %c, i32 0
201 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
202 %vd = fpext <2 x half> %vb to <2 x float>
203 %ve = fpext <2 x half> %splat to <2 x float>
204 %vf = fneg <2 x float> %va
205 %vg = fneg <2 x float> %vd
206 %vh = call <2 x float> @llvm.fma.v2f32(<2 x float> %vg, <2 x float> %ve, <2 x float> %vf)
210 define <2 x float> @vfwnmacc_fv_v2f32(<2 x float> %va, <2 x half> %vb, half %c) {
211 ; CHECK-LABEL: vfwnmacc_fv_v2f32:
213 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
214 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
216 %head = insertelement <2 x half> poison, half %c, i32 0
217 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
218 %vd = fpext <2 x half> %vb to <2 x float>
219 %ve = fpext <2 x half> %splat to <2 x float>
220 %vf = fneg <2 x float> %va
221 %vg = fneg <2 x float> %ve
222 %vh = call <2 x float> @llvm.fma.v2f32(<2 x float> %vd, <2 x float> %vg, <2 x float> %vf)
226 define <2 x float> @vfwmsac_vv_v2f32(<2 x float> %va, <2 x half> %vb, <2 x half> %vc) {
227 ; CHECK-LABEL: vfwmsac_vv_v2f32:
229 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
230 ; CHECK-NEXT: vfwmsac.vv v8, v9, v10
232 %vd = fpext <2 x half> %vb to <2 x float>
233 %ve = fpext <2 x half> %vc to <2 x float>
234 %vf = fneg <2 x float> %va
235 %vg = call <2 x float> @llvm.fma.v2f32(<2 x float> %vd, <2 x float> %ve, <2 x float> %vf)
239 define <2 x float> @vfwmsac_vf_v2f32(<2 x float> %va, <2 x half> %vb, half %c) {
240 ; CHECK-LABEL: vfwmsac_vf_v2f32:
242 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
243 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v9
245 %head = insertelement <2 x half> poison, half %c, i32 0
246 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
247 %vd = fpext <2 x half> %vb to <2 x float>
248 %ve = fpext <2 x half> %splat to <2 x float>
249 %vf = fneg <2 x float> %va
250 %vg = call <2 x float> @llvm.fma.v2f32(<2 x float> %vd, <2 x float> %ve, <2 x float> %vf)
254 define <2 x float> @vfwnmsac_vv_v2f32(<2 x float> %va, <2 x half> %vb, <2 x half> %vc) {
255 ; CHECK-LABEL: vfwnmsac_vv_v2f32:
257 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
258 ; CHECK-NEXT: vfwnmsac.vv v8, v9, v10
260 %vd = fpext <2 x half> %vb to <2 x float>
261 %ve = fpext <2 x half> %vc to <2 x float>
262 %vf = fneg <2 x float> %vd
263 %vg = call <2 x float> @llvm.fma.v2f32(<2 x float> %vf, <2 x float> %ve, <2 x float> %va)
267 define <2 x float> @vfwnmsac_vf_v2f32(<2 x float> %va, <2 x half> %vb, half %c) {
268 ; CHECK-LABEL: vfwnmsac_vf_v2f32:
270 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
271 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
273 %head = insertelement <2 x half> poison, half %c, i32 0
274 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
275 %vd = fpext <2 x half> %vb to <2 x float>
276 %ve = fpext <2 x half> %splat to <2 x float>
277 %vf = fneg <2 x float> %vd
278 %vg = call <2 x float> @llvm.fma.v2f32(<2 x float> %vf, <2 x float> %ve, <2 x float> %va)
282 define <2 x float> @vfwnmsac_fv_v2f32(<2 x float> %va, <2 x half> %vb, half %c) {
283 ; CHECK-LABEL: vfwnmsac_fv_v2f32:
285 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
286 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
288 %head = insertelement <2 x half> poison, half %c, i32 0
289 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
290 %vd = fpext <2 x half> %vb to <2 x float>
291 %ve = fpext <2 x half> %splat to <2 x float>
292 %vf = fneg <2 x float> %ve
293 %vg = call <2 x float> @llvm.fma.v2f32(<2 x float> %vd, <2 x float> %vf, <2 x float> %va)
298 declare <4 x float> @llvm.fma.v4f32(<4 x float>, <4 x float>, <4 x float>)
300 define <4 x float> @vfwmacc_vv_v4f32(<4 x float> %va, <4 x half> %vb, <4 x half> %vc) {
301 ; CHECK-LABEL: vfwmacc_vv_v4f32:
303 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
304 ; CHECK-NEXT: vfwmacc.vv v8, v9, v10
306 %vd = fpext <4 x half> %vb to <4 x float>
307 %ve = fpext <4 x half> %vc to <4 x float>
308 %vf = call <4 x float> @llvm.fma.v4f32(<4 x float> %vd, <4 x float> %ve, <4 x float> %va)
312 define <4 x float> @vfwmacc_vf_v4f32(<4 x float> %va, <4 x half> %vb, half %c) {
313 ; CHECK-LABEL: vfwmacc_vf_v4f32:
315 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
316 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v9
318 %head = insertelement <4 x half> poison, half %c, i32 0
319 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
320 %vd = fpext <4 x half> %vb to <4 x float>
321 %ve = fpext <4 x half> %splat to <4 x float>
322 %vf = call <4 x float> @llvm.fma.v4f32(<4 x float> %vd, <4 x float> %ve, <4 x float> %va)
326 define <4 x float> @vfwnmacc_vv_v4f32(<4 x float> %va, <4 x half> %vb, <4 x half> %vc) {
327 ; CHECK-LABEL: vfwnmacc_vv_v4f32:
329 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
330 ; CHECK-NEXT: vfwnmacc.vv v8, v9, v10
332 %vd = fpext <4 x half> %vb to <4 x float>
333 %ve = fpext <4 x half> %vc to <4 x float>
334 %vf = fneg <4 x float> %va
335 %vg = fneg <4 x float> %vd
336 %vh = call <4 x float> @llvm.fma.v4f32(<4 x float> %vg, <4 x float> %ve, <4 x float> %vf)
340 define <4 x float> @vfwnmacc_vf_v4f32(<4 x float> %va, <4 x half> %vb, half %c) {
341 ; CHECK-LABEL: vfwnmacc_vf_v4f32:
343 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
344 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
346 %head = insertelement <4 x half> poison, half %c, i32 0
347 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
348 %vd = fpext <4 x half> %vb to <4 x float>
349 %ve = fpext <4 x half> %splat to <4 x float>
350 %vf = fneg <4 x float> %va
351 %vg = fneg <4 x float> %vd
352 %vh = call <4 x float> @llvm.fma.v4f32(<4 x float> %vg, <4 x float> %ve, <4 x float> %vf)
356 define <4 x float> @vfwnmacc_fv_v4f32(<4 x float> %va, <4 x half> %vb, half %c) {
357 ; CHECK-LABEL: vfwnmacc_fv_v4f32:
359 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
360 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
362 %head = insertelement <4 x half> poison, half %c, i32 0
363 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
364 %vd = fpext <4 x half> %vb to <4 x float>
365 %ve = fpext <4 x half> %splat to <4 x float>
366 %vf = fneg <4 x float> %va
367 %vg = fneg <4 x float> %ve
368 %vh = call <4 x float> @llvm.fma.v4f32(<4 x float> %vd, <4 x float> %vg, <4 x float> %vf)
372 define <4 x float> @vfwmsac_vv_v4f32(<4 x float> %va, <4 x half> %vb, <4 x half> %vc) {
373 ; CHECK-LABEL: vfwmsac_vv_v4f32:
375 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
376 ; CHECK-NEXT: vfwmsac.vv v8, v9, v10
378 %vd = fpext <4 x half> %vb to <4 x float>
379 %ve = fpext <4 x half> %vc to <4 x float>
380 %vf = fneg <4 x float> %va
381 %vg = call <4 x float> @llvm.fma.v4f32(<4 x float> %vd, <4 x float> %ve, <4 x float> %vf)
385 define <4 x float> @vfwmsac_vf_v4f32(<4 x float> %va, <4 x half> %vb, half %c) {
386 ; CHECK-LABEL: vfwmsac_vf_v4f32:
388 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
389 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v9
391 %head = insertelement <4 x half> poison, half %c, i32 0
392 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
393 %vd = fpext <4 x half> %vb to <4 x float>
394 %ve = fpext <4 x half> %splat to <4 x float>
395 %vf = fneg <4 x float> %va
396 %vg = call <4 x float> @llvm.fma.v4f32(<4 x float> %vd, <4 x float> %ve, <4 x float> %vf)
400 define <4 x float> @vfwnmsac_vv_v4f32(<4 x float> %va, <4 x half> %vb, <4 x half> %vc) {
401 ; CHECK-LABEL: vfwnmsac_vv_v4f32:
403 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
404 ; CHECK-NEXT: vfwnmsac.vv v8, v9, v10
406 %vd = fpext <4 x half> %vb to <4 x float>
407 %ve = fpext <4 x half> %vc to <4 x float>
408 %vf = fneg <4 x float> %vd
409 %vg = call <4 x float> @llvm.fma.v4f32(<4 x float> %vf, <4 x float> %ve, <4 x float> %va)
413 define <4 x float> @vfwnmsac_vf_v4f32(<4 x float> %va, <4 x half> %vb, half %c) {
414 ; CHECK-LABEL: vfwnmsac_vf_v4f32:
416 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
417 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
419 %head = insertelement <4 x half> poison, half %c, i32 0
420 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
421 %vd = fpext <4 x half> %vb to <4 x float>
422 %ve = fpext <4 x half> %splat to <4 x float>
423 %vf = fneg <4 x float> %vd
424 %vg = call <4 x float> @llvm.fma.v4f32(<4 x float> %vf, <4 x float> %ve, <4 x float> %va)
428 define <4 x float> @vfwnmsac_fv_v4f32(<4 x float> %va, <4 x half> %vb, half %c) {
429 ; CHECK-LABEL: vfwnmsac_fv_v4f32:
431 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
432 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
434 %head = insertelement <4 x half> poison, half %c, i32 0
435 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
436 %vd = fpext <4 x half> %vb to <4 x float>
437 %ve = fpext <4 x half> %splat to <4 x float>
438 %vf = fneg <4 x float> %ve
439 %vg = call <4 x float> @llvm.fma.v4f32(<4 x float> %vd, <4 x float> %vf, <4 x float> %va)
443 declare <8 x float> @llvm.fma.v8f32(<8 x float>, <8 x float>, <8 x float>)
445 define <8 x float> @vfwmacc_vv_v8f32(<8 x float> %va, <8 x half> %vb, <8 x half> %vc) {
446 ; CHECK-LABEL: vfwmacc_vv_v8f32:
448 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
449 ; CHECK-NEXT: vfwmacc.vv v8, v10, v11
451 %vd = fpext <8 x half> %vb to <8 x float>
452 %ve = fpext <8 x half> %vc to <8 x float>
453 %vf = call <8 x float> @llvm.fma.v8f32(<8 x float> %vd, <8 x float> %ve, <8 x float> %va)
457 define <8 x float> @vfwmacc_vf_v8f32(<8 x float> %va, <8 x half> %vb, half %c) {
458 ; CHECK-LABEL: vfwmacc_vf_v8f32:
460 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
461 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v10
463 %head = insertelement <8 x half> poison, half %c, i32 0
464 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
465 %vd = fpext <8 x half> %vb to <8 x float>
466 %ve = fpext <8 x half> %splat to <8 x float>
467 %vf = call <8 x float> @llvm.fma.v8f32(<8 x float> %vd, <8 x float> %ve, <8 x float> %va)
471 define <8 x float> @vfwnmacc_vv_v8f32(<8 x float> %va, <8 x half> %vb, <8 x half> %vc) {
472 ; CHECK-LABEL: vfwnmacc_vv_v8f32:
474 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
475 ; CHECK-NEXT: vfwnmacc.vv v8, v10, v11
477 %vd = fpext <8 x half> %vb to <8 x float>
478 %ve = fpext <8 x half> %vc to <8 x float>
479 %vf = fneg <8 x float> %va
480 %vg = fneg <8 x float> %vd
481 %vh = call <8 x float> @llvm.fma.v8f32(<8 x float> %vg, <8 x float> %ve, <8 x float> %vf)
485 define <8 x float> @vfwnmacc_vf_v8f32(<8 x float> %va, <8 x half> %vb, half %c) {
486 ; CHECK-LABEL: vfwnmacc_vf_v8f32:
488 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
489 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v10
491 %head = insertelement <8 x half> poison, half %c, i32 0
492 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
493 %vd = fpext <8 x half> %vb to <8 x float>
494 %ve = fpext <8 x half> %splat to <8 x float>
495 %vf = fneg <8 x float> %va
496 %vg = fneg <8 x float> %vd
497 %vh = call <8 x float> @llvm.fma.v8f32(<8 x float> %vg, <8 x float> %ve, <8 x float> %vf)
501 define <8 x float> @vfwnmacc_fv_v8f32(<8 x float> %va, <8 x half> %vb, half %c) {
502 ; CHECK-LABEL: vfwnmacc_fv_v8f32:
504 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
505 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v10
507 %head = insertelement <8 x half> poison, half %c, i32 0
508 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
509 %vd = fpext <8 x half> %vb to <8 x float>
510 %ve = fpext <8 x half> %splat to <8 x float>
511 %vf = fneg <8 x float> %va
512 %vg = fneg <8 x float> %ve
513 %vh = call <8 x float> @llvm.fma.v8f32(<8 x float> %vd, <8 x float> %vg, <8 x float> %vf)
517 define <8 x float> @vfwmsac_vv_v8f32(<8 x float> %va, <8 x half> %vb, <8 x half> %vc) {
518 ; CHECK-LABEL: vfwmsac_vv_v8f32:
520 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
521 ; CHECK-NEXT: vfwmsac.vv v8, v10, v11
523 %vd = fpext <8 x half> %vb to <8 x float>
524 %ve = fpext <8 x half> %vc to <8 x float>
525 %vf = fneg <8 x float> %va
526 %vg = call <8 x float> @llvm.fma.v8f32(<8 x float> %vd, <8 x float> %ve, <8 x float> %vf)
530 define <8 x float> @vfwmsac_vf_v8f32(<8 x float> %va, <8 x half> %vb, half %c) {
531 ; CHECK-LABEL: vfwmsac_vf_v8f32:
533 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
534 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v10
536 %head = insertelement <8 x half> poison, half %c, i32 0
537 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
538 %vd = fpext <8 x half> %vb to <8 x float>
539 %ve = fpext <8 x half> %splat to <8 x float>
540 %vf = fneg <8 x float> %va
541 %vg = call <8 x float> @llvm.fma.v8f32(<8 x float> %vd, <8 x float> %ve, <8 x float> %vf)
545 define <8 x float> @vfwnmsac_vv_v8f32(<8 x float> %va, <8 x half> %vb, <8 x half> %vc) {
546 ; CHECK-LABEL: vfwnmsac_vv_v8f32:
548 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
549 ; CHECK-NEXT: vfwnmsac.vv v8, v10, v11
551 %vd = fpext <8 x half> %vb to <8 x float>
552 %ve = fpext <8 x half> %vc to <8 x float>
553 %vf = fneg <8 x float> %vd
554 %vg = call <8 x float> @llvm.fma.v8f32(<8 x float> %vf, <8 x float> %ve, <8 x float> %va)
558 define <8 x float> @vfwnmsac_vf_v8f32(<8 x float> %va, <8 x half> %vb, half %c) {
559 ; CHECK-LABEL: vfwnmsac_vf_v8f32:
561 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
562 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v10
564 %head = insertelement <8 x half> poison, half %c, i32 0
565 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
566 %vd = fpext <8 x half> %vb to <8 x float>
567 %ve = fpext <8 x half> %splat to <8 x float>
568 %vf = fneg <8 x float> %vd
569 %vg = call <8 x float> @llvm.fma.v8f32(<8 x float> %vf, <8 x float> %ve, <8 x float> %va)
573 define <8 x float> @vfwnmsac_fv_v8f32(<8 x float> %va, <8 x half> %vb, half %c) {
574 ; CHECK-LABEL: vfwnmsac_fv_v8f32:
576 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
577 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v10
579 %head = insertelement <8 x half> poison, half %c, i32 0
580 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
581 %vd = fpext <8 x half> %vb to <8 x float>
582 %ve = fpext <8 x half> %splat to <8 x float>
583 %vf = fneg <8 x float> %ve
584 %vg = call <8 x float> @llvm.fma.v8f32(<8 x float> %vd, <8 x float> %vf, <8 x float> %va)
588 declare <16 x float> @llvm.fma.v16f32(<16 x float>, <16 x float>, <16 x float>)
590 define <16 x float> @vfwmacc_vv_v16f32(<16 x float> %va, <16 x half> %vb, <16 x half> %vc) {
591 ; CHECK-LABEL: vfwmacc_vv_v16f32:
593 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
594 ; CHECK-NEXT: vfwmacc.vv v8, v12, v14
596 %vd = fpext <16 x half> %vb to <16 x float>
597 %ve = fpext <16 x half> %vc to <16 x float>
598 %vf = call <16 x float> @llvm.fma.v16f32(<16 x float> %vd, <16 x float> %ve, <16 x float> %va)
602 define <16 x float> @vfwmacc_vf_v16f32(<16 x float> %va, <16 x half> %vb, half %c) {
603 ; CHECK-LABEL: vfwmacc_vf_v16f32:
605 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
606 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v12
608 %head = insertelement <16 x half> poison, half %c, i32 0
609 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
610 %vd = fpext <16 x half> %vb to <16 x float>
611 %ve = fpext <16 x half> %splat to <16 x float>
612 %vf = call <16 x float> @llvm.fma.v16f32(<16 x float> %vd, <16 x float> %ve, <16 x float> %va)
616 define <16 x float> @vfwnmacc_vv_v16f32(<16 x float> %va, <16 x half> %vb, <16 x half> %vc) {
617 ; CHECK-LABEL: vfwnmacc_vv_v16f32:
619 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
620 ; CHECK-NEXT: vfwnmacc.vv v8, v12, v14
622 %vd = fpext <16 x half> %vb to <16 x float>
623 %ve = fpext <16 x half> %vc to <16 x float>
624 %vf = fneg <16 x float> %va
625 %vg = fneg <16 x float> %vd
626 %vh = call <16 x float> @llvm.fma.v16f32(<16 x float> %vg, <16 x float> %ve, <16 x float> %vf)
630 define <16 x float> @vfwnmacc_vf_v16f32(<16 x float> %va, <16 x half> %vb, half %c) {
631 ; CHECK-LABEL: vfwnmacc_vf_v16f32:
633 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
634 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v12
636 %head = insertelement <16 x half> poison, half %c, i32 0
637 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
638 %vd = fpext <16 x half> %vb to <16 x float>
639 %ve = fpext <16 x half> %splat to <16 x float>
640 %vf = fneg <16 x float> %va
641 %vg = fneg <16 x float> %vd
642 %vh = call <16 x float> @llvm.fma.v16f32(<16 x float> %vg, <16 x float> %ve, <16 x float> %vf)
646 define <16 x float> @vfwnmacc_fv_v16f32(<16 x float> %va, <16 x half> %vb, half %c) {
647 ; CHECK-LABEL: vfwnmacc_fv_v16f32:
649 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
650 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v12
652 %head = insertelement <16 x half> poison, half %c, i32 0
653 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
654 %vd = fpext <16 x half> %vb to <16 x float>
655 %ve = fpext <16 x half> %splat to <16 x float>
656 %vf = fneg <16 x float> %va
657 %vg = fneg <16 x float> %ve
658 %vh = call <16 x float> @llvm.fma.v16f32(<16 x float> %vd, <16 x float> %vg, <16 x float> %vf)
662 define <16 x float> @vfwmsac_vv_v16f32(<16 x float> %va, <16 x half> %vb, <16 x half> %vc) {
663 ; CHECK-LABEL: vfwmsac_vv_v16f32:
665 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
666 ; CHECK-NEXT: vfwmsac.vv v8, v12, v14
668 %vd = fpext <16 x half> %vb to <16 x float>
669 %ve = fpext <16 x half> %vc to <16 x float>
670 %vf = fneg <16 x float> %va
671 %vg = call <16 x float> @llvm.fma.v16f32(<16 x float> %vd, <16 x float> %ve, <16 x float> %vf)
675 define <16 x float> @vfwmsac_vf_v16f32(<16 x float> %va, <16 x half> %vb, half %c) {
676 ; CHECK-LABEL: vfwmsac_vf_v16f32:
678 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
679 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v12
681 %head = insertelement <16 x half> poison, half %c, i32 0
682 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
683 %vd = fpext <16 x half> %vb to <16 x float>
684 %ve = fpext <16 x half> %splat to <16 x float>
685 %vf = fneg <16 x float> %va
686 %vg = call <16 x float> @llvm.fma.v16f32(<16 x float> %vd, <16 x float> %ve, <16 x float> %vf)
690 define <16 x float> @vfwnmsac_vv_v16f32(<16 x float> %va, <16 x half> %vb, <16 x half> %vc) {
691 ; CHECK-LABEL: vfwnmsac_vv_v16f32:
693 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
694 ; CHECK-NEXT: vfwnmsac.vv v8, v12, v14
696 %vd = fpext <16 x half> %vb to <16 x float>
697 %ve = fpext <16 x half> %vc to <16 x float>
698 %vf = fneg <16 x float> %vd
699 %vg = call <16 x float> @llvm.fma.v16f32(<16 x float> %vf, <16 x float> %ve, <16 x float> %va)
703 define <16 x float> @vfwnmsac_vf_v16f32(<16 x float> %va, <16 x half> %vb, half %c) {
704 ; CHECK-LABEL: vfwnmsac_vf_v16f32:
706 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
707 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v12
709 %head = insertelement <16 x half> poison, half %c, i32 0
710 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
711 %vd = fpext <16 x half> %vb to <16 x float>
712 %ve = fpext <16 x half> %splat to <16 x float>
713 %vf = fneg <16 x float> %vd
714 %vg = call <16 x float> @llvm.fma.v16f32(<16 x float> %vf, <16 x float> %ve, <16 x float> %va)
718 define <16 x float> @vfwnmsac_fv_v16f32(<16 x float> %va, <16 x half> %vb, half %c) {
719 ; CHECK-LABEL: vfwnmsac_fv_v16f32:
721 ; CHECK-NEXT: vsetivli zero, 16, e16, m2, ta, ma
722 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v12
724 %head = insertelement <16 x half> poison, half %c, i32 0
725 %splat = shufflevector <16 x half> %head, <16 x half> poison, <16 x i32> zeroinitializer
726 %vd = fpext <16 x half> %vb to <16 x float>
727 %ve = fpext <16 x half> %splat to <16 x float>
728 %vf = fneg <16 x float> %ve
729 %vg = call <16 x float> @llvm.fma.v16f32(<16 x float> %vd, <16 x float> %vf, <16 x float> %va)
733 declare <1 x double> @llvm.fma.v1f64(<1 x double>, <1 x double>, <1 x double>)
735 define <1 x double> @vfwmacc_vv_v1f64(<1 x double> %va, <1 x float> %vb, <1 x float> %vc) {
736 ; CHECK-LABEL: vfwmacc_vv_v1f64:
738 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
739 ; CHECK-NEXT: vfwmacc.vv v8, v9, v10
741 %vd = fpext <1 x float> %vb to <1 x double>
742 %ve = fpext <1 x float> %vc to <1 x double>
743 %vf = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %va)
747 define <1 x double> @vfwmacc_vf_v1f64(<1 x double> %va, <1 x float> %vb, float %c) {
748 ; CHECK-LABEL: vfwmacc_vf_v1f64:
750 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
751 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v9
753 %head = insertelement <1 x float> poison, float %c, i32 0
754 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
755 %vd = fpext <1 x float> %vb to <1 x double>
756 %ve = fpext <1 x float> %splat to <1 x double>
757 %vf = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %va)
761 define <1 x double> @vfwnmacc_vv_v1f64(<1 x double> %va, <1 x float> %vb, <1 x float> %vc) {
762 ; CHECK-LABEL: vfwnmacc_vv_v1f64:
764 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
765 ; CHECK-NEXT: vfwnmacc.vv v8, v9, v10
767 %vd = fpext <1 x float> %vb to <1 x double>
768 %ve = fpext <1 x float> %vc to <1 x double>
769 %vf = fneg <1 x double> %va
770 %vg = fneg <1 x double> %vd
771 %vh = call <1 x double> @llvm.fma.v1f64(<1 x double> %vg, <1 x double> %ve, <1 x double> %vf)
775 define <1 x double> @vfwnmacc_vf_v1f64(<1 x double> %va, <1 x float> %vb, float %c) {
776 ; CHECK-LABEL: vfwnmacc_vf_v1f64:
778 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
779 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
781 %head = insertelement <1 x float> poison, float %c, i32 0
782 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
783 %vd = fpext <1 x float> %vb to <1 x double>
784 %ve = fpext <1 x float> %splat to <1 x double>
785 %vf = fneg <1 x double> %va
786 %vg = fneg <1 x double> %vd
787 %vh = call <1 x double> @llvm.fma.v1f64(<1 x double> %vg, <1 x double> %ve, <1 x double> %vf)
791 define <1 x double> @vfwnmacc_fv_v1f64(<1 x double> %va, <1 x float> %vb, float %c) {
792 ; CHECK-LABEL: vfwnmacc_fv_v1f64:
794 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
795 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
797 %head = insertelement <1 x float> poison, float %c, i32 0
798 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
799 %vd = fpext <1 x float> %vb to <1 x double>
800 %ve = fpext <1 x float> %splat to <1 x double>
801 %vf = fneg <1 x double> %va
802 %vg = fneg <1 x double> %ve
803 %vh = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %vg, <1 x double> %vf)
807 define <1 x double> @vfwmsac_vv_v1f64(<1 x double> %va, <1 x float> %vb, <1 x float> %vc) {
808 ; CHECK-LABEL: vfwmsac_vv_v1f64:
810 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
811 ; CHECK-NEXT: vfwmsac.vv v8, v9, v10
813 %vd = fpext <1 x float> %vb to <1 x double>
814 %ve = fpext <1 x float> %vc to <1 x double>
815 %vf = fneg <1 x double> %va
816 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %vf)
820 define <1 x double> @vfwmsac_vf_v1f64(<1 x double> %va, <1 x float> %vb, float %c) {
821 ; CHECK-LABEL: vfwmsac_vf_v1f64:
823 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
824 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v9
826 %head = insertelement <1 x float> poison, float %c, i32 0
827 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
828 %vd = fpext <1 x float> %vb to <1 x double>
829 %ve = fpext <1 x float> %splat to <1 x double>
830 %vf = fneg <1 x double> %va
831 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %vf)
835 define <1 x double> @vfwnmsac_vv_v1f64(<1 x double> %va, <1 x float> %vb, <1 x float> %vc) {
836 ; CHECK-LABEL: vfwnmsac_vv_v1f64:
838 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
839 ; CHECK-NEXT: vfwnmsac.vv v8, v9, v10
841 %vd = fpext <1 x float> %vb to <1 x double>
842 %ve = fpext <1 x float> %vc to <1 x double>
843 %vf = fneg <1 x double> %vd
844 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vf, <1 x double> %ve, <1 x double> %va)
848 define <1 x double> @vfwnmsac_vf_v1f64(<1 x double> %va, <1 x float> %vb, float %c) {
849 ; CHECK-LABEL: vfwnmsac_vf_v1f64:
851 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
852 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
854 %head = insertelement <1 x float> poison, float %c, i32 0
855 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
856 %vd = fpext <1 x float> %vb to <1 x double>
857 %ve = fpext <1 x float> %splat to <1 x double>
858 %vf = fneg <1 x double> %vd
859 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vf, <1 x double> %ve, <1 x double> %va)
863 define <1 x double> @vfwnmsac_fv_v1f64(<1 x double> %va, <1 x float> %vb, float %c) {
864 ; CHECK-LABEL: vfwnmsac_fv_v1f64:
866 ; CHECK-NEXT: vsetivli zero, 1, e32, mf2, ta, ma
867 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
869 %head = insertelement <1 x float> poison, float %c, i32 0
870 %splat = shufflevector <1 x float> %head, <1 x float> poison, <1 x i32> zeroinitializer
871 %vd = fpext <1 x float> %vb to <1 x double>
872 %ve = fpext <1 x float> %splat to <1 x double>
873 %vf = fneg <1 x double> %ve
874 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %vf, <1 x double> %va)
878 declare <2 x double> @llvm.fma.v2f64(<2 x double>, <2 x double>, <2 x double>)
880 define <2 x double> @vfwmacc_vv_v2f64(<2 x double> %va, <2 x float> %vb, <2 x float> %vc) {
881 ; CHECK-LABEL: vfwmacc_vv_v2f64:
883 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
884 ; CHECK-NEXT: vfwmacc.vv v8, v9, v10
886 %vd = fpext <2 x float> %vb to <2 x double>
887 %ve = fpext <2 x float> %vc to <2 x double>
888 %vf = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %va)
892 define <2 x double> @vfwmacc_vf_v2f64(<2 x double> %va, <2 x float> %vb, float %c) {
893 ; CHECK-LABEL: vfwmacc_vf_v2f64:
895 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
896 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v9
898 %head = insertelement <2 x float> poison, float %c, i32 0
899 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
900 %vd = fpext <2 x float> %vb to <2 x double>
901 %ve = fpext <2 x float> %splat to <2 x double>
902 %vf = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %va)
906 define <2 x double> @vfwnmacc_vv_v2f64(<2 x double> %va, <2 x float> %vb, <2 x float> %vc) {
907 ; CHECK-LABEL: vfwnmacc_vv_v2f64:
909 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
910 ; CHECK-NEXT: vfwnmacc.vv v8, v9, v10
912 %vd = fpext <2 x float> %vb to <2 x double>
913 %ve = fpext <2 x float> %vc to <2 x double>
914 %vf = fneg <2 x double> %va
915 %vg = fneg <2 x double> %vd
916 %vh = call <2 x double> @llvm.fma.v2f64(<2 x double> %vg, <2 x double> %ve, <2 x double> %vf)
920 define <2 x double> @vfwnmacc_vf_v2f64(<2 x double> %va, <2 x float> %vb, float %c) {
921 ; CHECK-LABEL: vfwnmacc_vf_v2f64:
923 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
924 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
926 %head = insertelement <2 x float> poison, float %c, i32 0
927 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
928 %vd = fpext <2 x float> %vb to <2 x double>
929 %ve = fpext <2 x float> %splat to <2 x double>
930 %vf = fneg <2 x double> %va
931 %vg = fneg <2 x double> %vd
932 %vh = call <2 x double> @llvm.fma.v2f64(<2 x double> %vg, <2 x double> %ve, <2 x double> %vf)
936 define <2 x double> @vfwnmacc_fv_v2f64(<2 x double> %va, <2 x float> %vb, float %c) {
937 ; CHECK-LABEL: vfwnmacc_fv_v2f64:
939 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
940 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v9
942 %head = insertelement <2 x float> poison, float %c, i32 0
943 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
944 %vd = fpext <2 x float> %vb to <2 x double>
945 %ve = fpext <2 x float> %splat to <2 x double>
946 %vf = fneg <2 x double> %va
947 %vg = fneg <2 x double> %ve
948 %vh = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %vg, <2 x double> %vf)
952 define <2 x double> @vfwmsac_vv_v2f64(<2 x double> %va, <2 x float> %vb, <2 x float> %vc) {
953 ; CHECK-LABEL: vfwmsac_vv_v2f64:
955 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
956 ; CHECK-NEXT: vfwmsac.vv v8, v9, v10
958 %vd = fpext <2 x float> %vb to <2 x double>
959 %ve = fpext <2 x float> %vc to <2 x double>
960 %vf = fneg <2 x double> %va
961 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %vf)
965 define <2 x double> @vfwmsac_vf_v2f64(<2 x double> %va, <2 x float> %vb, float %c) {
966 ; CHECK-LABEL: vfwmsac_vf_v2f64:
968 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
969 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v9
971 %head = insertelement <2 x float> poison, float %c, i32 0
972 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
973 %vd = fpext <2 x float> %vb to <2 x double>
974 %ve = fpext <2 x float> %splat to <2 x double>
975 %vf = fneg <2 x double> %va
976 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %vf)
980 define <2 x double> @vfwnmsac_vv_v2f64(<2 x double> %va, <2 x float> %vb, <2 x float> %vc) {
981 ; CHECK-LABEL: vfwnmsac_vv_v2f64:
983 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
984 ; CHECK-NEXT: vfwnmsac.vv v8, v9, v10
986 %vd = fpext <2 x float> %vb to <2 x double>
987 %ve = fpext <2 x float> %vc to <2 x double>
988 %vf = fneg <2 x double> %vd
989 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vf, <2 x double> %ve, <2 x double> %va)
993 define <2 x double> @vfwnmsac_vf_v2f64(<2 x double> %va, <2 x float> %vb, float %c) {
994 ; CHECK-LABEL: vfwnmsac_vf_v2f64:
996 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
997 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
999 %head = insertelement <2 x float> poison, float %c, i32 0
1000 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
1001 %vd = fpext <2 x float> %vb to <2 x double>
1002 %ve = fpext <2 x float> %splat to <2 x double>
1003 %vf = fneg <2 x double> %vd
1004 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vf, <2 x double> %ve, <2 x double> %va)
1005 ret <2 x double> %vg
1008 define <2 x double> @vfwnmsac_fv_v2f64(<2 x double> %va, <2 x float> %vb, float %c) {
1009 ; CHECK-LABEL: vfwnmsac_fv_v2f64:
1011 ; CHECK-NEXT: vsetivli zero, 2, e32, mf2, ta, ma
1012 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v9
1014 %head = insertelement <2 x float> poison, float %c, i32 0
1015 %splat = shufflevector <2 x float> %head, <2 x float> poison, <2 x i32> zeroinitializer
1016 %vd = fpext <2 x float> %vb to <2 x double>
1017 %ve = fpext <2 x float> %splat to <2 x double>
1018 %vf = fneg <2 x double> %ve
1019 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %vf, <2 x double> %va)
1020 ret <2 x double> %vg
1024 declare <4 x double> @llvm.fma.v4f64(<4 x double>, <4 x double>, <4 x double>)
1026 define <4 x double> @vfwmacc_vv_v4f64(<4 x double> %va, <4 x float> %vb, <4 x float> %vc) {
1027 ; CHECK-LABEL: vfwmacc_vv_v4f64:
1029 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1030 ; CHECK-NEXT: vfwmacc.vv v8, v10, v11
1032 %vd = fpext <4 x float> %vb to <4 x double>
1033 %ve = fpext <4 x float> %vc to <4 x double>
1034 %vf = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %va)
1035 ret <4 x double> %vf
1038 define <4 x double> @vfwmacc_vf_v4f64(<4 x double> %va, <4 x float> %vb, float %c) {
1039 ; CHECK-LABEL: vfwmacc_vf_v4f64:
1041 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1042 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v10
1044 %head = insertelement <4 x float> poison, float %c, i32 0
1045 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
1046 %vd = fpext <4 x float> %vb to <4 x double>
1047 %ve = fpext <4 x float> %splat to <4 x double>
1048 %vf = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %va)
1049 ret <4 x double> %vf
1052 define <4 x double> @vfwnmacc_vv_v4f64(<4 x double> %va, <4 x float> %vb, <4 x float> %vc) {
1053 ; CHECK-LABEL: vfwnmacc_vv_v4f64:
1055 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1056 ; CHECK-NEXT: vfwnmacc.vv v8, v10, v11
1058 %vd = fpext <4 x float> %vb to <4 x double>
1059 %ve = fpext <4 x float> %vc to <4 x double>
1060 %vf = fneg <4 x double> %va
1061 %vg = fneg <4 x double> %vd
1062 %vh = call <4 x double> @llvm.fma.v4f64(<4 x double> %vg, <4 x double> %ve, <4 x double> %vf)
1063 ret <4 x double> %vh
1066 define <4 x double> @vfwnmacc_vf_v4f64(<4 x double> %va, <4 x float> %vb, float %c) {
1067 ; CHECK-LABEL: vfwnmacc_vf_v4f64:
1069 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1070 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v10
1072 %head = insertelement <4 x float> poison, float %c, i32 0
1073 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
1074 %vd = fpext <4 x float> %vb to <4 x double>
1075 %ve = fpext <4 x float> %splat to <4 x double>
1076 %vf = fneg <4 x double> %va
1077 %vg = fneg <4 x double> %vd
1078 %vh = call <4 x double> @llvm.fma.v4f64(<4 x double> %vg, <4 x double> %ve, <4 x double> %vf)
1079 ret <4 x double> %vh
1082 define <4 x double> @vfwnmacc_fv_v4f64(<4 x double> %va, <4 x float> %vb, float %c) {
1083 ; CHECK-LABEL: vfwnmacc_fv_v4f64:
1085 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1086 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v10
1088 %head = insertelement <4 x float> poison, float %c, i32 0
1089 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
1090 %vd = fpext <4 x float> %vb to <4 x double>
1091 %ve = fpext <4 x float> %splat to <4 x double>
1092 %vf = fneg <4 x double> %va
1093 %vg = fneg <4 x double> %ve
1094 %vh = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %vg, <4 x double> %vf)
1095 ret <4 x double> %vh
1098 define <4 x double> @vfwmsac_vv_v4f64(<4 x double> %va, <4 x float> %vb, <4 x float> %vc) {
1099 ; CHECK-LABEL: vfwmsac_vv_v4f64:
1101 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1102 ; CHECK-NEXT: vfwmsac.vv v8, v10, v11
1104 %vd = fpext <4 x float> %vb to <4 x double>
1105 %ve = fpext <4 x float> %vc to <4 x double>
1106 %vf = fneg <4 x double> %va
1107 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %vf)
1108 ret <4 x double> %vg
1111 define <4 x double> @vfwmsac_vf_v4f64(<4 x double> %va, <4 x float> %vb, float %c) {
1112 ; CHECK-LABEL: vfwmsac_vf_v4f64:
1114 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1115 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v10
1117 %head = insertelement <4 x float> poison, float %c, i32 0
1118 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
1119 %vd = fpext <4 x float> %vb to <4 x double>
1120 %ve = fpext <4 x float> %splat to <4 x double>
1121 %vf = fneg <4 x double> %va
1122 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %vf)
1123 ret <4 x double> %vg
1126 define <4 x double> @vfwnmsac_vv_v4f64(<4 x double> %va, <4 x float> %vb, <4 x float> %vc) {
1127 ; CHECK-LABEL: vfwnmsac_vv_v4f64:
1129 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1130 ; CHECK-NEXT: vfwnmsac.vv v8, v10, v11
1132 %vd = fpext <4 x float> %vb to <4 x double>
1133 %ve = fpext <4 x float> %vc to <4 x double>
1134 %vf = fneg <4 x double> %vd
1135 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vf, <4 x double> %ve, <4 x double> %va)
1136 ret <4 x double> %vg
1139 define <4 x double> @vfwnmsac_vf_v4f64(<4 x double> %va, <4 x float> %vb, float %c) {
1140 ; CHECK-LABEL: vfwnmsac_vf_v4f64:
1142 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1143 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v10
1145 %head = insertelement <4 x float> poison, float %c, i32 0
1146 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
1147 %vd = fpext <4 x float> %vb to <4 x double>
1148 %ve = fpext <4 x float> %splat to <4 x double>
1149 %vf = fneg <4 x double> %vd
1150 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vf, <4 x double> %ve, <4 x double> %va)
1151 ret <4 x double> %vg
1154 define <4 x double> @vfwnmsac_fv_v4f64(<4 x double> %va, <4 x float> %vb, float %c) {
1155 ; CHECK-LABEL: vfwnmsac_fv_v4f64:
1157 ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1158 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v10
1160 %head = insertelement <4 x float> poison, float %c, i32 0
1161 %splat = shufflevector <4 x float> %head, <4 x float> poison, <4 x i32> zeroinitializer
1162 %vd = fpext <4 x float> %vb to <4 x double>
1163 %ve = fpext <4 x float> %splat to <4 x double>
1164 %vf = fneg <4 x double> %ve
1165 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %vf, <4 x double> %va)
1166 ret <4 x double> %vg
1169 declare <8 x double> @llvm.fma.v8f64(<8 x double>, <8 x double>, <8 x double>)
1171 define <8 x double> @vfwmacc_vv_v8f64(<8 x double> %va, <8 x float> %vb, <8 x float> %vc) {
1172 ; CHECK-LABEL: vfwmacc_vv_v8f64:
1174 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1175 ; CHECK-NEXT: vfwmacc.vv v8, v12, v14
1177 %vd = fpext <8 x float> %vb to <8 x double>
1178 %ve = fpext <8 x float> %vc to <8 x double>
1179 %vf = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %va)
1180 ret <8 x double> %vf
1183 define <8 x double> @vfwmacc_vf_v8f64(<8 x double> %va, <8 x float> %vb, float %c) {
1184 ; CHECK-LABEL: vfwmacc_vf_v8f64:
1186 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1187 ; CHECK-NEXT: vfwmacc.vf v8, fa0, v12
1189 %head = insertelement <8 x float> poison, float %c, i32 0
1190 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
1191 %vd = fpext <8 x float> %vb to <8 x double>
1192 %ve = fpext <8 x float> %splat to <8 x double>
1193 %vf = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %va)
1194 ret <8 x double> %vf
1197 define <8 x double> @vfwnmacc_vv_v8f64(<8 x double> %va, <8 x float> %vb, <8 x float> %vc) {
1198 ; CHECK-LABEL: vfwnmacc_vv_v8f64:
1200 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1201 ; CHECK-NEXT: vfwnmacc.vv v8, v12, v14
1203 %vd = fpext <8 x float> %vb to <8 x double>
1204 %ve = fpext <8 x float> %vc to <8 x double>
1205 %vf = fneg <8 x double> %va
1206 %vg = fneg <8 x double> %vd
1207 %vh = call <8 x double> @llvm.fma.v8f64(<8 x double> %vg, <8 x double> %ve, <8 x double> %vf)
1208 ret <8 x double> %vh
1211 define <8 x double> @vfwnmacc_vf_v8f64(<8 x double> %va, <8 x float> %vb, float %c) {
1212 ; CHECK-LABEL: vfwnmacc_vf_v8f64:
1214 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1215 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v12
1217 %head = insertelement <8 x float> poison, float %c, i32 0
1218 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
1219 %vd = fpext <8 x float> %vb to <8 x double>
1220 %ve = fpext <8 x float> %splat to <8 x double>
1221 %vf = fneg <8 x double> %va
1222 %vg = fneg <8 x double> %vd
1223 %vh = call <8 x double> @llvm.fma.v8f64(<8 x double> %vg, <8 x double> %ve, <8 x double> %vf)
1224 ret <8 x double> %vh
1227 define <8 x double> @vfwnmacc_fv_v8f64(<8 x double> %va, <8 x float> %vb, float %c) {
1228 ; CHECK-LABEL: vfwnmacc_fv_v8f64:
1230 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1231 ; CHECK-NEXT: vfwnmacc.vf v8, fa0, v12
1233 %head = insertelement <8 x float> poison, float %c, i32 0
1234 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
1235 %vd = fpext <8 x float> %vb to <8 x double>
1236 %ve = fpext <8 x float> %splat to <8 x double>
1237 %vf = fneg <8 x double> %va
1238 %vg = fneg <8 x double> %ve
1239 %vh = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %vg, <8 x double> %vf)
1240 ret <8 x double> %vh
1243 define <8 x double> @vfwmsac_vv_v8f64(<8 x double> %va, <8 x float> %vb, <8 x float> %vc) {
1244 ; CHECK-LABEL: vfwmsac_vv_v8f64:
1246 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1247 ; CHECK-NEXT: vfwmsac.vv v8, v12, v14
1249 %vd = fpext <8 x float> %vb to <8 x double>
1250 %ve = fpext <8 x float> %vc to <8 x double>
1251 %vf = fneg <8 x double> %va
1252 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %vf)
1253 ret <8 x double> %vg
1256 define <8 x double> @vfwmsac_vf_v8f64(<8 x double> %va, <8 x float> %vb, float %c) {
1257 ; CHECK-LABEL: vfwmsac_vf_v8f64:
1259 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1260 ; CHECK-NEXT: vfwmsac.vf v8, fa0, v12
1262 %head = insertelement <8 x float> poison, float %c, i32 0
1263 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
1264 %vd = fpext <8 x float> %vb to <8 x double>
1265 %ve = fpext <8 x float> %splat to <8 x double>
1266 %vf = fneg <8 x double> %va
1267 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %vf)
1268 ret <8 x double> %vg
1271 define <8 x double> @vfwnmsac_vv_v8f64(<8 x double> %va, <8 x float> %vb, <8 x float> %vc) {
1272 ; CHECK-LABEL: vfwnmsac_vv_v8f64:
1274 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1275 ; CHECK-NEXT: vfwnmsac.vv v8, v12, v14
1277 %vd = fpext <8 x float> %vb to <8 x double>
1278 %ve = fpext <8 x float> %vc to <8 x double>
1279 %vf = fneg <8 x double> %vd
1280 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vf, <8 x double> %ve, <8 x double> %va)
1281 ret <8 x double> %vg
1284 define <8 x double> @vfwnmsac_vf_v8f64(<8 x double> %va, <8 x float> %vb, float %c) {
1285 ; CHECK-LABEL: vfwnmsac_vf_v8f64:
1287 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1288 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v12
1290 %head = insertelement <8 x float> poison, float %c, i32 0
1291 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
1292 %vd = fpext <8 x float> %vb to <8 x double>
1293 %ve = fpext <8 x float> %splat to <8 x double>
1294 %vf = fneg <8 x double> %vd
1295 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vf, <8 x double> %ve, <8 x double> %va)
1296 ret <8 x double> %vg
1299 define <8 x double> @vfwnmsac_fv_v8f64(<8 x double> %va, <8 x float> %vb, float %c) {
1300 ; CHECK-LABEL: vfwnmsac_fv_v8f64:
1302 ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1303 ; CHECK-NEXT: vfwnmsac.vf v8, fa0, v12
1305 %head = insertelement <8 x float> poison, float %c, i32 0
1306 %splat = shufflevector <8 x float> %head, <8 x float> poison, <8 x i32> zeroinitializer
1307 %vd = fpext <8 x float> %vb to <8 x double>
1308 %ve = fpext <8 x float> %splat to <8 x double>
1309 %vf = fneg <8 x double> %ve
1310 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %vf, <8 x double> %va)
1311 ret <8 x double> %vg
1314 define <1 x double> @vfwmacc_vv_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, <1 x half> %vc) {
1315 ; CHECK-LABEL: vfwmacc_vv_v1f64_v1f16:
1317 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1318 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1319 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1320 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1321 ; CHECK-NEXT: vfwmacc.vv v8, v11, v9
1323 %vd = fpext <1 x half> %vb to <1 x double>
1324 %ve = fpext <1 x half> %vc to <1 x double>
1325 %vf = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %va)
1326 ret <1 x double> %vf
1329 define <1 x double> @vfwmacc_vf_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, half %c) {
1330 ; CHECK-LABEL: vfwmacc_vf_v1f64_v1f16:
1332 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1333 ; CHECK-NEXT: vfmv.s.f v10, fa0
1334 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1335 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1336 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1337 ; CHECK-NEXT: vfwmacc.vv v8, v11, v9
1339 %head = insertelement <1 x half> poison, half %c, i32 0
1340 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
1341 %vd = fpext <1 x half> %vb to <1 x double>
1342 %ve = fpext <1 x half> %splat to <1 x double>
1343 %vf = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %va)
1344 ret <1 x double> %vf
1347 define <1 x double> @vfwnmacc_vv_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, <1 x half> %vc) {
1348 ; CHECK-LABEL: vfwnmacc_vv_v1f64_v1f16:
1350 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1351 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1352 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1353 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1354 ; CHECK-NEXT: vfwnmacc.vv v8, v11, v9
1356 %vd = fpext <1 x half> %vb to <1 x double>
1357 %ve = fpext <1 x half> %vc to <1 x double>
1358 %vf = fneg <1 x double> %va
1359 %vg = fneg <1 x double> %vd
1360 %vh = call <1 x double> @llvm.fma.v1f64(<1 x double> %vg, <1 x double> %ve, <1 x double> %vf)
1361 ret <1 x double> %vh
1364 define <1 x double> @vfwnmacc_vf_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, half %c) {
1365 ; CHECK-LABEL: vfwnmacc_vf_v1f64_v1f16:
1367 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1368 ; CHECK-NEXT: vfmv.s.f v10, fa0
1369 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1370 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1371 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1372 ; CHECK-NEXT: vfwnmacc.vv v8, v11, v9
1374 %head = insertelement <1 x half> poison, half %c, i32 0
1375 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
1376 %vd = fpext <1 x half> %vb to <1 x double>
1377 %ve = fpext <1 x half> %splat to <1 x double>
1378 %vf = fneg <1 x double> %va
1379 %vg = fneg <1 x double> %vd
1380 %vh = call <1 x double> @llvm.fma.v1f64(<1 x double> %vg, <1 x double> %ve, <1 x double> %vf)
1381 ret <1 x double> %vh
1384 define <1 x double> @vfwnmacc_fv_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, half %c) {
1385 ; CHECK-LABEL: vfwnmacc_fv_v1f64_v1f16:
1387 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1388 ; CHECK-NEXT: vfmv.s.f v10, fa0
1389 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1390 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1391 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1392 ; CHECK-NEXT: vfwnmacc.vv v8, v11, v9
1394 %head = insertelement <1 x half> poison, half %c, i32 0
1395 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
1396 %vd = fpext <1 x half> %vb to <1 x double>
1397 %ve = fpext <1 x half> %splat to <1 x double>
1398 %vf = fneg <1 x double> %va
1399 %vg = fneg <1 x double> %ve
1400 %vh = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %vg, <1 x double> %vf)
1401 ret <1 x double> %vh
1404 define <1 x double> @vfwmsac_vv_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, <1 x half> %vc) {
1405 ; CHECK-LABEL: vfwmsac_vv_v1f64_v1f16:
1407 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1408 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1409 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1410 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1411 ; CHECK-NEXT: vfwmsac.vv v8, v11, v9
1413 %vd = fpext <1 x half> %vb to <1 x double>
1414 %ve = fpext <1 x half> %vc to <1 x double>
1415 %vf = fneg <1 x double> %va
1416 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %vf)
1417 ret <1 x double> %vg
1420 define <1 x double> @vfwmsac_vf_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, half %c) {
1421 ; CHECK-LABEL: vfwmsac_vf_v1f64_v1f16:
1423 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1424 ; CHECK-NEXT: vfmv.s.f v10, fa0
1425 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1426 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1427 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1428 ; CHECK-NEXT: vfwmsac.vv v8, v11, v9
1430 %head = insertelement <1 x half> poison, half %c, i32 0
1431 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
1432 %vd = fpext <1 x half> %vb to <1 x double>
1433 %ve = fpext <1 x half> %splat to <1 x double>
1434 %vf = fneg <1 x double> %va
1435 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %ve, <1 x double> %vf)
1436 ret <1 x double> %vg
1439 define <1 x double> @vfwnmsac_vv_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, <1 x half> %vc) {
1440 ; CHECK-LABEL: vfwnmsac_vv_v1f64_v1f16:
1442 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1443 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1444 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1445 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1446 ; CHECK-NEXT: vfwnmsac.vv v8, v11, v9
1448 %vd = fpext <1 x half> %vb to <1 x double>
1449 %ve = fpext <1 x half> %vc to <1 x double>
1450 %vf = fneg <1 x double> %vd
1451 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vf, <1 x double> %ve, <1 x double> %va)
1452 ret <1 x double> %vg
1455 define <1 x double> @vfwnmsac_vf_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, half %c) {
1456 ; CHECK-LABEL: vfwnmsac_vf_v1f64_v1f16:
1458 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1459 ; CHECK-NEXT: vfmv.s.f v10, fa0
1460 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1461 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1462 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1463 ; CHECK-NEXT: vfwnmsac.vv v8, v11, v9
1465 %head = insertelement <1 x half> poison, half %c, i32 0
1466 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
1467 %vd = fpext <1 x half> %vb to <1 x double>
1468 %ve = fpext <1 x half> %splat to <1 x double>
1469 %vf = fneg <1 x double> %vd
1470 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vf, <1 x double> %ve, <1 x double> %va)
1471 ret <1 x double> %vg
1474 define <1 x double> @vfwnmsac_fv_v1f64_v1f16(<1 x double> %va, <1 x half> %vb, half %c) {
1475 ; CHECK-LABEL: vfwnmsac_fv_v1f64_v1f16:
1477 ; CHECK-NEXT: vsetivli zero, 1, e16, mf4, ta, ma
1478 ; CHECK-NEXT: vfmv.s.f v10, fa0
1479 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1480 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1481 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1482 ; CHECK-NEXT: vfwnmsac.vv v8, v11, v9
1484 %head = insertelement <1 x half> poison, half %c, i32 0
1485 %splat = shufflevector <1 x half> %head, <1 x half> poison, <1 x i32> zeroinitializer
1486 %vd = fpext <1 x half> %vb to <1 x double>
1487 %ve = fpext <1 x half> %splat to <1 x double>
1488 %vf = fneg <1 x double> %ve
1489 %vg = call <1 x double> @llvm.fma.v1f64(<1 x double> %vd, <1 x double> %vf, <1 x double> %va)
1490 ret <1 x double> %vg
1493 define <2 x double> @vfwmacc_vv_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, <2 x half> %vc) {
1494 ; CHECK-LABEL: vfwmacc_vv_v2f64_v2f16:
1496 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1497 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1498 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1499 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1500 ; CHECK-NEXT: vfwmacc.vv v8, v11, v9
1502 %vd = fpext <2 x half> %vb to <2 x double>
1503 %ve = fpext <2 x half> %vc to <2 x double>
1504 %vf = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %va)
1505 ret <2 x double> %vf
1508 define <2 x double> @vfwmacc_vf_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, half %c) {
1509 ; CHECK-LABEL: vfwmacc_vf_v2f64_v2f16:
1511 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1512 ; CHECK-NEXT: vfmv.v.f v10, fa0
1513 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1514 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1515 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1516 ; CHECK-NEXT: vfwmacc.vv v8, v11, v9
1518 %head = insertelement <2 x half> poison, half %c, i32 0
1519 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
1520 %vd = fpext <2 x half> %vb to <2 x double>
1521 %ve = fpext <2 x half> %splat to <2 x double>
1522 %vf = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %va)
1523 ret <2 x double> %vf
1526 define <2 x double> @vfwnmacc_vv_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, <2 x half> %vc) {
1527 ; CHECK-LABEL: vfwnmacc_vv_v2f64_v2f16:
1529 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1530 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1531 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1532 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1533 ; CHECK-NEXT: vfwnmacc.vv v8, v11, v9
1535 %vd = fpext <2 x half> %vb to <2 x double>
1536 %ve = fpext <2 x half> %vc to <2 x double>
1537 %vf = fneg <2 x double> %va
1538 %vg = fneg <2 x double> %vd
1539 %vh = call <2 x double> @llvm.fma.v2f64(<2 x double> %vg, <2 x double> %ve, <2 x double> %vf)
1540 ret <2 x double> %vh
1543 define <2 x double> @vfwnmacc_vf_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, half %c) {
1544 ; CHECK-LABEL: vfwnmacc_vf_v2f64_v2f16:
1546 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1547 ; CHECK-NEXT: vfmv.v.f v10, fa0
1548 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1549 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1550 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1551 ; CHECK-NEXT: vfwnmacc.vv v8, v11, v9
1553 %head = insertelement <2 x half> poison, half %c, i32 0
1554 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
1555 %vd = fpext <2 x half> %vb to <2 x double>
1556 %ve = fpext <2 x half> %splat to <2 x double>
1557 %vf = fneg <2 x double> %va
1558 %vg = fneg <2 x double> %vd
1559 %vh = call <2 x double> @llvm.fma.v2f64(<2 x double> %vg, <2 x double> %ve, <2 x double> %vf)
1560 ret <2 x double> %vh
1563 define <2 x double> @vfwnmacc_fv_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, half %c) {
1564 ; CHECK-LABEL: vfwnmacc_fv_v2f64_v2f16:
1566 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1567 ; CHECK-NEXT: vfmv.v.f v10, fa0
1568 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1569 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1570 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1571 ; CHECK-NEXT: vfwnmacc.vv v8, v11, v9
1573 %head = insertelement <2 x half> poison, half %c, i32 0
1574 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
1575 %vd = fpext <2 x half> %vb to <2 x double>
1576 %ve = fpext <2 x half> %splat to <2 x double>
1577 %vf = fneg <2 x double> %va
1578 %vg = fneg <2 x double> %ve
1579 %vh = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %vg, <2 x double> %vf)
1580 ret <2 x double> %vh
1583 define <2 x double> @vfwmsac_vv_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, <2 x half> %vc) {
1584 ; CHECK-LABEL: vfwmsac_vv_v2f64_v2f16:
1586 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1587 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1588 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1589 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1590 ; CHECK-NEXT: vfwmsac.vv v8, v11, v9
1592 %vd = fpext <2 x half> %vb to <2 x double>
1593 %ve = fpext <2 x half> %vc to <2 x double>
1594 %vf = fneg <2 x double> %va
1595 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %vf)
1596 ret <2 x double> %vg
1599 define <2 x double> @vfwmsac_vf_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, half %c) {
1600 ; CHECK-LABEL: vfwmsac_vf_v2f64_v2f16:
1602 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1603 ; CHECK-NEXT: vfmv.v.f v10, fa0
1604 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1605 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1606 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1607 ; CHECK-NEXT: vfwmsac.vv v8, v11, v9
1609 %head = insertelement <2 x half> poison, half %c, i32 0
1610 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
1611 %vd = fpext <2 x half> %vb to <2 x double>
1612 %ve = fpext <2 x half> %splat to <2 x double>
1613 %vf = fneg <2 x double> %va
1614 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %ve, <2 x double> %vf)
1615 ret <2 x double> %vg
1618 define <2 x double> @vfwnmsac_vv_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, <2 x half> %vc) {
1619 ; CHECK-LABEL: vfwnmsac_vv_v2f64_v2f16:
1621 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1622 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1623 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1624 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1625 ; CHECK-NEXT: vfwnmsac.vv v8, v11, v9
1627 %vd = fpext <2 x half> %vb to <2 x double>
1628 %ve = fpext <2 x half> %vc to <2 x double>
1629 %vf = fneg <2 x double> %vd
1630 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vf, <2 x double> %ve, <2 x double> %va)
1631 ret <2 x double> %vg
1634 define <2 x double> @vfwnmsac_vf_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, half %c) {
1635 ; CHECK-LABEL: vfwnmsac_vf_v2f64_v2f16:
1637 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1638 ; CHECK-NEXT: vfmv.v.f v10, fa0
1639 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1640 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1641 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1642 ; CHECK-NEXT: vfwnmsac.vv v8, v11, v9
1644 %head = insertelement <2 x half> poison, half %c, i32 0
1645 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
1646 %vd = fpext <2 x half> %vb to <2 x double>
1647 %ve = fpext <2 x half> %splat to <2 x double>
1648 %vf = fneg <2 x double> %vd
1649 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vf, <2 x double> %ve, <2 x double> %va)
1650 ret <2 x double> %vg
1653 define <2 x double> @vfwnmsac_fv_v2f64_v2f16(<2 x double> %va, <2 x half> %vb, half %c) {
1654 ; CHECK-LABEL: vfwnmsac_fv_v2f64_v2f16:
1656 ; CHECK-NEXT: vsetivli zero, 2, e16, mf4, ta, ma
1657 ; CHECK-NEXT: vfmv.v.f v10, fa0
1658 ; CHECK-NEXT: vfwcvt.f.f.v v11, v9
1659 ; CHECK-NEXT: vfwcvt.f.f.v v9, v10
1660 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1661 ; CHECK-NEXT: vfwnmsac.vv v8, v11, v9
1663 %head = insertelement <2 x half> poison, half %c, i32 0
1664 %splat = shufflevector <2 x half> %head, <2 x half> poison, <2 x i32> zeroinitializer
1665 %vd = fpext <2 x half> %vb to <2 x double>
1666 %ve = fpext <2 x half> %splat to <2 x double>
1667 %vf = fneg <2 x double> %ve
1668 %vg = call <2 x double> @llvm.fma.v2f64(<2 x double> %vd, <2 x double> %vf, <2 x double> %va)
1669 ret <2 x double> %vg
1673 define <4 x double> @vfwmacc_vv_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, <4 x half> %vc) {
1674 ; CHECK-LABEL: vfwmacc_vv_v4f64_v4f16:
1676 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1677 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1678 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1679 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1680 ; CHECK-NEXT: vfwmacc.vv v8, v12, v10
1682 %vd = fpext <4 x half> %vb to <4 x double>
1683 %ve = fpext <4 x half> %vc to <4 x double>
1684 %vf = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %va)
1685 ret <4 x double> %vf
1688 define <4 x double> @vfwmacc_vf_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, half %c) {
1689 ; CHECK-LABEL: vfwmacc_vf_v4f64_v4f16:
1691 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1692 ; CHECK-NEXT: vfmv.v.f v11, fa0
1693 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1694 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1695 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1696 ; CHECK-NEXT: vfwmacc.vv v8, v12, v10
1698 %head = insertelement <4 x half> poison, half %c, i32 0
1699 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
1700 %vd = fpext <4 x half> %vb to <4 x double>
1701 %ve = fpext <4 x half> %splat to <4 x double>
1702 %vf = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %va)
1703 ret <4 x double> %vf
1706 define <4 x double> @vfwnmacc_vv_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, <4 x half> %vc) {
1707 ; CHECK-LABEL: vfwnmacc_vv_v4f64_v4f16:
1709 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1710 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1711 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1712 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1713 ; CHECK-NEXT: vfwnmacc.vv v8, v12, v10
1715 %vd = fpext <4 x half> %vb to <4 x double>
1716 %ve = fpext <4 x half> %vc to <4 x double>
1717 %vf = fneg <4 x double> %va
1718 %vg = fneg <4 x double> %vd
1719 %vh = call <4 x double> @llvm.fma.v4f64(<4 x double> %vg, <4 x double> %ve, <4 x double> %vf)
1720 ret <4 x double> %vh
1723 define <4 x double> @vfwnmacc_vf_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, half %c) {
1724 ; CHECK-LABEL: vfwnmacc_vf_v4f64_v4f16:
1726 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1727 ; CHECK-NEXT: vfmv.v.f v11, fa0
1728 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1729 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1730 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1731 ; CHECK-NEXT: vfwnmacc.vv v8, v12, v10
1733 %head = insertelement <4 x half> poison, half %c, i32 0
1734 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
1735 %vd = fpext <4 x half> %vb to <4 x double>
1736 %ve = fpext <4 x half> %splat to <4 x double>
1737 %vf = fneg <4 x double> %va
1738 %vg = fneg <4 x double> %vd
1739 %vh = call <4 x double> @llvm.fma.v4f64(<4 x double> %vg, <4 x double> %ve, <4 x double> %vf)
1740 ret <4 x double> %vh
1743 define <4 x double> @vfwnmacc_fv_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, half %c) {
1744 ; CHECK-LABEL: vfwnmacc_fv_v4f64_v4f16:
1746 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1747 ; CHECK-NEXT: vfmv.v.f v11, fa0
1748 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1749 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1750 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1751 ; CHECK-NEXT: vfwnmacc.vv v8, v12, v10
1753 %head = insertelement <4 x half> poison, half %c, i32 0
1754 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
1755 %vd = fpext <4 x half> %vb to <4 x double>
1756 %ve = fpext <4 x half> %splat to <4 x double>
1757 %vf = fneg <4 x double> %va
1758 %vg = fneg <4 x double> %ve
1759 %vh = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %vg, <4 x double> %vf)
1760 ret <4 x double> %vh
1763 define <4 x double> @vfwmsac_vv_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, <4 x half> %vc) {
1764 ; CHECK-LABEL: vfwmsac_vv_v4f64_v4f16:
1766 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1767 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1768 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1769 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1770 ; CHECK-NEXT: vfwmsac.vv v8, v12, v10
1772 %vd = fpext <4 x half> %vb to <4 x double>
1773 %ve = fpext <4 x half> %vc to <4 x double>
1774 %vf = fneg <4 x double> %va
1775 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %vf)
1776 ret <4 x double> %vg
1779 define <4 x double> @vfwmsac_vf_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, half %c) {
1780 ; CHECK-LABEL: vfwmsac_vf_v4f64_v4f16:
1782 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1783 ; CHECK-NEXT: vfmv.v.f v11, fa0
1784 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1785 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1786 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1787 ; CHECK-NEXT: vfwmsac.vv v8, v12, v10
1789 %head = insertelement <4 x half> poison, half %c, i32 0
1790 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
1791 %vd = fpext <4 x half> %vb to <4 x double>
1792 %ve = fpext <4 x half> %splat to <4 x double>
1793 %vf = fneg <4 x double> %va
1794 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %ve, <4 x double> %vf)
1795 ret <4 x double> %vg
1798 define <4 x double> @vfwnmsac_vv_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, <4 x half> %vc) {
1799 ; CHECK-LABEL: vfwnmsac_vv_v4f64_v4f16:
1801 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1802 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1803 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1804 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1805 ; CHECK-NEXT: vfwnmsac.vv v8, v12, v10
1807 %vd = fpext <4 x half> %vb to <4 x double>
1808 %ve = fpext <4 x half> %vc to <4 x double>
1809 %vf = fneg <4 x double> %vd
1810 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vf, <4 x double> %ve, <4 x double> %va)
1811 ret <4 x double> %vg
1814 define <4 x double> @vfwnmsac_vf_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, half %c) {
1815 ; CHECK-LABEL: vfwnmsac_vf_v4f64_v4f16:
1817 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1818 ; CHECK-NEXT: vfmv.v.f v11, fa0
1819 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1820 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1821 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1822 ; CHECK-NEXT: vfwnmsac.vv v8, v12, v10
1824 %head = insertelement <4 x half> poison, half %c, i32 0
1825 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
1826 %vd = fpext <4 x half> %vb to <4 x double>
1827 %ve = fpext <4 x half> %splat to <4 x double>
1828 %vf = fneg <4 x double> %vd
1829 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vf, <4 x double> %ve, <4 x double> %va)
1830 ret <4 x double> %vg
1833 define <4 x double> @vfwnmsac_fv_v4f64_v4f16(<4 x double> %va, <4 x half> %vb, half %c) {
1834 ; CHECK-LABEL: vfwnmsac_fv_v4f64_v4f16:
1836 ; CHECK-NEXT: vsetivli zero, 4, e16, mf2, ta, ma
1837 ; CHECK-NEXT: vfmv.v.f v11, fa0
1838 ; CHECK-NEXT: vfwcvt.f.f.v v12, v10
1839 ; CHECK-NEXT: vfwcvt.f.f.v v10, v11
1840 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1841 ; CHECK-NEXT: vfwnmsac.vv v8, v12, v10
1843 %head = insertelement <4 x half> poison, half %c, i32 0
1844 %splat = shufflevector <4 x half> %head, <4 x half> poison, <4 x i32> zeroinitializer
1845 %vd = fpext <4 x half> %vb to <4 x double>
1846 %ve = fpext <4 x half> %splat to <4 x double>
1847 %vf = fneg <4 x double> %ve
1848 %vg = call <4 x double> @llvm.fma.v4f64(<4 x double> %vd, <4 x double> %vf, <4 x double> %va)
1849 ret <4 x double> %vg
1852 define <8 x double> @vfwmacc_vv_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, <8 x half> %vc) {
1853 ; CHECK-LABEL: vfwmacc_vv_v8f64_v8f16:
1855 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1856 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1857 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1858 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1859 ; CHECK-NEXT: vfwmacc.vv v8, v14, v16
1861 %vd = fpext <8 x half> %vb to <8 x double>
1862 %ve = fpext <8 x half> %vc to <8 x double>
1863 %vf = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %va)
1864 ret <8 x double> %vf
1867 define <8 x double> @vfwmacc_vf_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, half %c) {
1868 ; CHECK-LABEL: vfwmacc_vf_v8f64_v8f16:
1870 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1871 ; CHECK-NEXT: vfmv.v.f v13, fa0
1872 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1873 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1874 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1875 ; CHECK-NEXT: vfwmacc.vv v8, v14, v16
1877 %head = insertelement <8 x half> poison, half %c, i32 0
1878 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
1879 %vd = fpext <8 x half> %vb to <8 x double>
1880 %ve = fpext <8 x half> %splat to <8 x double>
1881 %vf = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %va)
1882 ret <8 x double> %vf
1885 define <8 x double> @vfwnmacc_vv_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, <8 x half> %vc) {
1886 ; CHECK-LABEL: vfwnmacc_vv_v8f64_v8f16:
1888 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1889 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1890 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1891 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1892 ; CHECK-NEXT: vfwnmacc.vv v8, v14, v16
1894 %vd = fpext <8 x half> %vb to <8 x double>
1895 %ve = fpext <8 x half> %vc to <8 x double>
1896 %vf = fneg <8 x double> %va
1897 %vg = fneg <8 x double> %vd
1898 %vh = call <8 x double> @llvm.fma.v8f64(<8 x double> %vg, <8 x double> %ve, <8 x double> %vf)
1899 ret <8 x double> %vh
1902 define <8 x double> @vfwnmacc_vf_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, half %c) {
1903 ; CHECK-LABEL: vfwnmacc_vf_v8f64_v8f16:
1905 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1906 ; CHECK-NEXT: vfmv.v.f v13, fa0
1907 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1908 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1909 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1910 ; CHECK-NEXT: vfwnmacc.vv v8, v14, v16
1912 %head = insertelement <8 x half> poison, half %c, i32 0
1913 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
1914 %vd = fpext <8 x half> %vb to <8 x double>
1915 %ve = fpext <8 x half> %splat to <8 x double>
1916 %vf = fneg <8 x double> %va
1917 %vg = fneg <8 x double> %vd
1918 %vh = call <8 x double> @llvm.fma.v8f64(<8 x double> %vg, <8 x double> %ve, <8 x double> %vf)
1919 ret <8 x double> %vh
1922 define <8 x double> @vfwnmacc_fv_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, half %c) {
1923 ; CHECK-LABEL: vfwnmacc_fv_v8f64_v8f16:
1925 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1926 ; CHECK-NEXT: vfmv.v.f v13, fa0
1927 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1928 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1929 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1930 ; CHECK-NEXT: vfwnmacc.vv v8, v14, v16
1932 %head = insertelement <8 x half> poison, half %c, i32 0
1933 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
1934 %vd = fpext <8 x half> %vb to <8 x double>
1935 %ve = fpext <8 x half> %splat to <8 x double>
1936 %vf = fneg <8 x double> %va
1937 %vg = fneg <8 x double> %ve
1938 %vh = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %vg, <8 x double> %vf)
1939 ret <8 x double> %vh
1942 define <8 x double> @vfwmsac_vv_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, <8 x half> %vc) {
1943 ; CHECK-LABEL: vfwmsac_vv_v8f64_v8f16:
1945 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1946 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1947 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1948 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1949 ; CHECK-NEXT: vfwmsac.vv v8, v14, v16
1951 %vd = fpext <8 x half> %vb to <8 x double>
1952 %ve = fpext <8 x half> %vc to <8 x double>
1953 %vf = fneg <8 x double> %va
1954 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %vf)
1955 ret <8 x double> %vg
1958 define <8 x double> @vfwmsac_vf_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, half %c) {
1959 ; CHECK-LABEL: vfwmsac_vf_v8f64_v8f16:
1961 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1962 ; CHECK-NEXT: vfmv.v.f v13, fa0
1963 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1964 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1965 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1966 ; CHECK-NEXT: vfwmsac.vv v8, v14, v16
1968 %head = insertelement <8 x half> poison, half %c, i32 0
1969 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
1970 %vd = fpext <8 x half> %vb to <8 x double>
1971 %ve = fpext <8 x half> %splat to <8 x double>
1972 %vf = fneg <8 x double> %va
1973 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %ve, <8 x double> %vf)
1974 ret <8 x double> %vg
1977 define <8 x double> @vfwnmsac_vv_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, <8 x half> %vc) {
1978 ; CHECK-LABEL: vfwnmsac_vv_v8f64_v8f16:
1980 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1981 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1982 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
1983 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1984 ; CHECK-NEXT: vfwnmsac.vv v8, v14, v16
1986 %vd = fpext <8 x half> %vb to <8 x double>
1987 %ve = fpext <8 x half> %vc to <8 x double>
1988 %vf = fneg <8 x double> %vd
1989 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vf, <8 x double> %ve, <8 x double> %va)
1990 ret <8 x double> %vg
1993 define <8 x double> @vfwnmsac_vf_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, half %c) {
1994 ; CHECK-LABEL: vfwnmsac_vf_v8f64_v8f16:
1996 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
1997 ; CHECK-NEXT: vfmv.v.f v13, fa0
1998 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
1999 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
2000 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
2001 ; CHECK-NEXT: vfwnmsac.vv v8, v14, v16
2003 %head = insertelement <8 x half> poison, half %c, i32 0
2004 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
2005 %vd = fpext <8 x half> %vb to <8 x double>
2006 %ve = fpext <8 x half> %splat to <8 x double>
2007 %vf = fneg <8 x double> %vd
2008 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vf, <8 x double> %ve, <8 x double> %va)
2009 ret <8 x double> %vg
2012 define <8 x double> @vfwnmsac_fv_v8f64_v8f16(<8 x double> %va, <8 x half> %vb, half %c) {
2013 ; CHECK-LABEL: vfwnmsac_fv_v8f64_v8f16:
2015 ; CHECK-NEXT: vsetivli zero, 8, e16, m1, ta, ma
2016 ; CHECK-NEXT: vfmv.v.f v13, fa0
2017 ; CHECK-NEXT: vfwcvt.f.f.v v14, v12
2018 ; CHECK-NEXT: vfwcvt.f.f.v v16, v13
2019 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
2020 ; CHECK-NEXT: vfwnmsac.vv v8, v14, v16
2022 %head = insertelement <8 x half> poison, half %c, i32 0
2023 %splat = shufflevector <8 x half> %head, <8 x half> poison, <8 x i32> zeroinitializer
2024 %vd = fpext <8 x half> %vb to <8 x double>
2025 %ve = fpext <8 x half> %splat to <8 x double>
2026 %vf = fneg <8 x double> %ve
2027 %vg = call <8 x double> @llvm.fma.v8f64(<8 x double> %vd, <8 x double> %vf, <8 x double> %va)
2028 ret <8 x double> %vg