1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfhmin,+v,+m -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfhmin,+v,+m -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x i1>, i32)
12 declare <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
13 declare <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half>, <vscale x 1 x i1>, i32)
15 define <vscale x 1 x float> @vfnmacc_vv_nxv1f32(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
16 ; ZVFH-LABEL: vfnmacc_vv_nxv1f32:
18 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
19 ; ZVFH-NEXT: vfwnmacc.vv v10, v8, v9, v0.t
20 ; ZVFH-NEXT: vmv1r.v v8, v10
23 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv1f32:
25 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
26 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8, v0.t
27 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9, v0.t
28 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
29 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v11, v10, v0.t
31 %aext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %m, i32 %evl)
32 %bext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 %evl)
33 %nega = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %aext, <vscale x 1 x i1> %m, i32 %evl)
34 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 %evl)
35 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %nega, <vscale x 1 x float> %bext, <vscale x 1 x float> %negc, <vscale x 1 x i1> %m, i32 %evl)
36 ret <vscale x 1 x float> %v
39 define <vscale x 1 x float> @vfnmacc_vv_nxv1f32_unmasked(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x float> %c, i32 zeroext %evl) {
40 ; ZVFH-LABEL: vfnmacc_vv_nxv1f32_unmasked:
42 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
43 ; ZVFH-NEXT: vfwnmacc.vv v10, v8, v9
44 ; ZVFH-NEXT: vmv1r.v v8, v10
47 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv1f32_unmasked:
49 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
50 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8
51 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
52 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
53 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v11, v10
55 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
56 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
57 %aext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %allones, i32 %evl)
58 %bext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %b, <vscale x 1 x i1> %allones, i32 %evl)
59 %nega = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %aext, <vscale x 1 x i1> %allones, i32 %evl)
60 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
61 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %nega, <vscale x 1 x float> %bext, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
62 ret <vscale x 1 x float> %v
65 define <vscale x 1 x float> @vfnmacc_vf_nxv1f32(<vscale x 1 x half> %a, half %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
66 ; ZVFH-LABEL: vfnmacc_vf_nxv1f32:
68 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
69 ; ZVFH-NEXT: vfwnmacc.vf v9, fa0, v8, v0.t
70 ; ZVFH-NEXT: vmv1r.v v8, v9
73 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv1f32:
75 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
76 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
77 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
78 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
79 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
80 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
81 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
82 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
83 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
84 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v10, v9, v0.t
86 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
87 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
88 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
89 %aext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %m, i32 %evl)
90 %vbext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl)
91 %nega = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %aext, <vscale x 1 x i1> %m, i32 %evl)
92 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 %evl)
93 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %nega, <vscale x 1 x float> %vbext, <vscale x 1 x float> %negc, <vscale x 1 x i1> %m, i32 %evl)
94 ret <vscale x 1 x float> %v
97 define <vscale x 1 x float> @vfnmacc_vf_nxv1f32_commute(<vscale x 1 x half> %a, half %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
98 ; ZVFH-LABEL: vfnmacc_vf_nxv1f32_commute:
100 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
101 ; ZVFH-NEXT: vfwnmacc.vf v9, fa0, v8, v0.t
102 ; ZVFH-NEXT: vmv1r.v v8, v9
105 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv1f32_commute:
107 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
108 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
109 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
110 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
111 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
112 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
113 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
114 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
115 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
116 ; ZVFHMIN-NEXT: vfnmadd.vv v10, v8, v9, v0.t
117 ; ZVFHMIN-NEXT: vmv1r.v v8, v10
119 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
120 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
121 %aext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %m, i32 %evl)
122 %vbext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl)
123 %nega = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %aext, <vscale x 1 x i1> %m, i32 %evl)
124 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 %evl)
125 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %vbext, <vscale x 1 x float> %nega, <vscale x 1 x float> %negc, <vscale x 1 x i1> %m, i32 %evl)
126 ret <vscale x 1 x float> %v
129 define <vscale x 1 x float> @vfnmacc_vf_nxv1f32_unmasked(<vscale x 1 x half> %a, half %b, <vscale x 1 x float> %c, i32 zeroext %evl) {
130 ; ZVFH-LABEL: vfnmacc_vf_nxv1f32_unmasked:
132 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
133 ; ZVFH-NEXT: vfwnmacc.vf v9, fa0, v8
134 ; ZVFH-NEXT: vmv1r.v v8, v9
137 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv1f32_unmasked:
139 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
140 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
141 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
142 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
143 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
144 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
145 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
146 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11
147 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
148 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v10, v9
150 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
151 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
152 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
153 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
154 %aext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %allones, i32 %evl)
155 %vbext = call <vscale x 1 x float> @llvm.vp.fpext.nxv1f32.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x i1> %allones, i32 %evl)
156 %nega = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %aext, <vscale x 1 x i1> %allones, i32 %evl)
157 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
158 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %nega, <vscale x 1 x float> %vbext, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
159 ret <vscale x 1 x float> %v
162 declare <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x i1>, i32)
163 declare <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
164 declare <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
166 define <vscale x 2 x float> @vfnmacc_vv_nxv2f32(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
167 ; ZVFH-LABEL: vfnmacc_vv_nxv2f32:
169 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
170 ; ZVFH-NEXT: vfwnmacc.vv v10, v8, v9, v0.t
171 ; ZVFH-NEXT: vmv1r.v v8, v10
174 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv2f32:
176 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
177 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8, v0.t
178 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9, v0.t
179 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
180 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v11, v10, v0.t
182 %aext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %m, i32 %evl)
183 %bext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 %evl)
184 %nega = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %aext, <vscale x 2 x i1> %m, i32 %evl)
185 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 %evl)
186 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %nega, <vscale x 2 x float> %bext, <vscale x 2 x float> %negc, <vscale x 2 x i1> %m, i32 %evl)
187 ret <vscale x 2 x float> %v
190 define <vscale x 2 x float> @vfnmacc_vv_nxv2f32_unmasked(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x float> %c, i32 zeroext %evl) {
191 ; ZVFH-LABEL: vfnmacc_vv_nxv2f32_unmasked:
193 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
194 ; ZVFH-NEXT: vfwnmacc.vv v10, v8, v9
195 ; ZVFH-NEXT: vmv1r.v v8, v10
198 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv2f32_unmasked:
200 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
201 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8
202 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
203 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
204 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v11, v10
206 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
207 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
208 %aext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %allones, i32 %evl)
209 %bext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %b, <vscale x 2 x i1> %allones, i32 %evl)
210 %nega = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %aext, <vscale x 2 x i1> %allones, i32 %evl)
211 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
212 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %nega, <vscale x 2 x float> %bext, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
213 ret <vscale x 2 x float> %v
216 define <vscale x 2 x float> @vfnmacc_vf_nxv2f32(<vscale x 2 x half> %a, half %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
217 ; ZVFH-LABEL: vfnmacc_vf_nxv2f32:
219 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
220 ; ZVFH-NEXT: vfwnmacc.vf v9, fa0, v8, v0.t
221 ; ZVFH-NEXT: vmv1r.v v8, v9
224 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv2f32:
226 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
227 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
228 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
229 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
230 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
231 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
232 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
233 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
234 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
235 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v10, v9, v0.t
237 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
238 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
239 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
240 %aext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %m, i32 %evl)
241 %vbext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl)
242 %nega = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %aext, <vscale x 2 x i1> %m, i32 %evl)
243 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 %evl)
244 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %nega, <vscale x 2 x float> %vbext, <vscale x 2 x float> %negc, <vscale x 2 x i1> %m, i32 %evl)
245 ret <vscale x 2 x float> %v
248 define <vscale x 2 x float> @vfnmacc_vf_nxv2f32_commute(<vscale x 2 x half> %a, half %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
249 ; ZVFH-LABEL: vfnmacc_vf_nxv2f32_commute:
251 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
252 ; ZVFH-NEXT: vfwnmacc.vf v9, fa0, v8, v0.t
253 ; ZVFH-NEXT: vmv1r.v v8, v9
256 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv2f32_commute:
258 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
259 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
260 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
261 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
262 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
263 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
264 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
265 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
266 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
267 ; ZVFHMIN-NEXT: vfnmadd.vv v10, v8, v9, v0.t
268 ; ZVFHMIN-NEXT: vmv.v.v v8, v10
270 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
271 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
272 %aext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %m, i32 %evl)
273 %vbext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl)
274 %nega = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %aext, <vscale x 2 x i1> %m, i32 %evl)
275 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 %evl)
276 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %vbext, <vscale x 2 x float> %nega, <vscale x 2 x float> %negc, <vscale x 2 x i1> %m, i32 %evl)
277 ret <vscale x 2 x float> %v
280 define <vscale x 2 x float> @vfnmacc_vf_nxv2f32_unmasked(<vscale x 2 x half> %a, half %b, <vscale x 2 x float> %c, i32 zeroext %evl) {
281 ; ZVFH-LABEL: vfnmacc_vf_nxv2f32_unmasked:
283 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
284 ; ZVFH-NEXT: vfwnmacc.vf v9, fa0, v8
285 ; ZVFH-NEXT: vmv1r.v v8, v9
288 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv2f32_unmasked:
290 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
291 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
292 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
293 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
294 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
295 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
296 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
297 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11
298 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
299 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v10, v9
301 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
302 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
303 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
304 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
305 %aext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %allones, i32 %evl)
306 %vbext = call <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x i1> %allones, i32 %evl)
307 %nega = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %aext, <vscale x 2 x i1> %allones, i32 %evl)
308 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
309 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %nega, <vscale x 2 x float> %vbext, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
310 ret <vscale x 2 x float> %v
313 declare <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, i32)
314 declare <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
315 declare <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
317 define <vscale x 4 x float> @vfnmacc_vv_nxv4f32(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
318 ; ZVFH-LABEL: vfnmacc_vv_nxv4f32:
320 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
321 ; ZVFH-NEXT: vfwnmacc.vv v10, v8, v9, v0.t
322 ; ZVFH-NEXT: vmv2r.v v8, v10
325 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv4f32:
327 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
328 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v8, v0.t
329 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9, v0.t
330 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
331 ; ZVFHMIN-NEXT: vfnmadd.vv v12, v14, v10, v0.t
332 ; ZVFHMIN-NEXT: vmv.v.v v8, v12
334 %aext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %m, i32 %evl)
335 %bext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 %evl)
336 %nega = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %aext, <vscale x 4 x i1> %m, i32 %evl)
337 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 %evl)
338 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %nega, <vscale x 4 x float> %bext, <vscale x 4 x float> %negc, <vscale x 4 x i1> %m, i32 %evl)
339 ret <vscale x 4 x float> %v
342 define <vscale x 4 x float> @vfnmacc_vv_nxv4f32_unmasked(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x float> %c, i32 zeroext %evl) {
343 ; ZVFH-LABEL: vfnmacc_vv_nxv4f32_unmasked:
345 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
346 ; ZVFH-NEXT: vfwnmacc.vv v10, v8, v9
347 ; ZVFH-NEXT: vmv2r.v v8, v10
350 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv4f32_unmasked:
352 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
353 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v8
354 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
355 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
356 ; ZVFHMIN-NEXT: vfnmadd.vv v12, v14, v10
357 ; ZVFHMIN-NEXT: vmv.v.v v8, v12
359 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
360 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
361 %aext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %allones, i32 %evl)
362 %bext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %b, <vscale x 4 x i1> %allones, i32 %evl)
363 %nega = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %aext, <vscale x 4 x i1> %allones, i32 %evl)
364 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
365 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %nega, <vscale x 4 x float> %bext, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
366 ret <vscale x 4 x float> %v
369 define <vscale x 4 x float> @vfnmacc_vf_nxv4f32(<vscale x 4 x half> %a, half %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
370 ; ZVFH-LABEL: vfnmacc_vf_nxv4f32:
372 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
373 ; ZVFH-NEXT: vfwnmacc.vf v10, fa0, v8, v0.t
374 ; ZVFH-NEXT: vmv2r.v v8, v10
377 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv4f32:
379 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
380 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
381 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
382 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
383 ; ZVFHMIN-NEXT: vfncvt.f.f.w v14, v12
384 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
385 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8, v0.t
386 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v14, v0.t
387 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
388 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v12, v10, v0.t
390 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
391 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
392 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
393 %aext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %m, i32 %evl)
394 %vbext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl)
395 %nega = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %aext, <vscale x 4 x i1> %m, i32 %evl)
396 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 %evl)
397 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %nega, <vscale x 4 x float> %vbext, <vscale x 4 x float> %negc, <vscale x 4 x i1> %m, i32 %evl)
398 ret <vscale x 4 x float> %v
401 define <vscale x 4 x float> @vfnmacc_vf_nxv4f32_commute(<vscale x 4 x half> %a, half %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
402 ; ZVFH-LABEL: vfnmacc_vf_nxv4f32_commute:
404 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
405 ; ZVFH-NEXT: vfwnmacc.vf v10, fa0, v8, v0.t
406 ; ZVFH-NEXT: vmv2r.v v8, v10
409 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv4f32_commute:
411 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
412 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
413 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
414 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
415 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v12
416 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
417 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8, v0.t
418 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v9, v0.t
419 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
420 ; ZVFHMIN-NEXT: vfnmadd.vv v12, v14, v10, v0.t
421 ; ZVFHMIN-NEXT: vmv.v.v v8, v12
423 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
424 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
425 %aext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %m, i32 %evl)
426 %vbext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl)
427 %nega = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %aext, <vscale x 4 x i1> %m, i32 %evl)
428 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 %evl)
429 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %vbext, <vscale x 4 x float> %nega, <vscale x 4 x float> %negc, <vscale x 4 x i1> %m, i32 %evl)
430 ret <vscale x 4 x float> %v
433 define <vscale x 4 x float> @vfnmacc_vf_nxv4f32_unmasked(<vscale x 4 x half> %a, half %b, <vscale x 4 x float> %c, i32 zeroext %evl) {
434 ; ZVFH-LABEL: vfnmacc_vf_nxv4f32_unmasked:
436 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
437 ; ZVFH-NEXT: vfwnmacc.vf v10, fa0, v8
438 ; ZVFH-NEXT: vmv2r.v v8, v10
441 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv4f32_unmasked:
443 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
444 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
445 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
446 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
447 ; ZVFHMIN-NEXT: vfncvt.f.f.w v14, v12
448 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
449 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
450 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v14
451 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
452 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v12, v10
454 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
455 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
456 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
457 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
458 %aext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %allones, i32 %evl)
459 %vbext = call <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x i1> %allones, i32 %evl)
460 %nega = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %aext, <vscale x 4 x i1> %allones, i32 %evl)
461 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
462 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %nega, <vscale x 4 x float> %vbext, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
463 ret <vscale x 4 x float> %v
466 declare <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x i1>, i32)
467 declare <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
468 declare <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
470 define <vscale x 8 x float> @vfnmacc_vv_nxv8f32(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
471 ; ZVFH-LABEL: vfnmacc_vv_nxv8f32:
473 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
474 ; ZVFH-NEXT: vfwnmacc.vv v12, v8, v10, v0.t
475 ; ZVFH-NEXT: vmv4r.v v8, v12
478 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv8f32:
480 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
481 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v8, v0.t
482 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10, v0.t
483 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
484 ; ZVFHMIN-NEXT: vfnmadd.vv v16, v20, v12, v0.t
485 ; ZVFHMIN-NEXT: vmv.v.v v8, v16
487 %aext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %m, i32 %evl)
488 %bext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 %evl)
489 %nega = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %aext, <vscale x 8 x i1> %m, i32 %evl)
490 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 %evl)
491 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %nega, <vscale x 8 x float> %bext, <vscale x 8 x float> %negc, <vscale x 8 x i1> %m, i32 %evl)
492 ret <vscale x 8 x float> %v
495 define <vscale x 8 x float> @vfnmacc_vv_nxv8f32_unmasked(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x float> %c, i32 zeroext %evl) {
496 ; ZVFH-LABEL: vfnmacc_vv_nxv8f32_unmasked:
498 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
499 ; ZVFH-NEXT: vfwnmacc.vv v12, v8, v10
500 ; ZVFH-NEXT: vmv4r.v v8, v12
503 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv8f32_unmasked:
505 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
506 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v8
507 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
508 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
509 ; ZVFHMIN-NEXT: vfnmadd.vv v16, v20, v12
510 ; ZVFHMIN-NEXT: vmv.v.v v8, v16
512 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
513 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
514 %aext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %allones, i32 %evl)
515 %bext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %b, <vscale x 8 x i1> %allones, i32 %evl)
516 %nega = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %aext, <vscale x 8 x i1> %allones, i32 %evl)
517 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
518 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %nega, <vscale x 8 x float> %bext, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
519 ret <vscale x 8 x float> %v
522 define <vscale x 8 x float> @vfnmacc_vf_nxv8f32(<vscale x 8 x half> %a, half %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
523 ; ZVFH-LABEL: vfnmacc_vf_nxv8f32:
525 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
526 ; ZVFH-NEXT: vfwnmacc.vf v12, fa0, v8, v0.t
527 ; ZVFH-NEXT: vmv4r.v v8, v12
530 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv8f32:
532 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
533 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
534 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
535 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
536 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v16
537 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
538 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8, v0.t
539 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v20, v0.t
540 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
541 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v16, v12, v0.t
543 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
544 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
545 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
546 %aext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %m, i32 %evl)
547 %vbext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl)
548 %nega = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %aext, <vscale x 8 x i1> %m, i32 %evl)
549 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 %evl)
550 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %nega, <vscale x 8 x float> %vbext, <vscale x 8 x float> %negc, <vscale x 8 x i1> %m, i32 %evl)
551 ret <vscale x 8 x float> %v
554 define <vscale x 8 x float> @vfnmacc_vf_nxv8f32_commute(<vscale x 8 x half> %a, half %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
555 ; ZVFH-LABEL: vfnmacc_vf_nxv8f32_commute:
557 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
558 ; ZVFH-NEXT: vfwnmacc.vf v12, fa0, v8, v0.t
559 ; ZVFH-NEXT: vmv4r.v v8, v12
562 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv8f32_commute:
564 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
565 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
566 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
567 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
568 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v16
569 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
570 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8, v0.t
571 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v10, v0.t
572 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
573 ; ZVFHMIN-NEXT: vfnmadd.vv v16, v20, v12, v0.t
574 ; ZVFHMIN-NEXT: vmv.v.v v8, v16
576 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
577 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
578 %aext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %m, i32 %evl)
579 %vbext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl)
580 %nega = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %aext, <vscale x 8 x i1> %m, i32 %evl)
581 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 %evl)
582 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %vbext, <vscale x 8 x float> %nega, <vscale x 8 x float> %negc, <vscale x 8 x i1> %m, i32 %evl)
583 ret <vscale x 8 x float> %v
586 define <vscale x 8 x float> @vfnmacc_vf_nxv8f32_unmasked(<vscale x 8 x half> %a, half %b, <vscale x 8 x float> %c, i32 zeroext %evl) {
587 ; ZVFH-LABEL: vfnmacc_vf_nxv8f32_unmasked:
589 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
590 ; ZVFH-NEXT: vfwnmacc.vf v12, fa0, v8
591 ; ZVFH-NEXT: vmv4r.v v8, v12
594 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv8f32_unmasked:
596 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
597 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
598 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
599 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
600 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v16
601 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
602 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
603 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v20
604 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
605 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v16, v12
607 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
608 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
609 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
610 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
611 %aext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %allones, i32 %evl)
612 %vbext = call <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x i1> %allones, i32 %evl)
613 %nega = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %aext, <vscale x 8 x i1> %allones, i32 %evl)
614 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
615 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %nega, <vscale x 8 x float> %vbext, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
616 ret <vscale x 8 x float> %v
619 declare <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x i1>, i32)
620 declare <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float>, <vscale x 16 x i1>, i32)
621 declare <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half>, <vscale x 16 x i1>, i32)
623 define <vscale x 16 x float> @vfnmacc_vv_nxv16f32(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
624 ; ZVFH-LABEL: vfnmacc_vv_nxv16f32:
626 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
627 ; ZVFH-NEXT: vfwnmacc.vv v16, v8, v12, v0.t
628 ; ZVFH-NEXT: vmv8r.v v8, v16
631 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv16f32:
633 ; ZVFHMIN-NEXT: addi sp, sp, -16
634 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
635 ; ZVFHMIN-NEXT: csrr a1, vlenb
636 ; ZVFHMIN-NEXT: slli a1, a1, 3
637 ; ZVFHMIN-NEXT: sub sp, sp, a1
638 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
639 ; ZVFHMIN-NEXT: addi a1, sp, 16
640 ; ZVFHMIN-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
641 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
642 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8, v0.t
643 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12, v0.t
644 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
645 ; ZVFHMIN-NEXT: addi a0, sp, 16
646 ; ZVFHMIN-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
647 ; ZVFHMIN-NEXT: vfnmadd.vv v24, v16, v8, v0.t
648 ; ZVFHMIN-NEXT: vmv.v.v v8, v24
649 ; ZVFHMIN-NEXT: csrr a0, vlenb
650 ; ZVFHMIN-NEXT: slli a0, a0, 3
651 ; ZVFHMIN-NEXT: add sp, sp, a0
652 ; ZVFHMIN-NEXT: addi sp, sp, 16
654 %aext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x i1> %m, i32 %evl)
655 %bext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 %evl)
656 %nega = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %aext, <vscale x 16 x i1> %m, i32 %evl)
657 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 %evl)
658 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %nega, <vscale x 16 x float> %bext, <vscale x 16 x float> %negc, <vscale x 16 x i1> %m, i32 %evl)
659 ret <vscale x 16 x float> %v
662 define <vscale x 16 x float> @vfnmacc_vv_nxv16f32_unmasked(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x float> %c, i32 zeroext %evl) {
663 ; ZVFH-LABEL: vfnmacc_vv_nxv16f32_unmasked:
665 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
666 ; ZVFH-NEXT: vfwnmacc.vv v16, v8, v12
667 ; ZVFH-NEXT: vmv8r.v v8, v16
670 ; ZVFHMIN-LABEL: vfnmacc_vv_nxv16f32_unmasked:
672 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
673 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v8
674 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
675 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
676 ; ZVFHMIN-NEXT: vfnmadd.vv v24, v0, v16
677 ; ZVFHMIN-NEXT: vmv.v.v v8, v24
679 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
680 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
681 %aext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x i1> %allones, i32 %evl)
682 %bext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %b, <vscale x 16 x i1> %allones, i32 %evl)
683 %nega = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %aext, <vscale x 16 x i1> %allones, i32 %evl)
684 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
685 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %nega, <vscale x 16 x float> %bext, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
686 ret <vscale x 16 x float> %v
689 define <vscale x 16 x float> @vfnmacc_vf_nxv16f32(<vscale x 16 x half> %a, half %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
690 ; ZVFH-LABEL: vfnmacc_vf_nxv16f32:
692 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
693 ; ZVFH-NEXT: vfwnmacc.vf v16, fa0, v8, v0.t
694 ; ZVFH-NEXT: vmv8r.v v8, v16
697 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv16f32:
699 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
700 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
701 ; ZVFHMIN-NEXT: vfmv.v.f v24, fa5
702 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
703 ; ZVFHMIN-NEXT: vfncvt.f.f.w v4, v24
704 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
705 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8, v0.t
706 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v4, v0.t
707 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
708 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v24, v16, v0.t
710 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
711 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
712 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
713 %aext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x i1> %m, i32 %evl)
714 %vbext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl)
715 %nega = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %aext, <vscale x 16 x i1> %m, i32 %evl)
716 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 %evl)
717 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %nega, <vscale x 16 x float> %vbext, <vscale x 16 x float> %negc, <vscale x 16 x i1> %m, i32 %evl)
718 ret <vscale x 16 x float> %v
721 define <vscale x 16 x float> @vfnmacc_vf_nxv16f32_commute(<vscale x 16 x half> %a, half %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
722 ; ZVFH-LABEL: vfnmacc_vf_nxv16f32_commute:
724 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
725 ; ZVFH-NEXT: vfwnmacc.vf v16, fa0, v8, v0.t
726 ; ZVFH-NEXT: vmv8r.v v8, v16
729 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv16f32_commute:
731 ; ZVFHMIN-NEXT: vmv4r.v v24, v8
732 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
733 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
734 ; ZVFHMIN-NEXT: vfmv.v.f v8, fa5
735 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
736 ; ZVFHMIN-NEXT: vfncvt.f.f.w v4, v8
737 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
738 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v24, v0.t
739 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v4, v0.t
740 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
741 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v24, v16, v0.t
743 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
744 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
745 %aext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x i1> %m, i32 %evl)
746 %vbext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl)
747 %nega = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %aext, <vscale x 16 x i1> %m, i32 %evl)
748 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 %evl)
749 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %vbext, <vscale x 16 x float> %nega, <vscale x 16 x float> %negc, <vscale x 16 x i1> %m, i32 %evl)
750 ret <vscale x 16 x float> %v
753 define <vscale x 16 x float> @vfnmacc_vf_nxv16f32_unmasked(<vscale x 16 x half> %a, half %b, <vscale x 16 x float> %c, i32 zeroext %evl) {
754 ; ZVFH-LABEL: vfnmacc_vf_nxv16f32_unmasked:
756 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
757 ; ZVFH-NEXT: vfwnmacc.vf v16, fa0, v8
758 ; ZVFH-NEXT: vmv8r.v v8, v16
761 ; ZVFHMIN-LABEL: vfnmacc_vf_nxv16f32_unmasked:
763 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
764 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
765 ; ZVFHMIN-NEXT: vfmv.v.f v24, fa5
766 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
767 ; ZVFHMIN-NEXT: vfncvt.f.f.w v0, v24
768 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
769 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
770 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v0
771 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
772 ; ZVFHMIN-NEXT: vfnmadd.vv v8, v24, v16
774 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
775 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
776 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
777 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
778 %aext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x i1> %allones, i32 %evl)
779 %vbext = call <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x i1> %allones, i32 %evl)
780 %nega = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %aext, <vscale x 16 x i1> %allones, i32 %evl)
781 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
782 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %nega, <vscale x 16 x float> %vbext, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
783 ret <vscale x 16 x float> %v
786 declare <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x i1>, i32)
787 declare <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double>, <vscale x 1 x i1>, i32)
788 declare <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
790 define <vscale x 1 x double> @vfnmacc_vv_nxv1f64(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
791 ; CHECK-LABEL: vfnmacc_vv_nxv1f64:
793 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
794 ; CHECK-NEXT: vfwnmacc.vv v10, v8, v9, v0.t
795 ; CHECK-NEXT: vmv1r.v v8, v10
797 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x i1> %m, i32 %evl)
798 %bext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 %evl)
799 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %m, i32 %evl)
800 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 %evl)
801 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %nega, <vscale x 1 x double> %bext, <vscale x 1 x double> %negc, <vscale x 1 x i1> %m, i32 %evl)
802 ret <vscale x 1 x double> %v
805 define <vscale x 1 x double> @vfnmacc_vv_nxv1f64_unmasked(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
806 ; CHECK-LABEL: vfnmacc_vv_nxv1f64_unmasked:
808 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
809 ; CHECK-NEXT: vfwnmacc.vv v10, v8, v9
810 ; CHECK-NEXT: vmv1r.v v8, v10
812 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
813 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
814 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x i1> %allones, i32 %evl)
815 %bext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %b, <vscale x 1 x i1> %allones, i32 %evl)
816 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %allones, i32 %evl)
817 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
818 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %nega, <vscale x 1 x double> %bext, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
819 ret <vscale x 1 x double> %v
822 define <vscale x 1 x double> @vfnmacc_vf_nxv1f64(<vscale x 1 x float> %a, float %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
823 ; CHECK-LABEL: vfnmacc_vf_nxv1f64:
825 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
826 ; CHECK-NEXT: vfwnmacc.vf v9, fa0, v8, v0.t
827 ; CHECK-NEXT: vmv1r.v v8, v9
829 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
830 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
831 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
832 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x i1> %m, i32 %evl)
833 %vbext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl)
834 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %m, i32 %evl)
835 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 %evl)
836 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %nega, <vscale x 1 x double> %vbext, <vscale x 1 x double> %negc, <vscale x 1 x i1> %m, i32 %evl)
837 ret <vscale x 1 x double> %v
840 define <vscale x 1 x double> @vfnmacc_vf_nxv1f64_commute(<vscale x 1 x float> %a, float %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
841 ; CHECK-LABEL: vfnmacc_vf_nxv1f64_commute:
843 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
844 ; CHECK-NEXT: vfwnmacc.vf v9, fa0, v8, v0.t
845 ; CHECK-NEXT: vmv1r.v v8, v9
847 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
848 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
849 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x i1> %m, i32 %evl)
850 %vbext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl)
851 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %m, i32 %evl)
852 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 %evl)
853 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %vbext, <vscale x 1 x double> %nega, <vscale x 1 x double> %negc, <vscale x 1 x i1> %m, i32 %evl)
854 ret <vscale x 1 x double> %v
857 define <vscale x 1 x double> @vfnmacc_vf_nxv1f64_unmasked(<vscale x 1 x float> %a, float %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
858 ; CHECK-LABEL: vfnmacc_vf_nxv1f64_unmasked:
860 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
861 ; CHECK-NEXT: vfwnmacc.vf v9, fa0, v8
862 ; CHECK-NEXT: vmv1r.v v8, v9
864 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
865 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
866 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
867 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
868 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x i1> %allones, i32 %evl)
869 %vbext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x i1> %allones, i32 %evl)
870 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %allones, i32 %evl)
871 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
872 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %nega, <vscale x 1 x double> %vbext, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
873 ret <vscale x 1 x double> %v
876 declare <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, i32)
877 declare <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, i32)
878 declare <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
880 define <vscale x 2 x double> @vfnmacc_vv_nxv2f64(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
881 ; CHECK-LABEL: vfnmacc_vv_nxv2f64:
883 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
884 ; CHECK-NEXT: vfwnmacc.vv v10, v8, v9, v0.t
885 ; CHECK-NEXT: vmv2r.v v8, v10
887 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x i1> %m, i32 %evl)
888 %bext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 %evl)
889 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %m, i32 %evl)
890 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 %evl)
891 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %nega, <vscale x 2 x double> %bext, <vscale x 2 x double> %negc, <vscale x 2 x i1> %m, i32 %evl)
892 ret <vscale x 2 x double> %v
895 define <vscale x 2 x double> @vfnmacc_vv_nxv2f64_unmasked(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
896 ; CHECK-LABEL: vfnmacc_vv_nxv2f64_unmasked:
898 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
899 ; CHECK-NEXT: vfwnmacc.vv v10, v8, v9
900 ; CHECK-NEXT: vmv2r.v v8, v10
902 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
903 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
904 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x i1> %allones, i32 %evl)
905 %bext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %b, <vscale x 2 x i1> %allones, i32 %evl)
906 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %allones, i32 %evl)
907 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
908 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %nega, <vscale x 2 x double> %bext, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
909 ret <vscale x 2 x double> %v
912 define <vscale x 2 x double> @vfnmacc_vf_nxv2f64(<vscale x 2 x float> %a, float %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
913 ; CHECK-LABEL: vfnmacc_vf_nxv2f64:
915 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
916 ; CHECK-NEXT: vfwnmacc.vf v10, fa0, v8, v0.t
917 ; CHECK-NEXT: vmv2r.v v8, v10
919 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
920 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
921 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
922 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x i1> %m, i32 %evl)
923 %vbext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl)
924 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %m, i32 %evl)
925 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 %evl)
926 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %nega, <vscale x 2 x double> %vbext, <vscale x 2 x double> %negc, <vscale x 2 x i1> %m, i32 %evl)
927 ret <vscale x 2 x double> %v
930 define <vscale x 2 x double> @vfnmacc_vf_nxv2f64_commute(<vscale x 2 x float> %a, float %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
931 ; CHECK-LABEL: vfnmacc_vf_nxv2f64_commute:
933 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
934 ; CHECK-NEXT: vfwnmacc.vf v10, fa0, v8, v0.t
935 ; CHECK-NEXT: vmv2r.v v8, v10
937 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
938 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
939 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x i1> %m, i32 %evl)
940 %vbext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl)
941 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %m, i32 %evl)
942 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 %evl)
943 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %vbext, <vscale x 2 x double> %nega, <vscale x 2 x double> %negc, <vscale x 2 x i1> %m, i32 %evl)
944 ret <vscale x 2 x double> %v
947 define <vscale x 2 x double> @vfnmacc_vf_nxv2f64_unmasked(<vscale x 2 x float> %a, float %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
948 ; CHECK-LABEL: vfnmacc_vf_nxv2f64_unmasked:
950 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
951 ; CHECK-NEXT: vfwnmacc.vf v10, fa0, v8
952 ; CHECK-NEXT: vmv2r.v v8, v10
954 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
955 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
956 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
957 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
958 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x i1> %allones, i32 %evl)
959 %vbext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x i1> %allones, i32 %evl)
960 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %allones, i32 %evl)
961 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
962 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %nega, <vscale x 2 x double> %vbext, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
963 ret <vscale x 2 x double> %v
966 declare <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x i1>, i32)
967 declare <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double>, <vscale x 4 x i1>, i32)
968 declare <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
970 define <vscale x 4 x double> @vfnmacc_vv_nxv4f64(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
971 ; CHECK-LABEL: vfnmacc_vv_nxv4f64:
973 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
974 ; CHECK-NEXT: vfwnmacc.vv v12, v8, v10, v0.t
975 ; CHECK-NEXT: vmv4r.v v8, v12
977 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x i1> %m, i32 %evl)
978 %bext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 %evl)
979 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %m, i32 %evl)
980 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 %evl)
981 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %nega, <vscale x 4 x double> %bext, <vscale x 4 x double> %negc, <vscale x 4 x i1> %m, i32 %evl)
982 ret <vscale x 4 x double> %v
985 define <vscale x 4 x double> @vfnmacc_vv_nxv4f64_unmasked(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
986 ; CHECK-LABEL: vfnmacc_vv_nxv4f64_unmasked:
988 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
989 ; CHECK-NEXT: vfwnmacc.vv v12, v8, v10
990 ; CHECK-NEXT: vmv4r.v v8, v12
992 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
993 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
994 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x i1> %allones, i32 %evl)
995 %bext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %b, <vscale x 4 x i1> %allones, i32 %evl)
996 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %allones, i32 %evl)
997 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
998 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %nega, <vscale x 4 x double> %bext, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
999 ret <vscale x 4 x double> %v
1002 define <vscale x 4 x double> @vfnmacc_vf_nxv4f64(<vscale x 4 x float> %a, float %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1003 ; CHECK-LABEL: vfnmacc_vf_nxv4f64:
1005 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1006 ; CHECK-NEXT: vfwnmacc.vf v12, fa0, v8, v0.t
1007 ; CHECK-NEXT: vmv4r.v v8, v12
1009 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1010 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1011 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1012 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x i1> %m, i32 %evl)
1013 %vbext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl)
1014 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %m, i32 %evl)
1015 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 %evl)
1016 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %nega, <vscale x 4 x double> %vbext, <vscale x 4 x double> %negc, <vscale x 4 x i1> %m, i32 %evl)
1017 ret <vscale x 4 x double> %v
1020 define <vscale x 4 x double> @vfnmacc_vf_nxv4f64_commute(<vscale x 4 x float> %a, float %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1021 ; CHECK-LABEL: vfnmacc_vf_nxv4f64_commute:
1023 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1024 ; CHECK-NEXT: vfwnmacc.vf v12, fa0, v8, v0.t
1025 ; CHECK-NEXT: vmv4r.v v8, v12
1027 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1028 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1029 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x i1> %m, i32 %evl)
1030 %vbext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl)
1031 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %m, i32 %evl)
1032 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 %evl)
1033 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %vbext, <vscale x 4 x double> %nega, <vscale x 4 x double> %negc, <vscale x 4 x i1> %m, i32 %evl)
1034 ret <vscale x 4 x double> %v
1037 define <vscale x 4 x double> @vfnmacc_vf_nxv4f64_unmasked(<vscale x 4 x float> %a, float %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
1038 ; CHECK-LABEL: vfnmacc_vf_nxv4f64_unmasked:
1040 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
1041 ; CHECK-NEXT: vfwnmacc.vf v12, fa0, v8
1042 ; CHECK-NEXT: vmv4r.v v8, v12
1044 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1045 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1046 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1047 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1048 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x i1> %allones, i32 %evl)
1049 %vbext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x i1> %allones, i32 %evl)
1050 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %allones, i32 %evl)
1051 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1052 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %nega, <vscale x 4 x double> %vbext, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1053 ret <vscale x 4 x double> %v
1056 declare <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x i1>, i32)
1057 declare <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double>, <vscale x 8 x i1>, i32)
1058 declare <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
1060 define <vscale x 8 x double> @vfnmacc_vv_nxv8f64(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1061 ; CHECK-LABEL: vfnmacc_vv_nxv8f64:
1063 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1064 ; CHECK-NEXT: vfwnmacc.vv v16, v8, v12, v0.t
1065 ; CHECK-NEXT: vmv8r.v v8, v16
1067 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x i1> %m, i32 %evl)
1068 %bext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 %evl)
1069 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %m, i32 %evl)
1070 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 %evl)
1071 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %nega, <vscale x 8 x double> %bext, <vscale x 8 x double> %negc, <vscale x 8 x i1> %m, i32 %evl)
1072 ret <vscale x 8 x double> %v
1075 define <vscale x 8 x double> @vfnmacc_vv_nxv8f64_unmasked(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1076 ; CHECK-LABEL: vfnmacc_vv_nxv8f64_unmasked:
1078 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1079 ; CHECK-NEXT: vfwnmacc.vv v16, v8, v12
1080 ; CHECK-NEXT: vmv8r.v v8, v16
1082 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1083 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1084 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x i1> %allones, i32 %evl)
1085 %bext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %b, <vscale x 8 x i1> %allones, i32 %evl)
1086 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %allones, i32 %evl)
1087 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1088 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %nega, <vscale x 8 x double> %bext, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1089 ret <vscale x 8 x double> %v
1092 define <vscale x 8 x double> @vfnmacc_vf_nxv8f64(<vscale x 8 x float> %a, float %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1093 ; CHECK-LABEL: vfnmacc_vf_nxv8f64:
1095 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1096 ; CHECK-NEXT: vfwnmacc.vf v16, fa0, v8, v0.t
1097 ; CHECK-NEXT: vmv8r.v v8, v16
1099 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1100 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1101 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1102 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x i1> %m, i32 %evl)
1103 %vbext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl)
1104 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %m, i32 %evl)
1105 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 %evl)
1106 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %nega, <vscale x 8 x double> %vbext, <vscale x 8 x double> %negc, <vscale x 8 x i1> %m, i32 %evl)
1107 ret <vscale x 8 x double> %v
1110 define <vscale x 8 x double> @vfnmacc_vf_nxv8f64_commute(<vscale x 8 x float> %a, float %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1111 ; CHECK-LABEL: vfnmacc_vf_nxv8f64_commute:
1113 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1114 ; CHECK-NEXT: vfwnmacc.vf v16, fa0, v8, v0.t
1115 ; CHECK-NEXT: vmv8r.v v8, v16
1117 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1118 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1119 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x i1> %m, i32 %evl)
1120 %vbext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl)
1121 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %m, i32 %evl)
1122 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 %evl)
1123 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %vbext, <vscale x 8 x double> %nega, <vscale x 8 x double> %negc, <vscale x 8 x i1> %m, i32 %evl)
1124 ret <vscale x 8 x double> %v
1127 define <vscale x 8 x double> @vfnmacc_vf_nxv8f64_unmasked(<vscale x 8 x float> %a, float %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1128 ; CHECK-LABEL: vfnmacc_vf_nxv8f64_unmasked:
1130 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1131 ; CHECK-NEXT: vfwnmacc.vf v16, fa0, v8
1132 ; CHECK-NEXT: vmv8r.v v8, v16
1134 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1135 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1136 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1137 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1138 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x i1> %allones, i32 %evl)
1139 %vbext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x i1> %allones, i32 %evl)
1140 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %allones, i32 %evl)
1141 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1142 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %nega, <vscale x 8 x double> %vbext, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1143 ret <vscale x 8 x double> %v
1146 declare <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f16(<vscale x 1 x half>, <vscale x 1 x i1>, i32)
1148 define <vscale x 1 x double> @vfnmacc_vv_nxv1f64_nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1149 ; CHECK-LABEL: vfnmacc_vv_nxv1f64_nxv1f16:
1151 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1152 ; CHECK-NEXT: vfwcvt.f.f.v v11, v8, v0.t
1153 ; CHECK-NEXT: vfwcvt.f.f.v v8, v9, v0.t
1154 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1155 ; CHECK-NEXT: vfwnmacc.vv v10, v11, v8, v0.t
1156 ; CHECK-NEXT: vmv1r.v v8, v10
1158 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %m, i32 %evl)
1159 %bext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f16(<vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 %evl)
1160 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %m, i32 %evl)
1161 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 %evl)
1162 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %nega, <vscale x 1 x double> %bext, <vscale x 1 x double> %negc, <vscale x 1 x i1> %m, i32 %evl)
1163 ret <vscale x 1 x double> %v
1166 define <vscale x 1 x double> @vfnmacc_vv_nxv1f64_nxv1f16_unmasked(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
1167 ; CHECK-LABEL: vfnmacc_vv_nxv1f64_nxv1f16_unmasked:
1169 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
1170 ; CHECK-NEXT: vfwcvt.f.f.v v11, v8
1171 ; CHECK-NEXT: vfwcvt.f.f.v v8, v9
1172 ; CHECK-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
1173 ; CHECK-NEXT: vfwnmacc.vv v10, v11, v8
1174 ; CHECK-NEXT: vmv1r.v v8, v10
1176 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1177 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1178 %aext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x i1> %allones, i32 %evl)
1179 %bext = call <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f16(<vscale x 1 x half> %b, <vscale x 1 x i1> %allones, i32 %evl)
1180 %nega = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %aext, <vscale x 1 x i1> %allones, i32 %evl)
1181 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1182 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %nega, <vscale x 1 x double> %bext, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1183 ret <vscale x 1 x double> %v
1186 declare <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
1188 define <vscale x 2 x double> @vfnmacc_vv_nxv2f64_nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1189 ; CHECK-LABEL: vfnmacc_vv_nxv2f64_nxv2f16:
1191 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1192 ; CHECK-NEXT: vfwcvt.f.f.v v12, v8, v0.t
1193 ; CHECK-NEXT: vfwcvt.f.f.v v8, v9, v0.t
1194 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1195 ; CHECK-NEXT: vfwnmacc.vv v10, v12, v8, v0.t
1196 ; CHECK-NEXT: vmv2r.v v8, v10
1198 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %m, i32 %evl)
1199 %bext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f16(<vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 %evl)
1200 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %m, i32 %evl)
1201 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 %evl)
1202 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %nega, <vscale x 2 x double> %bext, <vscale x 2 x double> %negc, <vscale x 2 x i1> %m, i32 %evl)
1203 ret <vscale x 2 x double> %v
1206 define <vscale x 2 x double> @vfnmacc_vv_nxv2f64_nxv2f16_unmasked(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
1207 ; CHECK-LABEL: vfnmacc_vv_nxv2f64_nxv2f16_unmasked:
1209 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
1210 ; CHECK-NEXT: vfwcvt.f.f.v v12, v8
1211 ; CHECK-NEXT: vfwcvt.f.f.v v8, v9
1212 ; CHECK-NEXT: vsetvli zero, zero, e32, m1, ta, ma
1213 ; CHECK-NEXT: vfwnmacc.vv v10, v12, v8
1214 ; CHECK-NEXT: vmv2r.v v8, v10
1216 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1217 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1218 %aext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x i1> %allones, i32 %evl)
1219 %bext = call <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f16(<vscale x 2 x half> %b, <vscale x 2 x i1> %allones, i32 %evl)
1220 %nega = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %aext, <vscale x 2 x i1> %allones, i32 %evl)
1221 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1222 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %nega, <vscale x 2 x double> %bext, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1223 ret <vscale x 2 x double> %v
1226 declare <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
1228 define <vscale x 4 x double> @vfnmacc_vv_nxv4f64_nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1229 ; CHECK-LABEL: vfnmacc_vv_nxv4f64_nxv4f16:
1231 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1232 ; CHECK-NEXT: vfwcvt.f.f.v v10, v8, v0.t
1233 ; CHECK-NEXT: vfwcvt.f.f.v v16, v9, v0.t
1234 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1235 ; CHECK-NEXT: vfwnmacc.vv v12, v10, v16, v0.t
1236 ; CHECK-NEXT: vmv4r.v v8, v12
1238 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %m, i32 %evl)
1239 %bext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f16(<vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 %evl)
1240 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %m, i32 %evl)
1241 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 %evl)
1242 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %nega, <vscale x 4 x double> %bext, <vscale x 4 x double> %negc, <vscale x 4 x i1> %m, i32 %evl)
1243 ret <vscale x 4 x double> %v
1246 define <vscale x 4 x double> @vfnmacc_vv_nxv4f64_nxv4f16_unmasked(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
1247 ; CHECK-LABEL: vfnmacc_vv_nxv4f64_nxv4f16_unmasked:
1249 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
1250 ; CHECK-NEXT: vfwcvt.f.f.v v10, v8
1251 ; CHECK-NEXT: vfwcvt.f.f.v v16, v9
1252 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
1253 ; CHECK-NEXT: vfwnmacc.vv v12, v10, v16
1254 ; CHECK-NEXT: vmv4r.v v8, v12
1256 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1257 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1258 %aext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x i1> %allones, i32 %evl)
1259 %bext = call <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f16(<vscale x 4 x half> %b, <vscale x 4 x i1> %allones, i32 %evl)
1260 %nega = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %aext, <vscale x 4 x i1> %allones, i32 %evl)
1261 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1262 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %nega, <vscale x 4 x double> %bext, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1263 ret <vscale x 4 x double> %v
1266 declare <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
1268 define <vscale x 8 x double> @vfnmacc_vv_nxv8f64_nxv4f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1269 ; CHECK-LABEL: vfnmacc_vv_nxv8f64_nxv4f16:
1271 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1272 ; CHECK-NEXT: vfwcvt.f.f.v v12, v8, v0.t
1273 ; CHECK-NEXT: vfwcvt.f.f.v v24, v10, v0.t
1274 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1275 ; CHECK-NEXT: vfwnmacc.vv v16, v12, v24, v0.t
1276 ; CHECK-NEXT: vmv8r.v v8, v16
1278 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %m, i32 %evl)
1279 %bext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f16(<vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 %evl)
1280 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %m, i32 %evl)
1281 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 %evl)
1282 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %nega, <vscale x 8 x double> %bext, <vscale x 8 x double> %negc, <vscale x 8 x i1> %m, i32 %evl)
1283 ret <vscale x 8 x double> %v
1286 define <vscale x 8 x double> @vfnmacc_vv_nxv8f64_nxv4f16_unmasked(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1287 ; CHECK-LABEL: vfnmacc_vv_nxv8f64_nxv4f16_unmasked:
1289 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
1290 ; CHECK-NEXT: vfwcvt.f.f.v v12, v8
1291 ; CHECK-NEXT: vfwcvt.f.f.v v24, v10
1292 ; CHECK-NEXT: vsetvli zero, zero, e32, m4, ta, ma
1293 ; CHECK-NEXT: vfwnmacc.vv v16, v12, v24
1294 ; CHECK-NEXT: vmv8r.v v8, v16
1296 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1297 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1298 %aext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x i1> %allones, i32 %evl)
1299 %bext = call <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f16(<vscale x 8 x half> %b, <vscale x 8 x i1> %allones, i32 %evl)
1300 %nega = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %aext, <vscale x 8 x i1> %allones, i32 %evl)
1301 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1302 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %nega, <vscale x 8 x double> %bext, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1303 ret <vscale x 8 x double> %v