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> @vfnmsac_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: vfnmsac_vv_nxv1f32:
18 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
19 ; ZVFH-NEXT: vfwnmsac.vv v10, v8, v9, v0.t
20 ; ZVFH-NEXT: vmv1r.v v8, v10
23 ; ZVFHMIN-LABEL: vfnmsac_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: vfnmsub.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 %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> %c, <vscale x 1 x i1> %m, i32 %evl)
35 ret <vscale x 1 x float> %v
38 define <vscale x 1 x float> @vfnmsac_vv_nxv1f32_unmasked(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x float> %c, i32 zeroext %evl) {
39 ; ZVFH-LABEL: vfnmsac_vv_nxv1f32_unmasked:
41 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
42 ; ZVFH-NEXT: vfwnmsac.vv v10, v8, v9
43 ; ZVFH-NEXT: vmv1r.v v8, v10
46 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv1f32_unmasked:
48 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
49 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8
50 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
51 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
52 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v11, v10
54 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
55 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
56 %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)
57 %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)
58 %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)
59 %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> %c, <vscale x 1 x i1> %allones, i32 %evl)
60 ret <vscale x 1 x float> %v
63 define <vscale x 1 x float> @vfnmsac_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) {
64 ; ZVFH-LABEL: vfnmsac_vf_nxv1f32:
66 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
67 ; ZVFH-NEXT: vfwnmsac.vf v9, fa0, v8, v0.t
68 ; ZVFH-NEXT: vmv1r.v v8, v9
71 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv1f32:
73 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
74 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
75 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
76 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
77 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
78 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
79 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
80 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
81 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
82 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v10, v9, v0.t
84 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
85 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
86 %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)
87 %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)
88 %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)
89 %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> %c, <vscale x 1 x i1> %m, i32 %evl)
90 ret <vscale x 1 x float> %v
93 define <vscale x 1 x float> @vfnmsac_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) {
94 ; ZVFH-LABEL: vfnmsac_vf_nxv1f32_commute:
96 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
97 ; ZVFH-NEXT: vfwnmsac.vf v9, fa0, v8, v0.t
98 ; ZVFH-NEXT: vmv1r.v v8, v9
101 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv1f32_commute:
103 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
104 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
105 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
106 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
107 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
108 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
109 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
110 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
111 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
112 ; ZVFHMIN-NEXT: vfnmsub.vv v10, v8, v9, v0.t
113 ; ZVFHMIN-NEXT: vmv1r.v v8, v10
115 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
116 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
117 %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)
118 %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)
119 %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)
120 %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> %c, <vscale x 1 x i1> %m, i32 %evl)
121 ret <vscale x 1 x float> %v
124 define <vscale x 1 x float> @vfnmsac_vf_nxv1f32_unmasked(<vscale x 1 x half> %a, half %b, <vscale x 1 x float> %c, i32 zeroext %evl) {
125 ; ZVFH-LABEL: vfnmsac_vf_nxv1f32_unmasked:
127 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
128 ; ZVFH-NEXT: vfwnmsac.vf v9, fa0, v8
129 ; ZVFH-NEXT: vmv1r.v v8, v9
132 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv1f32_unmasked:
134 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
135 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
136 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
137 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
138 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
139 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
140 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
141 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11
142 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, mf2, ta, ma
143 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v10, v9
145 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
146 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
147 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
148 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
149 %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)
150 %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)
151 %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)
152 %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> %c, <vscale x 1 x i1> %allones, i32 %evl)
153 ret <vscale x 1 x float> %v
156 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)
157 declare <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
158 declare <vscale x 2 x float> @llvm.vp.fpext.nxv2f32.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
160 define <vscale x 2 x float> @vfnmsac_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) {
161 ; ZVFH-LABEL: vfnmsac_vv_nxv2f32:
163 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
164 ; ZVFH-NEXT: vfwnmsac.vv v10, v8, v9, v0.t
165 ; ZVFH-NEXT: vmv1r.v v8, v10
168 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv2f32:
170 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
171 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8, v0.t
172 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9, v0.t
173 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
174 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v11, v10, v0.t
176 %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)
177 %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)
178 %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)
179 %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> %c, <vscale x 2 x i1> %m, i32 %evl)
180 ret <vscale x 2 x float> %v
183 define <vscale x 2 x float> @vfnmsac_vv_nxv2f32_unmasked(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x float> %c, i32 zeroext %evl) {
184 ; ZVFH-LABEL: vfnmsac_vv_nxv2f32_unmasked:
186 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
187 ; ZVFH-NEXT: vfwnmsac.vv v10, v8, v9
188 ; ZVFH-NEXT: vmv1r.v v8, v10
191 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv2f32_unmasked:
193 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
194 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v11, v8
195 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v9
196 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
197 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v11, v10
199 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
200 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
201 %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)
202 %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)
203 %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)
204 %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> %c, <vscale x 2 x i1> %allones, i32 %evl)
205 ret <vscale x 2 x float> %v
208 define <vscale x 2 x float> @vfnmsac_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) {
209 ; ZVFH-LABEL: vfnmsac_vf_nxv2f32:
211 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
212 ; ZVFH-NEXT: vfwnmsac.vf v9, fa0, v8, v0.t
213 ; ZVFH-NEXT: vmv1r.v v8, v9
216 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv2f32:
218 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
219 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
220 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
221 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
222 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
223 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
224 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
225 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
226 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
227 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v10, v9, v0.t
229 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
230 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
231 %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)
232 %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)
233 %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)
234 %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> %c, <vscale x 2 x i1> %m, i32 %evl)
235 ret <vscale x 2 x float> %v
238 define <vscale x 2 x float> @vfnmsac_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) {
239 ; ZVFH-LABEL: vfnmsac_vf_nxv2f32_commute:
241 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
242 ; ZVFH-NEXT: vfwnmsac.vf v9, fa0, v8, v0.t
243 ; ZVFH-NEXT: vmv1r.v v8, v9
246 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv2f32_commute:
248 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
249 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
250 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
251 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
252 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
253 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
254 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8, v0.t
255 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11, v0.t
256 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
257 ; ZVFHMIN-NEXT: vfnmsub.vv v10, v8, v9, v0.t
258 ; ZVFHMIN-NEXT: vmv.v.v v8, v10
260 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
261 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
262 %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)
263 %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)
264 %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)
265 %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> %c, <vscale x 2 x i1> %m, i32 %evl)
266 ret <vscale x 2 x float> %v
269 define <vscale x 2 x float> @vfnmsac_vf_nxv2f32_unmasked(<vscale x 2 x half> %a, half %b, <vscale x 2 x float> %c, i32 zeroext %evl) {
270 ; ZVFH-LABEL: vfnmsac_vf_nxv2f32_unmasked:
272 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
273 ; ZVFH-NEXT: vfwnmsac.vf v9, fa0, v8
274 ; ZVFH-NEXT: vmv1r.v v8, v9
277 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv2f32_unmasked:
279 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
280 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
281 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
282 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
283 ; ZVFHMIN-NEXT: vfncvt.f.f.w v11, v10
284 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
285 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
286 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v11
287 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m1, ta, ma
288 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v10, v9
290 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
291 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
292 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
293 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
294 %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)
295 %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)
296 %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)
297 %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> %c, <vscale x 2 x i1> %allones, i32 %evl)
298 ret <vscale x 2 x float> %v
301 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)
302 declare <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
303 declare <vscale x 4 x float> @llvm.vp.fpext.nxv4f32.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
305 define <vscale x 4 x float> @vfnmsac_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) {
306 ; ZVFH-LABEL: vfnmsac_vv_nxv4f32:
308 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
309 ; ZVFH-NEXT: vfwnmsac.vv v10, v8, v9, v0.t
310 ; ZVFH-NEXT: vmv2r.v v8, v10
313 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv4f32:
315 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
316 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v8, v0.t
317 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9, v0.t
318 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
319 ; ZVFHMIN-NEXT: vfnmsub.vv v12, v14, v10, v0.t
320 ; ZVFHMIN-NEXT: vmv.v.v v8, v12
322 %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)
323 %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)
324 %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)
325 %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> %c, <vscale x 4 x i1> %m, i32 %evl)
326 ret <vscale x 4 x float> %v
329 define <vscale x 4 x float> @vfnmsac_vv_nxv4f32_unmasked(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x float> %c, i32 zeroext %evl) {
330 ; ZVFH-LABEL: vfnmsac_vv_nxv4f32_unmasked:
332 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
333 ; ZVFH-NEXT: vfwnmsac.vv v10, v8, v9
334 ; ZVFH-NEXT: vmv2r.v v8, v10
337 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv4f32_unmasked:
339 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
340 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v8
341 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
342 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
343 ; ZVFHMIN-NEXT: vfnmsub.vv v12, v14, v10
344 ; ZVFHMIN-NEXT: vmv.v.v v8, v12
346 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
347 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
348 %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)
349 %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)
350 %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)
351 %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> %c, <vscale x 4 x i1> %allones, i32 %evl)
352 ret <vscale x 4 x float> %v
355 define <vscale x 4 x float> @vfnmsac_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) {
356 ; ZVFH-LABEL: vfnmsac_vf_nxv4f32:
358 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
359 ; ZVFH-NEXT: vfwnmsac.vf v10, fa0, v8, v0.t
360 ; ZVFH-NEXT: vmv2r.v v8, v10
363 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv4f32:
365 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
366 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
367 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
368 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
369 ; ZVFHMIN-NEXT: vfncvt.f.f.w v14, v12
370 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
371 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8, v0.t
372 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v14, v0.t
373 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
374 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v12, v10, v0.t
376 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
377 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
378 %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)
379 %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)
380 %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)
381 %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> %c, <vscale x 4 x i1> %m, i32 %evl)
382 ret <vscale x 4 x float> %v
385 define <vscale x 4 x float> @vfnmsac_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) {
386 ; ZVFH-LABEL: vfnmsac_vf_nxv4f32_commute:
388 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
389 ; ZVFH-NEXT: vfwnmsac.vf v10, fa0, v8, v0.t
390 ; ZVFH-NEXT: vmv2r.v v8, v10
393 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv4f32_commute:
395 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
396 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
397 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
398 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
399 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v12
400 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
401 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8, v0.t
402 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v14, v9, v0.t
403 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
404 ; ZVFHMIN-NEXT: vfnmsub.vv v12, v14, v10, v0.t
405 ; ZVFHMIN-NEXT: vmv.v.v v8, v12
407 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
408 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
409 %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)
410 %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)
411 %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)
412 %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> %c, <vscale x 4 x i1> %m, i32 %evl)
413 ret <vscale x 4 x float> %v
416 define <vscale x 4 x float> @vfnmsac_vf_nxv4f32_unmasked(<vscale x 4 x half> %a, half %b, <vscale x 4 x float> %c, i32 zeroext %evl) {
417 ; ZVFH-LABEL: vfnmsac_vf_nxv4f32_unmasked:
419 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
420 ; ZVFH-NEXT: vfwnmsac.vf v10, fa0, v8
421 ; ZVFH-NEXT: vmv2r.v v8, v10
424 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv4f32_unmasked:
426 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
427 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
428 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
429 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
430 ; ZVFHMIN-NEXT: vfncvt.f.f.w v14, v12
431 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m1, ta, ma
432 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
433 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v14
434 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m2, ta, ma
435 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v12, v10
437 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
438 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
439 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
440 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
441 %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)
442 %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)
443 %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)
444 %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> %c, <vscale x 4 x i1> %allones, i32 %evl)
445 ret <vscale x 4 x float> %v
448 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)
449 declare <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
450 declare <vscale x 8 x float> @llvm.vp.fpext.nxv8f32.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
452 define <vscale x 8 x float> @vfnmsac_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) {
453 ; ZVFH-LABEL: vfnmsac_vv_nxv8f32:
455 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
456 ; ZVFH-NEXT: vfwnmsac.vv v12, v8, v10, v0.t
457 ; ZVFH-NEXT: vmv4r.v v8, v12
460 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv8f32:
462 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
463 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v8, v0.t
464 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10, v0.t
465 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
466 ; ZVFHMIN-NEXT: vfnmsub.vv v16, v20, v12, v0.t
467 ; ZVFHMIN-NEXT: vmv.v.v v8, v16
469 %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)
470 %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)
471 %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)
472 %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> %c, <vscale x 8 x i1> %m, i32 %evl)
473 ret <vscale x 8 x float> %v
476 define <vscale x 8 x float> @vfnmsac_vv_nxv8f32_unmasked(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x float> %c, i32 zeroext %evl) {
477 ; ZVFH-LABEL: vfnmsac_vv_nxv8f32_unmasked:
479 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
480 ; ZVFH-NEXT: vfwnmsac.vv v12, v8, v10
481 ; ZVFH-NEXT: vmv4r.v v8, v12
484 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv8f32_unmasked:
486 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
487 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v8
488 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
489 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
490 ; ZVFHMIN-NEXT: vfnmsub.vv v16, v20, v12
491 ; ZVFHMIN-NEXT: vmv.v.v v8, v16
493 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
494 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
495 %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)
496 %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)
497 %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)
498 %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> %c, <vscale x 8 x i1> %allones, i32 %evl)
499 ret <vscale x 8 x float> %v
502 define <vscale x 8 x float> @vfnmsac_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) {
503 ; ZVFH-LABEL: vfnmsac_vf_nxv8f32:
505 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
506 ; ZVFH-NEXT: vfwnmsac.vf v12, fa0, v8, v0.t
507 ; ZVFH-NEXT: vmv4r.v v8, v12
510 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv8f32:
512 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
513 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
514 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
515 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
516 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v16
517 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
518 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8, v0.t
519 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v20, v0.t
520 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
521 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v16, v12, v0.t
523 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
524 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
525 %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)
526 %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)
527 %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)
528 %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> %c, <vscale x 8 x i1> %m, i32 %evl)
529 ret <vscale x 8 x float> %v
532 define <vscale x 8 x float> @vfnmsac_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) {
533 ; ZVFH-LABEL: vfnmsac_vf_nxv8f32_commute:
535 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
536 ; ZVFH-NEXT: vfwnmsac.vf v12, fa0, v8, v0.t
537 ; ZVFH-NEXT: vmv4r.v v8, v12
540 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv8f32_commute:
542 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
543 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
544 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
545 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
546 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v16
547 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
548 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8, v0.t
549 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v20, v10, v0.t
550 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
551 ; ZVFHMIN-NEXT: vfnmsub.vv v16, v20, v12, v0.t
552 ; ZVFHMIN-NEXT: vmv.v.v v8, v16
554 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
555 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
556 %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)
557 %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)
558 %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)
559 %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> %c, <vscale x 8 x i1> %m, i32 %evl)
560 ret <vscale x 8 x float> %v
563 define <vscale x 8 x float> @vfnmsac_vf_nxv8f32_unmasked(<vscale x 8 x half> %a, half %b, <vscale x 8 x float> %c, i32 zeroext %evl) {
564 ; ZVFH-LABEL: vfnmsac_vf_nxv8f32_unmasked:
566 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
567 ; ZVFH-NEXT: vfwnmsac.vf v12, fa0, v8
568 ; ZVFH-NEXT: vmv4r.v v8, v12
571 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv8f32_unmasked:
573 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
574 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
575 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
576 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
577 ; ZVFHMIN-NEXT: vfncvt.f.f.w v20, v16
578 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m2, ta, ma
579 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
580 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v20
581 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m4, ta, ma
582 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v16, v12
584 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
585 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
586 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
587 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
588 %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)
589 %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)
590 %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)
591 %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> %c, <vscale x 8 x i1> %allones, i32 %evl)
592 ret <vscale x 8 x float> %v
595 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)
596 declare <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float>, <vscale x 16 x i1>, i32)
597 declare <vscale x 16 x float> @llvm.vp.fpext.nxv16f32.nxv16f16(<vscale x 16 x half>, <vscale x 16 x i1>, i32)
599 define <vscale x 16 x float> @vfnmsac_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) {
600 ; ZVFH-LABEL: vfnmsac_vv_nxv16f32:
602 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
603 ; ZVFH-NEXT: vfwnmsac.vv v16, v8, v12, v0.t
604 ; ZVFH-NEXT: vmv8r.v v8, v16
607 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv16f32:
609 ; ZVFHMIN-NEXT: addi sp, sp, -16
610 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
611 ; ZVFHMIN-NEXT: csrr a1, vlenb
612 ; ZVFHMIN-NEXT: slli a1, a1, 3
613 ; ZVFHMIN-NEXT: sub sp, sp, a1
614 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
615 ; ZVFHMIN-NEXT: addi a1, sp, 16
616 ; ZVFHMIN-NEXT: vs8r.v v16, (a1) # Unknown-size Folded Spill
617 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
618 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8, v0.t
619 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12, v0.t
620 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
621 ; ZVFHMIN-NEXT: addi a0, sp, 16
622 ; ZVFHMIN-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
623 ; ZVFHMIN-NEXT: vfnmsub.vv v24, v16, v8, v0.t
624 ; ZVFHMIN-NEXT: vmv.v.v v8, v24
625 ; ZVFHMIN-NEXT: csrr a0, vlenb
626 ; ZVFHMIN-NEXT: slli a0, a0, 3
627 ; ZVFHMIN-NEXT: add sp, sp, a0
628 ; ZVFHMIN-NEXT: addi sp, sp, 16
630 %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)
631 %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)
632 %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)
633 %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> %c, <vscale x 16 x i1> %m, i32 %evl)
634 ret <vscale x 16 x float> %v
637 define <vscale x 16 x float> @vfnmsac_vv_nxv16f32_unmasked(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x float> %c, i32 zeroext %evl) {
638 ; ZVFH-LABEL: vfnmsac_vv_nxv16f32_unmasked:
640 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
641 ; ZVFH-NEXT: vfwnmsac.vv v16, v8, v12
642 ; ZVFH-NEXT: vmv8r.v v8, v16
645 ; ZVFHMIN-LABEL: vfnmsac_vv_nxv16f32_unmasked:
647 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
648 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v0, v8
649 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
650 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
651 ; ZVFHMIN-NEXT: vfnmsub.vv v24, v0, v16
652 ; ZVFHMIN-NEXT: vmv.v.v v8, v24
654 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
655 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
656 %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)
657 %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)
658 %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)
659 %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> %c, <vscale x 16 x i1> %allones, i32 %evl)
660 ret <vscale x 16 x float> %v
663 define <vscale x 16 x float> @vfnmsac_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) {
664 ; ZVFH-LABEL: vfnmsac_vf_nxv16f32:
666 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
667 ; ZVFH-NEXT: vfwnmsac.vf v16, fa0, v8, v0.t
668 ; ZVFH-NEXT: vmv8r.v v8, v16
671 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv16f32:
673 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
674 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
675 ; ZVFHMIN-NEXT: vfmv.v.f v24, fa5
676 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
677 ; ZVFHMIN-NEXT: vfncvt.f.f.w v4, v24
678 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
679 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8, v0.t
680 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v4, v0.t
681 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
682 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v24, v16, v0.t
684 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
685 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
686 %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)
687 %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)
688 %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)
689 %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> %c, <vscale x 16 x i1> %m, i32 %evl)
690 ret <vscale x 16 x float> %v
693 define <vscale x 16 x float> @vfnmsac_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) {
694 ; ZVFH-LABEL: vfnmsac_vf_nxv16f32_commute:
696 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
697 ; ZVFH-NEXT: vfwnmsac.vf v16, fa0, v8, v0.t
698 ; ZVFH-NEXT: vmv8r.v v8, v16
701 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv16f32_commute:
703 ; ZVFHMIN-NEXT: vmv4r.v v24, v8
704 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
705 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
706 ; ZVFHMIN-NEXT: vfmv.v.f v8, fa5
707 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
708 ; ZVFHMIN-NEXT: vfncvt.f.f.w v4, v8
709 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
710 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v24, v0.t
711 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v4, v0.t
712 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
713 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v24, v16, v0.t
715 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
716 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
717 %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)
718 %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)
719 %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)
720 %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> %c, <vscale x 16 x i1> %m, i32 %evl)
721 ret <vscale x 16 x float> %v
724 define <vscale x 16 x float> @vfnmsac_vf_nxv16f32_unmasked(<vscale x 16 x half> %a, half %b, <vscale x 16 x float> %c, i32 zeroext %evl) {
725 ; ZVFH-LABEL: vfnmsac_vf_nxv16f32_unmasked:
727 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
728 ; ZVFH-NEXT: vfwnmsac.vf v16, fa0, v8
729 ; ZVFH-NEXT: vmv8r.v v8, v16
732 ; ZVFHMIN-LABEL: vfnmsac_vf_nxv16f32_unmasked:
734 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
735 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
736 ; ZVFHMIN-NEXT: vfmv.v.f v24, fa5
737 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
738 ; ZVFHMIN-NEXT: vfncvt.f.f.w v0, v24
739 ; ZVFHMIN-NEXT: vsetvli zero, a0, e16, m4, ta, ma
740 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
741 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v0
742 ; ZVFHMIN-NEXT: vsetvli zero, zero, e32, m8, ta, ma
743 ; ZVFHMIN-NEXT: vfnmsub.vv v8, v24, v16
745 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
746 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
747 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
748 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
749 %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)
750 %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)
751 %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)
752 %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> %c, <vscale x 16 x i1> %allones, i32 %evl)
753 ret <vscale x 16 x float> %v
756 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)
757 declare <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double>, <vscale x 1 x i1>, i32)
758 declare <vscale x 1 x double> @llvm.vp.fpext.nxv1f64.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
760 define <vscale x 1 x double> @vfnmsac_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) {
761 ; CHECK-LABEL: vfnmsac_vv_nxv1f64:
763 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
764 ; CHECK-NEXT: vfwnmsac.vv v10, v8, v9, v0.t
765 ; CHECK-NEXT: vmv1r.v v8, v10
767 %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)
768 %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)
769 %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)
770 %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> %c, <vscale x 1 x i1> %m, i32 %evl)
771 ret <vscale x 1 x double> %v
774 define <vscale x 1 x double> @vfnmsac_vv_nxv1f64_unmasked(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
775 ; CHECK-LABEL: vfnmsac_vv_nxv1f64_unmasked:
777 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
778 ; CHECK-NEXT: vfwnmsac.vv v10, v8, v9
779 ; CHECK-NEXT: vmv1r.v v8, v10
781 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
782 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
783 %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)
784 %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)
785 %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)
786 %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> %c, <vscale x 1 x i1> %allones, i32 %evl)
787 ret <vscale x 1 x double> %v
790 define <vscale x 1 x double> @vfnmsac_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) {
791 ; CHECK-LABEL: vfnmsac_vf_nxv1f64:
793 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
794 ; CHECK-NEXT: vfwnmsac.vf v9, fa0, v8, v0.t
795 ; CHECK-NEXT: vmv1r.v v8, v9
797 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
798 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
799 %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)
800 %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)
801 %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)
802 %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> %c, <vscale x 1 x i1> %m, i32 %evl)
803 ret <vscale x 1 x double> %v
806 define <vscale x 1 x double> @vfnmsac_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) {
807 ; CHECK-LABEL: vfnmsac_vf_nxv1f64_commute:
809 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
810 ; CHECK-NEXT: vfwnmsac.vf v9, fa0, v8, v0.t
811 ; CHECK-NEXT: vmv1r.v v8, v9
813 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
814 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
815 %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)
816 %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)
817 %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)
818 %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> %c, <vscale x 1 x i1> %m, i32 %evl)
819 ret <vscale x 1 x double> %v
822 define <vscale x 1 x double> @vfnmsac_vf_nxv1f64_unmasked(<vscale x 1 x float> %a, float %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
823 ; CHECK-LABEL: vfnmsac_vf_nxv1f64_unmasked:
825 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
826 ; CHECK-NEXT: vfwnmsac.vf v9, fa0, v8
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 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
833 %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)
834 %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)
835 %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)
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> %c, <vscale x 1 x i1> %allones, i32 %evl)
837 ret <vscale x 1 x double> %v
840 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)
841 declare <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, i32)
842 declare <vscale x 2 x double> @llvm.vp.fpext.nxv2f64.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
844 define <vscale x 2 x double> @vfnmsac_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) {
845 ; CHECK-LABEL: vfnmsac_vv_nxv2f64:
847 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
848 ; CHECK-NEXT: vfwnmsac.vv v10, v8, v9, v0.t
849 ; CHECK-NEXT: vmv2r.v v8, v10
851 %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)
852 %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)
853 %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)
854 %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> %c, <vscale x 2 x i1> %m, i32 %evl)
855 ret <vscale x 2 x double> %v
858 define <vscale x 2 x double> @vfnmsac_vv_nxv2f64_unmasked(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
859 ; CHECK-LABEL: vfnmsac_vv_nxv2f64_unmasked:
861 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
862 ; CHECK-NEXT: vfwnmsac.vv v10, v8, v9
863 ; CHECK-NEXT: vmv2r.v v8, v10
865 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
866 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
867 %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)
868 %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)
869 %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)
870 %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> %c, <vscale x 2 x i1> %allones, i32 %evl)
871 ret <vscale x 2 x double> %v
874 define <vscale x 2 x double> @vfnmsac_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) {
875 ; CHECK-LABEL: vfnmsac_vf_nxv2f64:
877 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
878 ; CHECK-NEXT: vfwnmsac.vf v10, fa0, v8, v0.t
879 ; CHECK-NEXT: vmv2r.v v8, v10
881 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
882 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
883 %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)
884 %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)
885 %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)
886 %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> %c, <vscale x 2 x i1> %m, i32 %evl)
887 ret <vscale x 2 x double> %v
890 define <vscale x 2 x double> @vfnmsac_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) {
891 ; CHECK-LABEL: vfnmsac_vf_nxv2f64_commute:
893 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
894 ; CHECK-NEXT: vfwnmsac.vf v10, fa0, v8, v0.t
895 ; CHECK-NEXT: vmv2r.v v8, v10
897 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
898 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
899 %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)
900 %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)
901 %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)
902 %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> %c, <vscale x 2 x i1> %m, i32 %evl)
903 ret <vscale x 2 x double> %v
906 define <vscale x 2 x double> @vfnmsac_vf_nxv2f64_unmasked(<vscale x 2 x float> %a, float %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
907 ; CHECK-LABEL: vfnmsac_vf_nxv2f64_unmasked:
909 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
910 ; CHECK-NEXT: vfwnmsac.vf v10, fa0, v8
911 ; CHECK-NEXT: vmv2r.v v8, v10
913 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
914 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
915 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
916 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
917 %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)
918 %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)
919 %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)
920 %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> %c, <vscale x 2 x i1> %allones, i32 %evl)
921 ret <vscale x 2 x double> %v
924 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)
925 declare <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double>, <vscale x 4 x i1>, i32)
926 declare <vscale x 4 x double> @llvm.vp.fpext.nxv4f64.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
928 define <vscale x 4 x double> @vfnmsac_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) {
929 ; CHECK-LABEL: vfnmsac_vv_nxv4f64:
931 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
932 ; CHECK-NEXT: vfwnmsac.vv v12, v8, v10, v0.t
933 ; CHECK-NEXT: vmv4r.v v8, v12
935 %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)
936 %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)
937 %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)
938 %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> %c, <vscale x 4 x i1> %m, i32 %evl)
939 ret <vscale x 4 x double> %v
942 define <vscale x 4 x double> @vfnmsac_vv_nxv4f64_unmasked(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
943 ; CHECK-LABEL: vfnmsac_vv_nxv4f64_unmasked:
945 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
946 ; CHECK-NEXT: vfwnmsac.vv v12, v8, v10
947 ; CHECK-NEXT: vmv4r.v v8, v12
949 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
950 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
951 %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)
952 %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)
953 %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)
954 %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> %c, <vscale x 4 x i1> %allones, i32 %evl)
955 ret <vscale x 4 x double> %v
958 define <vscale x 4 x double> @vfnmsac_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) {
959 ; CHECK-LABEL: vfnmsac_vf_nxv4f64:
961 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
962 ; CHECK-NEXT: vfwnmsac.vf v12, fa0, v8, v0.t
963 ; CHECK-NEXT: vmv4r.v v8, v12
965 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
966 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
967 %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)
968 %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)
969 %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)
970 %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> %c, <vscale x 4 x i1> %m, i32 %evl)
971 ret <vscale x 4 x double> %v
974 define <vscale x 4 x double> @vfnmsac_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) {
975 ; CHECK-LABEL: vfnmsac_vf_nxv4f64_commute:
977 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
978 ; CHECK-NEXT: vfwnmsac.vf v12, fa0, v8, v0.t
979 ; CHECK-NEXT: vmv4r.v v8, v12
981 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
982 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
983 %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)
984 %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)
985 %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)
986 %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> %c, <vscale x 4 x i1> %m, i32 %evl)
987 ret <vscale x 4 x double> %v
990 define <vscale x 4 x double> @vfnmsac_vf_nxv4f64_unmasked(<vscale x 4 x float> %a, float %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
991 ; CHECK-LABEL: vfnmsac_vf_nxv4f64_unmasked:
993 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
994 ; CHECK-NEXT: vfwnmsac.vf v12, fa0, v8
995 ; CHECK-NEXT: vmv4r.v v8, v12
997 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
998 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
999 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1000 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1001 %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)
1002 %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)
1003 %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)
1004 %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> %c, <vscale x 4 x i1> %allones, i32 %evl)
1005 ret <vscale x 4 x double> %v
1008 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)
1009 declare <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double>, <vscale x 8 x i1>, i32)
1010 declare <vscale x 8 x double> @llvm.vp.fpext.nxv8f64.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
1012 define <vscale x 8 x double> @vfnmsac_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) {
1013 ; CHECK-LABEL: vfnmsac_vv_nxv8f64:
1015 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1016 ; CHECK-NEXT: vfwnmsac.vv v16, v8, v12, v0.t
1017 ; CHECK-NEXT: vmv8r.v v8, v16
1019 %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)
1020 %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)
1021 %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)
1022 %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> %c, <vscale x 8 x i1> %m, i32 %evl)
1023 ret <vscale x 8 x double> %v
1026 define <vscale x 8 x double> @vfnmsac_vv_nxv8f64_unmasked(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1027 ; CHECK-LABEL: vfnmsac_vv_nxv8f64_unmasked:
1029 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1030 ; CHECK-NEXT: vfwnmsac.vv v16, v8, v12
1031 ; CHECK-NEXT: vmv8r.v v8, v16
1033 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1034 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1035 %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)
1036 %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)
1037 %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)
1038 %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> %c, <vscale x 8 x i1> %allones, i32 %evl)
1039 ret <vscale x 8 x double> %v
1042 define <vscale x 8 x double> @vfnmsac_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) {
1043 ; CHECK-LABEL: vfnmsac_vf_nxv8f64:
1045 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1046 ; CHECK-NEXT: vfwnmsac.vf v16, fa0, v8, v0.t
1047 ; CHECK-NEXT: vmv8r.v v8, v16
1049 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1050 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1051 %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)
1052 %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)
1053 %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)
1054 %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> %c, <vscale x 8 x i1> %m, i32 %evl)
1055 ret <vscale x 8 x double> %v
1058 define <vscale x 8 x double> @vfnmsac_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) {
1059 ; CHECK-LABEL: vfnmsac_vf_nxv8f64_commute:
1061 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1062 ; CHECK-NEXT: vfwnmsac.vf v16, fa0, v8, v0.t
1063 ; CHECK-NEXT: vmv8r.v v8, v16
1065 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1066 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
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 %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)
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 %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> %c, <vscale x 8 x i1> %m, i32 %evl)
1071 ret <vscale x 8 x double> %v
1074 define <vscale x 8 x double> @vfnmsac_vf_nxv8f64_unmasked(<vscale x 8 x float> %a, float %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1075 ; CHECK-LABEL: vfnmsac_vf_nxv8f64_unmasked:
1077 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
1078 ; CHECK-NEXT: vfwnmsac.vf v16, fa0, v8
1079 ; CHECK-NEXT: vmv8r.v v8, v16
1081 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1082 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1083 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1084 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1085 %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)
1086 %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)
1087 %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)
1088 %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> %c, <vscale x 8 x i1> %allones, i32 %evl)
1089 ret <vscale x 8 x double> %v