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
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 declare <2 x half> @llvm.vp.fma.v2f16(<2 x half>, <2 x half>, <2 x half>, <2 x i1>, i32)
8 declare <2 x half> @llvm.vp.fneg.v2f16(<2 x half>, <2 x i1>, i32)
9 declare <2 x half> @llvm.vp.merge.v2f16(<2 x i1>, <2 x half>, <2 x half>, i32)
10 declare <2 x half> @llvm.vp.select.v2f16(<2 x i1>, <2 x half>, <2 x half>, i32)
12 define <2 x half> @vfmsac_vv_v2f16(<2 x half> %a, <2 x half> %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
13 ; CHECK-LABEL: vfmsac_vv_v2f16:
15 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
16 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
17 ; CHECK-NEXT: vmv1r.v v8, v10
19 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
20 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %a, <2 x half> %b, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
21 %u = call <2 x half> @llvm.vp.merge.v2f16(<2 x i1> %m, <2 x half> %v, <2 x half> %c, i32 %evl)
25 define <2 x half> @vfmsac_vv_v2f16_unmasked(<2 x half> %a, <2 x half> %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
26 ; CHECK-LABEL: vfmsac_vv_v2f16_unmasked:
28 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
29 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
30 ; CHECK-NEXT: vmv1r.v v8, v10
32 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
33 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %a, <2 x half> %b, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
34 %u = call <2 x half> @llvm.vp.merge.v2f16(<2 x i1> splat (i1 -1), <2 x half> %v, <2 x half> %c, i32 %evl)
38 define <2 x half> @vfmsac_vf_v2f16(<2 x half> %a, half %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
39 ; CHECK-LABEL: vfmsac_vf_v2f16:
41 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
42 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
43 ; CHECK-NEXT: vmv1r.v v8, v9
45 %elt.head = insertelement <2 x half> poison, half %b, i32 0
46 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
47 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
48 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %a, <2 x half> %vb, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
49 %u = call <2 x half> @llvm.vp.merge.v2f16(<2 x i1> %m, <2 x half> %v, <2 x half> %c, i32 %evl)
53 define <2 x half> @vfmsac_vf_v2f16_commute(<2 x half> %a, half %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
54 ; CHECK-LABEL: vfmsac_vf_v2f16_commute:
56 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
57 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
58 ; CHECK-NEXT: vmv1r.v v8, v9
60 %elt.head = insertelement <2 x half> poison, half %b, i32 0
61 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
62 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
63 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %vb, <2 x half> %a, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
64 %u = call <2 x half> @llvm.vp.merge.v2f16(<2 x i1> %m, <2 x half> %v, <2 x half> %c, i32 %evl)
68 define <2 x half> @vfmsac_vf_v2f16_unmasked(<2 x half> %a, half %b, <2 x half> %c, i32 zeroext %evl) {
69 ; CHECK-LABEL: vfmsac_vf_v2f16_unmasked:
71 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
72 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
73 ; CHECK-NEXT: vmv1r.v v8, v9
75 %elt.head = insertelement <2 x half> poison, half %b, i32 0
76 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
77 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
78 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %a, <2 x half> %vb, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
79 %u = call <2 x half> @llvm.vp.merge.v2f16(<2 x i1> splat (i1 -1), <2 x half> %v, <2 x half> %c, i32 %evl)
83 define <2 x half> @vfmsac_vv_v2f16_ta(<2 x half> %a, <2 x half> %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
84 ; CHECK-LABEL: vfmsac_vv_v2f16_ta:
86 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
87 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
88 ; CHECK-NEXT: vmv1r.v v8, v10
90 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
91 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %a, <2 x half> %b, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
92 %u = call <2 x half> @llvm.vp.select.v2f16(<2 x i1> %m, <2 x half> %v, <2 x half> %c, i32 %evl)
96 define <2 x half> @vfmsac_vf_v2f16_ta(<2 x half> %a, half %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
97 ; CHECK-LABEL: vfmsac_vf_v2f16_ta:
99 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
100 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
101 ; CHECK-NEXT: vmv1r.v v8, v9
103 %elt.head = insertelement <2 x half> poison, half %b, i32 0
104 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
105 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
106 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %a, <2 x half> %vb, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
107 %u = call <2 x half> @llvm.vp.select.v2f16(<2 x i1> %m, <2 x half> %v, <2 x half> %c, i32 %evl)
111 define <2 x half> @vfmsac_vf_v2f16_commute_ta(<2 x half> %a, half %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
112 ; CHECK-LABEL: vfmsac_vf_v2f16_commute_ta:
114 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
115 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
116 ; CHECK-NEXT: vmv1r.v v8, v9
118 %elt.head = insertelement <2 x half> poison, half %b, i32 0
119 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
120 %negc = call <2 x half> @llvm.vp.fneg.v2f16(<2 x half> %c, <2 x i1> splat (i1 -1), i32 %evl)
121 %v = call <2 x half> @llvm.vp.fma.v2f16(<2 x half> %vb, <2 x half> %a, <2 x half> %negc, <2 x i1> splat (i1 -1), i32 %evl)
122 %u = call <2 x half> @llvm.vp.select.v2f16(<2 x i1> %m, <2 x half> %v, <2 x half> %c, i32 %evl)
126 declare <4 x half> @llvm.vp.fma.v4f16(<4 x half>, <4 x half>, <4 x half>, <4 x i1>, i32)
127 declare <4 x half> @llvm.vp.fneg.v4f16(<4 x half>, <4 x i1>, i32)
128 declare <4 x half> @llvm.vp.merge.v4f16(<4 x i1>, <4 x half>, <4 x half>, i32)
129 declare <4 x half> @llvm.vp.select.v4f16(<4 x i1>, <4 x half>, <4 x half>, i32)
131 define <4 x half> @vfmsac_vv_v4f16(<4 x half> %a, <4 x half> %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
132 ; CHECK-LABEL: vfmsac_vv_v4f16:
134 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
135 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
136 ; CHECK-NEXT: vmv1r.v v8, v10
138 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
139 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %a, <4 x half> %b, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
140 %u = call <4 x half> @llvm.vp.merge.v4f16(<4 x i1> %m, <4 x half> %v, <4 x half> %c, i32 %evl)
144 define <4 x half> @vfmsac_vv_v4f16_unmasked(<4 x half> %a, <4 x half> %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
145 ; CHECK-LABEL: vfmsac_vv_v4f16_unmasked:
147 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
148 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
149 ; CHECK-NEXT: vmv1r.v v8, v10
151 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
152 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %a, <4 x half> %b, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
153 %u = call <4 x half> @llvm.vp.merge.v4f16(<4 x i1> splat (i1 -1), <4 x half> %v, <4 x half> %c, i32 %evl)
157 define <4 x half> @vfmsac_vf_v4f16(<4 x half> %a, half %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
158 ; CHECK-LABEL: vfmsac_vf_v4f16:
160 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
161 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
162 ; CHECK-NEXT: vmv1r.v v8, v9
164 %elt.head = insertelement <4 x half> poison, half %b, i32 0
165 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
166 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
167 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %a, <4 x half> %vb, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
168 %u = call <4 x half> @llvm.vp.merge.v4f16(<4 x i1> %m, <4 x half> %v, <4 x half> %c, i32 %evl)
172 define <4 x half> @vfmsac_vf_v4f16_commute(<4 x half> %a, half %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
173 ; CHECK-LABEL: vfmsac_vf_v4f16_commute:
175 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
176 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
177 ; CHECK-NEXT: vmv1r.v v8, v9
179 %elt.head = insertelement <4 x half> poison, half %b, i32 0
180 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
181 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
182 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %vb, <4 x half> %a, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
183 %u = call <4 x half> @llvm.vp.merge.v4f16(<4 x i1> %m, <4 x half> %v, <4 x half> %c, i32 %evl)
187 define <4 x half> @vfmsac_vf_v4f16_unmasked(<4 x half> %a, half %b, <4 x half> %c, i32 zeroext %evl) {
188 ; CHECK-LABEL: vfmsac_vf_v4f16_unmasked:
190 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
191 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
192 ; CHECK-NEXT: vmv1r.v v8, v9
194 %elt.head = insertelement <4 x half> poison, half %b, i32 0
195 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
196 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
197 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %a, <4 x half> %vb, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
198 %u = call <4 x half> @llvm.vp.merge.v4f16(<4 x i1> splat (i1 -1), <4 x half> %v, <4 x half> %c, i32 %evl)
202 define <4 x half> @vfmsac_vv_v4f16_ta(<4 x half> %a, <4 x half> %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
203 ; CHECK-LABEL: vfmsac_vv_v4f16_ta:
205 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
206 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
207 ; CHECK-NEXT: vmv1r.v v8, v10
209 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
210 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %a, <4 x half> %b, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
211 %u = call <4 x half> @llvm.vp.select.v4f16(<4 x i1> %m, <4 x half> %v, <4 x half> %c, i32 %evl)
215 define <4 x half> @vfmsac_vf_v4f16_ta(<4 x half> %a, half %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
216 ; CHECK-LABEL: vfmsac_vf_v4f16_ta:
218 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
219 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
220 ; CHECK-NEXT: vmv1r.v v8, v9
222 %elt.head = insertelement <4 x half> poison, half %b, i32 0
223 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
224 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
225 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %a, <4 x half> %vb, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
226 %u = call <4 x half> @llvm.vp.select.v4f16(<4 x i1> %m, <4 x half> %v, <4 x half> %c, i32 %evl)
230 define <4 x half> @vfmsac_vf_v4f16_commute_ta(<4 x half> %a, half %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
231 ; CHECK-LABEL: vfmsac_vf_v4f16_commute_ta:
233 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
234 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
235 ; CHECK-NEXT: vmv1r.v v8, v9
237 %elt.head = insertelement <4 x half> poison, half %b, i32 0
238 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
239 %negc = call <4 x half> @llvm.vp.fneg.v4f16(<4 x half> %c, <4 x i1> splat (i1 -1), i32 %evl)
240 %v = call <4 x half> @llvm.vp.fma.v4f16(<4 x half> %vb, <4 x half> %a, <4 x half> %negc, <4 x i1> splat (i1 -1), i32 %evl)
241 %u = call <4 x half> @llvm.vp.select.v4f16(<4 x i1> %m, <4 x half> %v, <4 x half> %c, i32 %evl)
245 declare <8 x half> @llvm.vp.fma.v8f16(<8 x half>, <8 x half>, <8 x half>, <8 x i1>, i32)
246 declare <8 x half> @llvm.vp.fneg.v8f16(<8 x half>, <8 x i1>, i32)
247 declare <8 x half> @llvm.vp.merge.v8f16(<8 x i1>, <8 x half>, <8 x half>, i32)
248 declare <8 x half> @llvm.vp.select.v8f16(<8 x i1>, <8 x half>, <8 x half>, i32)
250 define <8 x half> @vfmsac_vv_v8f16(<8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
251 ; CHECK-LABEL: vfmsac_vv_v8f16:
253 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
254 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
255 ; CHECK-NEXT: vmv1r.v v8, v10
257 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
258 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %a, <8 x half> %b, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
259 %u = call <8 x half> @llvm.vp.merge.v8f16(<8 x i1> %m, <8 x half> %v, <8 x half> %c, i32 %evl)
263 define <8 x half> @vfmsac_vv_v8f16_unmasked(<8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
264 ; CHECK-LABEL: vfmsac_vv_v8f16_unmasked:
266 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
267 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
268 ; CHECK-NEXT: vmv1r.v v8, v10
270 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
271 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %a, <8 x half> %b, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
272 %u = call <8 x half> @llvm.vp.merge.v8f16(<8 x i1> splat (i1 -1), <8 x half> %v, <8 x half> %c, i32 %evl)
276 define <8 x half> @vfmsac_vf_v8f16(<8 x half> %a, half %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
277 ; CHECK-LABEL: vfmsac_vf_v8f16:
279 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
280 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
281 ; CHECK-NEXT: vmv1r.v v8, v9
283 %elt.head = insertelement <8 x half> poison, half %b, i32 0
284 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
285 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
286 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %a, <8 x half> %vb, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
287 %u = call <8 x half> @llvm.vp.merge.v8f16(<8 x i1> %m, <8 x half> %v, <8 x half> %c, i32 %evl)
291 define <8 x half> @vfmsac_vf_v8f16_commute(<8 x half> %a, half %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
292 ; CHECK-LABEL: vfmsac_vf_v8f16_commute:
294 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
295 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
296 ; CHECK-NEXT: vmv1r.v v8, v9
298 %elt.head = insertelement <8 x half> poison, half %b, i32 0
299 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
300 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
301 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %vb, <8 x half> %a, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
302 %u = call <8 x half> @llvm.vp.merge.v8f16(<8 x i1> %m, <8 x half> %v, <8 x half> %c, i32 %evl)
306 define <8 x half> @vfmsac_vf_v8f16_unmasked(<8 x half> %a, half %b, <8 x half> %c, i32 zeroext %evl) {
307 ; CHECK-LABEL: vfmsac_vf_v8f16_unmasked:
309 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
310 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
311 ; CHECK-NEXT: vmv1r.v v8, v9
313 %elt.head = insertelement <8 x half> poison, half %b, i32 0
314 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
315 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
316 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %a, <8 x half> %vb, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
317 %u = call <8 x half> @llvm.vp.merge.v8f16(<8 x i1> splat (i1 -1), <8 x half> %v, <8 x half> %c, i32 %evl)
321 define <8 x half> @vfmsac_vv_v8f16_ta(<8 x half> %a, <8 x half> %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
322 ; CHECK-LABEL: vfmsac_vv_v8f16_ta:
324 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
325 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
326 ; CHECK-NEXT: vmv.v.v v8, v10
328 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
329 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %a, <8 x half> %b, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
330 %u = call <8 x half> @llvm.vp.select.v8f16(<8 x i1> %m, <8 x half> %v, <8 x half> %c, i32 %evl)
334 define <8 x half> @vfmsac_vf_v8f16_ta(<8 x half> %a, half %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
335 ; CHECK-LABEL: vfmsac_vf_v8f16_ta:
337 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
338 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
339 ; CHECK-NEXT: vmv.v.v v8, v9
341 %elt.head = insertelement <8 x half> poison, half %b, i32 0
342 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
343 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
344 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %a, <8 x half> %vb, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
345 %u = call <8 x half> @llvm.vp.select.v8f16(<8 x i1> %m, <8 x half> %v, <8 x half> %c, i32 %evl)
349 define <8 x half> @vfmsac_vf_v8f16_commute_ta(<8 x half> %a, half %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
350 ; CHECK-LABEL: vfmsac_vf_v8f16_commute_ta:
352 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
353 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
354 ; CHECK-NEXT: vmv.v.v v8, v9
356 %elt.head = insertelement <8 x half> poison, half %b, i32 0
357 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
358 %negc = call <8 x half> @llvm.vp.fneg.v8f16(<8 x half> %c, <8 x i1> splat (i1 -1), i32 %evl)
359 %v = call <8 x half> @llvm.vp.fma.v8f16(<8 x half> %vb, <8 x half> %a, <8 x half> %negc, <8 x i1> splat (i1 -1), i32 %evl)
360 %u = call <8 x half> @llvm.vp.select.v8f16(<8 x i1> %m, <8 x half> %v, <8 x half> %c, i32 %evl)
364 declare <16 x half> @llvm.vp.fma.v16f16(<16 x half>, <16 x half>, <16 x half>, <16 x i1>, i32)
365 declare <16 x half> @llvm.vp.fneg.v16f16(<16 x half>, <16 x i1>, i32)
366 declare <16 x half> @llvm.vp.merge.v16f16(<16 x i1>, <16 x half>, <16 x half>, i32)
367 declare <16 x half> @llvm.vp.select.v16f16(<16 x i1>, <16 x half>, <16 x half>, i32)
369 define <16 x half> @vfmsac_vv_v16f16(<16 x half> %a, <16 x half> %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
370 ; CHECK-LABEL: vfmsac_vv_v16f16:
372 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
373 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
374 ; CHECK-NEXT: vmv2r.v v8, v12
376 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
377 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %a, <16 x half> %b, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
378 %u = call <16 x half> @llvm.vp.merge.v16f16(<16 x i1> %m, <16 x half> %v, <16 x half> %c, i32 %evl)
382 define <16 x half> @vfmsac_vv_v16f16_unmasked(<16 x half> %a, <16 x half> %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
383 ; CHECK-LABEL: vfmsac_vv_v16f16_unmasked:
385 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
386 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
387 ; CHECK-NEXT: vmv2r.v v8, v12
389 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
390 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %a, <16 x half> %b, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
391 %u = call <16 x half> @llvm.vp.merge.v16f16(<16 x i1> splat (i1 -1), <16 x half> %v, <16 x half> %c, i32 %evl)
395 define <16 x half> @vfmsac_vf_v16f16(<16 x half> %a, half %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
396 ; CHECK-LABEL: vfmsac_vf_v16f16:
398 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
399 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
400 ; CHECK-NEXT: vmv2r.v v8, v10
402 %elt.head = insertelement <16 x half> poison, half %b, i32 0
403 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
404 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
405 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %a, <16 x half> %vb, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
406 %u = call <16 x half> @llvm.vp.merge.v16f16(<16 x i1> %m, <16 x half> %v, <16 x half> %c, i32 %evl)
410 define <16 x half> @vfmsac_vf_v16f16_commute(<16 x half> %a, half %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
411 ; CHECK-LABEL: vfmsac_vf_v16f16_commute:
413 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
414 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
415 ; CHECK-NEXT: vmv2r.v v8, v10
417 %elt.head = insertelement <16 x half> poison, half %b, i32 0
418 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
419 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
420 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %vb, <16 x half> %a, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
421 %u = call <16 x half> @llvm.vp.merge.v16f16(<16 x i1> %m, <16 x half> %v, <16 x half> %c, i32 %evl)
425 define <16 x half> @vfmsac_vf_v16f16_unmasked(<16 x half> %a, half %b, <16 x half> %c, i32 zeroext %evl) {
426 ; CHECK-LABEL: vfmsac_vf_v16f16_unmasked:
428 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
429 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
430 ; CHECK-NEXT: vmv2r.v v8, v10
432 %elt.head = insertelement <16 x half> poison, half %b, i32 0
433 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
434 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
435 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %a, <16 x half> %vb, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
436 %u = call <16 x half> @llvm.vp.merge.v16f16(<16 x i1> splat (i1 -1), <16 x half> %v, <16 x half> %c, i32 %evl)
440 define <16 x half> @vfmsac_vv_v16f16_ta(<16 x half> %a, <16 x half> %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
441 ; CHECK-LABEL: vfmsac_vv_v16f16_ta:
443 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
444 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
445 ; CHECK-NEXT: vmv.v.v v8, v12
447 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
448 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %a, <16 x half> %b, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
449 %u = call <16 x half> @llvm.vp.select.v16f16(<16 x i1> %m, <16 x half> %v, <16 x half> %c, i32 %evl)
453 define <16 x half> @vfmsac_vf_v16f16_ta(<16 x half> %a, half %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
454 ; CHECK-LABEL: vfmsac_vf_v16f16_ta:
456 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
457 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
458 ; CHECK-NEXT: vmv.v.v v8, v10
460 %elt.head = insertelement <16 x half> poison, half %b, i32 0
461 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
462 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
463 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %a, <16 x half> %vb, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
464 %u = call <16 x half> @llvm.vp.select.v16f16(<16 x i1> %m, <16 x half> %v, <16 x half> %c, i32 %evl)
468 define <16 x half> @vfmsac_vf_v16f16_commute_ta(<16 x half> %a, half %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
469 ; CHECK-LABEL: vfmsac_vf_v16f16_commute_ta:
471 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
472 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
473 ; CHECK-NEXT: vmv.v.v v8, v10
475 %elt.head = insertelement <16 x half> poison, half %b, i32 0
476 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
477 %negc = call <16 x half> @llvm.vp.fneg.v16f16(<16 x half> %c, <16 x i1> splat (i1 -1), i32 %evl)
478 %v = call <16 x half> @llvm.vp.fma.v16f16(<16 x half> %vb, <16 x half> %a, <16 x half> %negc, <16 x i1> splat (i1 -1), i32 %evl)
479 %u = call <16 x half> @llvm.vp.select.v16f16(<16 x i1> %m, <16 x half> %v, <16 x half> %c, i32 %evl)
483 declare <32 x half> @llvm.vp.fma.v32f16(<32 x half>, <32 x half>, <32 x half>, <32 x i1>, i32)
484 declare <32 x half> @llvm.vp.fneg.v32f16(<32 x half>, <32 x i1>, i32)
485 declare <32 x half> @llvm.vp.merge.v32f16(<32 x i1>, <32 x half>, <32 x half>, i32)
486 declare <32 x half> @llvm.vp.select.v32f16(<32 x i1>, <32 x half>, <32 x half>, i32)
488 define <32 x half> @vfmsac_vv_v32f16(<32 x half> %a, <32 x half> %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
489 ; CHECK-LABEL: vfmsac_vv_v32f16:
491 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
492 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
493 ; CHECK-NEXT: vmv4r.v v8, v16
495 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
496 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %a, <32 x half> %b, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
497 %u = call <32 x half> @llvm.vp.merge.v32f16(<32 x i1> %m, <32 x half> %v, <32 x half> %c, i32 %evl)
501 define <32 x half> @vfmsac_vv_v32f16_unmasked(<32 x half> %a, <32 x half> %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
502 ; CHECK-LABEL: vfmsac_vv_v32f16_unmasked:
504 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
505 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
506 ; CHECK-NEXT: vmv4r.v v8, v16
508 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
509 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %a, <32 x half> %b, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
510 %u = call <32 x half> @llvm.vp.merge.v32f16(<32 x i1> splat (i1 -1), <32 x half> %v, <32 x half> %c, i32 %evl)
514 define <32 x half> @vfmsac_vf_v32f16(<32 x half> %a, half %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
515 ; CHECK-LABEL: vfmsac_vf_v32f16:
517 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
518 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
519 ; CHECK-NEXT: vmv4r.v v8, v12
521 %elt.head = insertelement <32 x half> poison, half %b, i32 0
522 %vb = shufflevector <32 x half> %elt.head, <32 x half> poison, <32 x i32> zeroinitializer
523 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
524 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %a, <32 x half> %vb, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
525 %u = call <32 x half> @llvm.vp.merge.v32f16(<32 x i1> %m, <32 x half> %v, <32 x half> %c, i32 %evl)
529 define <32 x half> @vfmsac_vf_v32f16_commute(<32 x half> %a, half %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
530 ; CHECK-LABEL: vfmsac_vf_v32f16_commute:
532 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
533 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
534 ; CHECK-NEXT: vmv4r.v v8, v12
536 %elt.head = insertelement <32 x half> poison, half %b, i32 0
537 %vb = shufflevector <32 x half> %elt.head, <32 x half> poison, <32 x i32> zeroinitializer
538 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
539 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %vb, <32 x half> %a, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
540 %u = call <32 x half> @llvm.vp.merge.v32f16(<32 x i1> %m, <32 x half> %v, <32 x half> %c, i32 %evl)
544 define <32 x half> @vfmsac_vf_v32f16_unmasked(<32 x half> %a, half %b, <32 x half> %c, i32 zeroext %evl) {
545 ; CHECK-LABEL: vfmsac_vf_v32f16_unmasked:
547 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
548 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
549 ; CHECK-NEXT: vmv4r.v v8, v12
551 %elt.head = insertelement <32 x half> poison, half %b, i32 0
552 %vb = shufflevector <32 x half> %elt.head, <32 x half> poison, <32 x i32> zeroinitializer
553 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
554 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %a, <32 x half> %vb, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
555 %u = call <32 x half> @llvm.vp.merge.v32f16(<32 x i1> splat (i1 -1), <32 x half> %v, <32 x half> %c, i32 %evl)
559 define <32 x half> @vfmsac_vv_v32f16_ta(<32 x half> %a, <32 x half> %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
560 ; CHECK-LABEL: vfmsac_vv_v32f16_ta:
562 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
563 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
564 ; CHECK-NEXT: vmv.v.v v8, v16
566 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
567 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %a, <32 x half> %b, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
568 %u = call <32 x half> @llvm.vp.select.v32f16(<32 x i1> %m, <32 x half> %v, <32 x half> %c, i32 %evl)
572 define <32 x half> @vfmsac_vf_v32f16_ta(<32 x half> %a, half %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
573 ; CHECK-LABEL: vfmsac_vf_v32f16_ta:
575 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
576 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
577 ; CHECK-NEXT: vmv.v.v v8, v12
579 %elt.head = insertelement <32 x half> poison, half %b, i32 0
580 %vb = shufflevector <32 x half> %elt.head, <32 x half> poison, <32 x i32> zeroinitializer
581 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
582 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %a, <32 x half> %vb, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
583 %u = call <32 x half> @llvm.vp.select.v32f16(<32 x i1> %m, <32 x half> %v, <32 x half> %c, i32 %evl)
587 define <32 x half> @vfmsac_vf_v32f16_commute_ta(<32 x half> %a, half %b, <32 x half> %c, <32 x i1> %m, i32 zeroext %evl) {
588 ; CHECK-LABEL: vfmsac_vf_v32f16_commute_ta:
590 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
591 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
592 ; CHECK-NEXT: vmv.v.v v8, v12
594 %elt.head = insertelement <32 x half> poison, half %b, i32 0
595 %vb = shufflevector <32 x half> %elt.head, <32 x half> poison, <32 x i32> zeroinitializer
596 %negc = call <32 x half> @llvm.vp.fneg.v32f16(<32 x half> %c, <32 x i1> splat (i1 -1), i32 %evl)
597 %v = call <32 x half> @llvm.vp.fma.v32f16(<32 x half> %vb, <32 x half> %a, <32 x half> %negc, <32 x i1> splat (i1 -1), i32 %evl)
598 %u = call <32 x half> @llvm.vp.select.v32f16(<32 x i1> %m, <32 x half> %v, <32 x half> %c, i32 %evl)
602 declare <2 x float> @llvm.vp.fma.v2f32(<2 x float>, <2 x float>, <2 x float>, <2 x i1>, i32)
603 declare <2 x float> @llvm.vp.fneg.v2f32(<2 x float>, <2 x i1>, i32)
604 declare <2 x float> @llvm.vp.merge.v2f32(<2 x i1>, <2 x float>, <2 x float>, i32)
605 declare <2 x float> @llvm.vp.select.v2f32(<2 x i1>, <2 x float>, <2 x float>, i32)
607 define <2 x float> @vfmsac_vv_v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
608 ; CHECK-LABEL: vfmsac_vv_v2f32:
610 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
611 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
612 ; CHECK-NEXT: vmv1r.v v8, v10
614 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
615 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
616 %u = call <2 x float> @llvm.vp.merge.v2f32(<2 x i1> %m, <2 x float> %v, <2 x float> %c, i32 %evl)
620 define <2 x float> @vfmsac_vv_v2f32_unmasked(<2 x float> %a, <2 x float> %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
621 ; CHECK-LABEL: vfmsac_vv_v2f32_unmasked:
623 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
624 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
625 ; CHECK-NEXT: vmv1r.v v8, v10
627 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
628 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
629 %u = call <2 x float> @llvm.vp.merge.v2f32(<2 x i1> splat (i1 -1), <2 x float> %v, <2 x float> %c, i32 %evl)
633 define <2 x float> @vfmsac_vf_v2f32(<2 x float> %a, float %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
634 ; CHECK-LABEL: vfmsac_vf_v2f32:
636 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
637 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
638 ; CHECK-NEXT: vmv1r.v v8, v9
640 %elt.head = insertelement <2 x float> poison, float %b, i32 0
641 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
642 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
643 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %a, <2 x float> %vb, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
644 %u = call <2 x float> @llvm.vp.merge.v2f32(<2 x i1> %m, <2 x float> %v, <2 x float> %c, i32 %evl)
648 define <2 x float> @vfmsac_vf_v2f32_commute(<2 x float> %a, float %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
649 ; CHECK-LABEL: vfmsac_vf_v2f32_commute:
651 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
652 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
653 ; CHECK-NEXT: vmv1r.v v8, v9
655 %elt.head = insertelement <2 x float> poison, float %b, i32 0
656 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
657 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
658 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %vb, <2 x float> %a, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
659 %u = call <2 x float> @llvm.vp.merge.v2f32(<2 x i1> %m, <2 x float> %v, <2 x float> %c, i32 %evl)
663 define <2 x float> @vfmsac_vf_v2f32_unmasked(<2 x float> %a, float %b, <2 x float> %c, i32 zeroext %evl) {
664 ; CHECK-LABEL: vfmsac_vf_v2f32_unmasked:
666 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
667 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
668 ; CHECK-NEXT: vmv1r.v v8, v9
670 %elt.head = insertelement <2 x float> poison, float %b, i32 0
671 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
672 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
673 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %a, <2 x float> %vb, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
674 %u = call <2 x float> @llvm.vp.merge.v2f32(<2 x i1> splat (i1 -1), <2 x float> %v, <2 x float> %c, i32 %evl)
678 define <2 x float> @vfmsac_vv_v2f32_ta(<2 x float> %a, <2 x float> %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
679 ; CHECK-LABEL: vfmsac_vv_v2f32_ta:
681 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
682 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
683 ; CHECK-NEXT: vmv1r.v v8, v10
685 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
686 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %a, <2 x float> %b, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
687 %u = call <2 x float> @llvm.vp.select.v2f32(<2 x i1> %m, <2 x float> %v, <2 x float> %c, i32 %evl)
691 define <2 x float> @vfmsac_vf_v2f32_ta(<2 x float> %a, float %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
692 ; CHECK-LABEL: vfmsac_vf_v2f32_ta:
694 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
695 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
696 ; CHECK-NEXT: vmv1r.v v8, v9
698 %elt.head = insertelement <2 x float> poison, float %b, i32 0
699 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
700 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
701 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %a, <2 x float> %vb, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
702 %u = call <2 x float> @llvm.vp.select.v2f32(<2 x i1> %m, <2 x float> %v, <2 x float> %c, i32 %evl)
706 define <2 x float> @vfmsac_vf_v2f32_commute_ta(<2 x float> %a, float %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
707 ; CHECK-LABEL: vfmsac_vf_v2f32_commute_ta:
709 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
710 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
711 ; CHECK-NEXT: vmv1r.v v8, v9
713 %elt.head = insertelement <2 x float> poison, float %b, i32 0
714 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
715 %negc = call <2 x float> @llvm.vp.fneg.v2f32(<2 x float> %c, <2 x i1> splat (i1 -1), i32 %evl)
716 %v = call <2 x float> @llvm.vp.fma.v2f32(<2 x float> %vb, <2 x float> %a, <2 x float> %negc, <2 x i1> splat (i1 -1), i32 %evl)
717 %u = call <2 x float> @llvm.vp.select.v2f32(<2 x i1> %m, <2 x float> %v, <2 x float> %c, i32 %evl)
721 declare <4 x float> @llvm.vp.fma.v4f32(<4 x float>, <4 x float>, <4 x float>, <4 x i1>, i32)
722 declare <4 x float> @llvm.vp.fneg.v4f32(<4 x float>, <4 x i1>, i32)
723 declare <4 x float> @llvm.vp.merge.v4f32(<4 x i1>, <4 x float>, <4 x float>, i32)
724 declare <4 x float> @llvm.vp.select.v4f32(<4 x i1>, <4 x float>, <4 x float>, i32)
726 define <4 x float> @vfmsac_vv_v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
727 ; CHECK-LABEL: vfmsac_vv_v4f32:
729 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
730 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
731 ; CHECK-NEXT: vmv1r.v v8, v10
733 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
734 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
735 %u = call <4 x float> @llvm.vp.merge.v4f32(<4 x i1> %m, <4 x float> %v, <4 x float> %c, i32 %evl)
739 define <4 x float> @vfmsac_vv_v4f32_unmasked(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
740 ; CHECK-LABEL: vfmsac_vv_v4f32_unmasked:
742 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
743 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
744 ; CHECK-NEXT: vmv1r.v v8, v10
746 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
747 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
748 %u = call <4 x float> @llvm.vp.merge.v4f32(<4 x i1> splat (i1 -1), <4 x float> %v, <4 x float> %c, i32 %evl)
752 define <4 x float> @vfmsac_vf_v4f32(<4 x float> %a, float %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
753 ; CHECK-LABEL: vfmsac_vf_v4f32:
755 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
756 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
757 ; CHECK-NEXT: vmv1r.v v8, v9
759 %elt.head = insertelement <4 x float> poison, float %b, i32 0
760 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
761 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
762 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a, <4 x float> %vb, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
763 %u = call <4 x float> @llvm.vp.merge.v4f32(<4 x i1> %m, <4 x float> %v, <4 x float> %c, i32 %evl)
767 define <4 x float> @vfmsac_vf_v4f32_commute(<4 x float> %a, float %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
768 ; CHECK-LABEL: vfmsac_vf_v4f32_commute:
770 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
771 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
772 ; CHECK-NEXT: vmv1r.v v8, v9
774 %elt.head = insertelement <4 x float> poison, float %b, i32 0
775 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
776 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
777 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %vb, <4 x float> %a, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
778 %u = call <4 x float> @llvm.vp.merge.v4f32(<4 x i1> %m, <4 x float> %v, <4 x float> %c, i32 %evl)
782 define <4 x float> @vfmsac_vf_v4f32_unmasked(<4 x float> %a, float %b, <4 x float> %c, i32 zeroext %evl) {
783 ; CHECK-LABEL: vfmsac_vf_v4f32_unmasked:
785 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
786 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
787 ; CHECK-NEXT: vmv1r.v v8, v9
789 %elt.head = insertelement <4 x float> poison, float %b, i32 0
790 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
791 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
792 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a, <4 x float> %vb, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
793 %u = call <4 x float> @llvm.vp.merge.v4f32(<4 x i1> splat (i1 -1), <4 x float> %v, <4 x float> %c, i32 %evl)
797 define <4 x float> @vfmsac_vv_v4f32_ta(<4 x float> %a, <4 x float> %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
798 ; CHECK-LABEL: vfmsac_vv_v4f32_ta:
800 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
801 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
802 ; CHECK-NEXT: vmv.v.v v8, v10
804 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
805 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a, <4 x float> %b, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
806 %u = call <4 x float> @llvm.vp.select.v4f32(<4 x i1> %m, <4 x float> %v, <4 x float> %c, i32 %evl)
810 define <4 x float> @vfmsac_vf_v4f32_ta(<4 x float> %a, float %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
811 ; CHECK-LABEL: vfmsac_vf_v4f32_ta:
813 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
814 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
815 ; CHECK-NEXT: vmv.v.v v8, v9
817 %elt.head = insertelement <4 x float> poison, float %b, i32 0
818 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
819 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
820 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %a, <4 x float> %vb, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
821 %u = call <4 x float> @llvm.vp.select.v4f32(<4 x i1> %m, <4 x float> %v, <4 x float> %c, i32 %evl)
825 define <4 x float> @vfmsac_vf_v4f32_commute_ta(<4 x float> %a, float %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
826 ; CHECK-LABEL: vfmsac_vf_v4f32_commute_ta:
828 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
829 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
830 ; CHECK-NEXT: vmv.v.v v8, v9
832 %elt.head = insertelement <4 x float> poison, float %b, i32 0
833 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
834 %negc = call <4 x float> @llvm.vp.fneg.v4f32(<4 x float> %c, <4 x i1> splat (i1 -1), i32 %evl)
835 %v = call <4 x float> @llvm.vp.fma.v4f32(<4 x float> %vb, <4 x float> %a, <4 x float> %negc, <4 x i1> splat (i1 -1), i32 %evl)
836 %u = call <4 x float> @llvm.vp.select.v4f32(<4 x i1> %m, <4 x float> %v, <4 x float> %c, i32 %evl)
840 declare <8 x float> @llvm.vp.fma.v8f32(<8 x float>, <8 x float>, <8 x float>, <8 x i1>, i32)
841 declare <8 x float> @llvm.vp.fneg.v8f32(<8 x float>, <8 x i1>, i32)
842 declare <8 x float> @llvm.vp.merge.v8f32(<8 x i1>, <8 x float>, <8 x float>, i32)
843 declare <8 x float> @llvm.vp.select.v8f32(<8 x i1>, <8 x float>, <8 x float>, i32)
845 define <8 x float> @vfmsac_vv_v8f32(<8 x float> %a, <8 x float> %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
846 ; CHECK-LABEL: vfmsac_vv_v8f32:
848 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
849 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
850 ; CHECK-NEXT: vmv2r.v v8, v12
852 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
853 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %a, <8 x float> %b, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
854 %u = call <8 x float> @llvm.vp.merge.v8f32(<8 x i1> %m, <8 x float> %v, <8 x float> %c, i32 %evl)
858 define <8 x float> @vfmsac_vv_v8f32_unmasked(<8 x float> %a, <8 x float> %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
859 ; CHECK-LABEL: vfmsac_vv_v8f32_unmasked:
861 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
862 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
863 ; CHECK-NEXT: vmv2r.v v8, v12
865 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
866 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %a, <8 x float> %b, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
867 %u = call <8 x float> @llvm.vp.merge.v8f32(<8 x i1> splat (i1 -1), <8 x float> %v, <8 x float> %c, i32 %evl)
871 define <8 x float> @vfmsac_vf_v8f32(<8 x float> %a, float %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
872 ; CHECK-LABEL: vfmsac_vf_v8f32:
874 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
875 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
876 ; CHECK-NEXT: vmv2r.v v8, v10
878 %elt.head = insertelement <8 x float> poison, float %b, i32 0
879 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
880 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
881 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %a, <8 x float> %vb, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
882 %u = call <8 x float> @llvm.vp.merge.v8f32(<8 x i1> %m, <8 x float> %v, <8 x float> %c, i32 %evl)
886 define <8 x float> @vfmsac_vf_v8f32_commute(<8 x float> %a, float %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
887 ; CHECK-LABEL: vfmsac_vf_v8f32_commute:
889 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
890 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
891 ; CHECK-NEXT: vmv2r.v v8, v10
893 %elt.head = insertelement <8 x float> poison, float %b, i32 0
894 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
895 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
896 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %vb, <8 x float> %a, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
897 %u = call <8 x float> @llvm.vp.merge.v8f32(<8 x i1> %m, <8 x float> %v, <8 x float> %c, i32 %evl)
901 define <8 x float> @vfmsac_vf_v8f32_unmasked(<8 x float> %a, float %b, <8 x float> %c, i32 zeroext %evl) {
902 ; CHECK-LABEL: vfmsac_vf_v8f32_unmasked:
904 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
905 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
906 ; CHECK-NEXT: vmv2r.v v8, v10
908 %elt.head = insertelement <8 x float> poison, float %b, i32 0
909 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
910 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
911 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %a, <8 x float> %vb, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
912 %u = call <8 x float> @llvm.vp.merge.v8f32(<8 x i1> splat (i1 -1), <8 x float> %v, <8 x float> %c, i32 %evl)
916 define <8 x float> @vfmsac_vv_v8f32_ta(<8 x float> %a, <8 x float> %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
917 ; CHECK-LABEL: vfmsac_vv_v8f32_ta:
919 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
920 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
921 ; CHECK-NEXT: vmv.v.v v8, v12
923 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
924 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %a, <8 x float> %b, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
925 %u = call <8 x float> @llvm.vp.select.v8f32(<8 x i1> %m, <8 x float> %v, <8 x float> %c, i32 %evl)
929 define <8 x float> @vfmsac_vf_v8f32_ta(<8 x float> %a, float %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
930 ; CHECK-LABEL: vfmsac_vf_v8f32_ta:
932 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
933 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
934 ; CHECK-NEXT: vmv.v.v v8, v10
936 %elt.head = insertelement <8 x float> poison, float %b, i32 0
937 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
938 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
939 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %a, <8 x float> %vb, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
940 %u = call <8 x float> @llvm.vp.select.v8f32(<8 x i1> %m, <8 x float> %v, <8 x float> %c, i32 %evl)
944 define <8 x float> @vfmsac_vf_v8f32_commute_ta(<8 x float> %a, float %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
945 ; CHECK-LABEL: vfmsac_vf_v8f32_commute_ta:
947 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
948 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
949 ; CHECK-NEXT: vmv.v.v v8, v10
951 %elt.head = insertelement <8 x float> poison, float %b, i32 0
952 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
953 %negc = call <8 x float> @llvm.vp.fneg.v8f32(<8 x float> %c, <8 x i1> splat (i1 -1), i32 %evl)
954 %v = call <8 x float> @llvm.vp.fma.v8f32(<8 x float> %vb, <8 x float> %a, <8 x float> %negc, <8 x i1> splat (i1 -1), i32 %evl)
955 %u = call <8 x float> @llvm.vp.select.v8f32(<8 x i1> %m, <8 x float> %v, <8 x float> %c, i32 %evl)
959 declare <16 x float> @llvm.vp.fma.v16f32(<16 x float>, <16 x float>, <16 x float>, <16 x i1>, i32)
960 declare <16 x float> @llvm.vp.fneg.v16f32(<16 x float>, <16 x i1>, i32)
961 declare <16 x float> @llvm.vp.merge.v16f32(<16 x i1>, <16 x float>, <16 x float>, i32)
962 declare <16 x float> @llvm.vp.select.v16f32(<16 x i1>, <16 x float>, <16 x float>, i32)
964 define <16 x float> @vfmsac_vv_v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
965 ; CHECK-LABEL: vfmsac_vv_v16f32:
967 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
968 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
969 ; CHECK-NEXT: vmv4r.v v8, v16
971 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
972 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
973 %u = call <16 x float> @llvm.vp.merge.v16f32(<16 x i1> %m, <16 x float> %v, <16 x float> %c, i32 %evl)
977 define <16 x float> @vfmsac_vv_v16f32_unmasked(<16 x float> %a, <16 x float> %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
978 ; CHECK-LABEL: vfmsac_vv_v16f32_unmasked:
980 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
981 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
982 ; CHECK-NEXT: vmv4r.v v8, v16
984 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
985 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
986 %u = call <16 x float> @llvm.vp.merge.v16f32(<16 x i1> splat (i1 -1), <16 x float> %v, <16 x float> %c, i32 %evl)
990 define <16 x float> @vfmsac_vf_v16f32(<16 x float> %a, float %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
991 ; CHECK-LABEL: vfmsac_vf_v16f32:
993 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
994 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
995 ; CHECK-NEXT: vmv4r.v v8, v12
997 %elt.head = insertelement <16 x float> poison, float %b, i32 0
998 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
999 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
1000 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %a, <16 x float> %vb, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
1001 %u = call <16 x float> @llvm.vp.merge.v16f32(<16 x i1> %m, <16 x float> %v, <16 x float> %c, i32 %evl)
1005 define <16 x float> @vfmsac_vf_v16f32_commute(<16 x float> %a, float %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
1006 ; CHECK-LABEL: vfmsac_vf_v16f32_commute:
1008 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1009 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1010 ; CHECK-NEXT: vmv4r.v v8, v12
1012 %elt.head = insertelement <16 x float> poison, float %b, i32 0
1013 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
1014 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
1015 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %vb, <16 x float> %a, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
1016 %u = call <16 x float> @llvm.vp.merge.v16f32(<16 x i1> %m, <16 x float> %v, <16 x float> %c, i32 %evl)
1020 define <16 x float> @vfmsac_vf_v16f32_unmasked(<16 x float> %a, float %b, <16 x float> %c, i32 zeroext %evl) {
1021 ; CHECK-LABEL: vfmsac_vf_v16f32_unmasked:
1023 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1024 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
1025 ; CHECK-NEXT: vmv4r.v v8, v12
1027 %elt.head = insertelement <16 x float> poison, float %b, i32 0
1028 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
1029 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
1030 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %a, <16 x float> %vb, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
1031 %u = call <16 x float> @llvm.vp.merge.v16f32(<16 x i1> splat (i1 -1), <16 x float> %v, <16 x float> %c, i32 %evl)
1035 define <16 x float> @vfmsac_vv_v16f32_ta(<16 x float> %a, <16 x float> %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
1036 ; CHECK-LABEL: vfmsac_vv_v16f32_ta:
1038 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1039 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1040 ; CHECK-NEXT: vmv.v.v v8, v16
1042 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
1043 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %a, <16 x float> %b, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
1044 %u = call <16 x float> @llvm.vp.select.v16f32(<16 x i1> %m, <16 x float> %v, <16 x float> %c, i32 %evl)
1048 define <16 x float> @vfmsac_vf_v16f32_ta(<16 x float> %a, float %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
1049 ; CHECK-LABEL: vfmsac_vf_v16f32_ta:
1051 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1052 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1053 ; CHECK-NEXT: vmv.v.v v8, v12
1055 %elt.head = insertelement <16 x float> poison, float %b, i32 0
1056 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
1057 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
1058 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %a, <16 x float> %vb, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
1059 %u = call <16 x float> @llvm.vp.select.v16f32(<16 x i1> %m, <16 x float> %v, <16 x float> %c, i32 %evl)
1063 define <16 x float> @vfmsac_vf_v16f32_commute_ta(<16 x float> %a, float %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
1064 ; CHECK-LABEL: vfmsac_vf_v16f32_commute_ta:
1066 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1067 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1068 ; CHECK-NEXT: vmv.v.v v8, v12
1070 %elt.head = insertelement <16 x float> poison, float %b, i32 0
1071 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
1072 %negc = call <16 x float> @llvm.vp.fneg.v16f32(<16 x float> %c, <16 x i1> splat (i1 -1), i32 %evl)
1073 %v = call <16 x float> @llvm.vp.fma.v16f32(<16 x float> %vb, <16 x float> %a, <16 x float> %negc, <16 x i1> splat (i1 -1), i32 %evl)
1074 %u = call <16 x float> @llvm.vp.select.v16f32(<16 x i1> %m, <16 x float> %v, <16 x float> %c, i32 %evl)
1078 declare <2 x double> @llvm.vp.fma.v2f64(<2 x double>, <2 x double>, <2 x double>, <2 x i1>, i32)
1079 declare <2 x double> @llvm.vp.fneg.v2f64(<2 x double>, <2 x i1>, i32)
1080 declare <2 x double> @llvm.vp.merge.v2f64(<2 x i1>, <2 x double>, <2 x double>, i32)
1081 declare <2 x double> @llvm.vp.select.v2f64(<2 x i1>, <2 x double>, <2 x double>, i32)
1083 define <2 x double> @vfmsac_vv_v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1084 ; CHECK-LABEL: vfmsac_vv_v2f64:
1086 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1087 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1088 ; CHECK-NEXT: vmv1r.v v8, v10
1090 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1091 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1092 %u = call <2 x double> @llvm.vp.merge.v2f64(<2 x i1> %m, <2 x double> %v, <2 x double> %c, i32 %evl)
1096 define <2 x double> @vfmsac_vv_v2f64_unmasked(<2 x double> %a, <2 x double> %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1097 ; CHECK-LABEL: vfmsac_vv_v2f64_unmasked:
1099 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1100 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
1101 ; CHECK-NEXT: vmv1r.v v8, v10
1103 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1104 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1105 %u = call <2 x double> @llvm.vp.merge.v2f64(<2 x i1> splat (i1 -1), <2 x double> %v, <2 x double> %c, i32 %evl)
1109 define <2 x double> @vfmsac_vf_v2f64(<2 x double> %a, double %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1110 ; CHECK-LABEL: vfmsac_vf_v2f64:
1112 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1113 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1114 ; CHECK-NEXT: vmv1r.v v8, v9
1116 %elt.head = insertelement <2 x double> poison, double %b, i32 0
1117 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
1118 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1119 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %a, <2 x double> %vb, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1120 %u = call <2 x double> @llvm.vp.merge.v2f64(<2 x i1> %m, <2 x double> %v, <2 x double> %c, i32 %evl)
1124 define <2 x double> @vfmsac_vf_v2f64_commute(<2 x double> %a, double %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1125 ; CHECK-LABEL: vfmsac_vf_v2f64_commute:
1127 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1128 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1129 ; CHECK-NEXT: vmv1r.v v8, v9
1131 %elt.head = insertelement <2 x double> poison, double %b, i32 0
1132 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
1133 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1134 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %vb, <2 x double> %a, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1135 %u = call <2 x double> @llvm.vp.merge.v2f64(<2 x i1> %m, <2 x double> %v, <2 x double> %c, i32 %evl)
1139 define <2 x double> @vfmsac_vf_v2f64_unmasked(<2 x double> %a, double %b, <2 x double> %c, i32 zeroext %evl) {
1140 ; CHECK-LABEL: vfmsac_vf_v2f64_unmasked:
1142 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1143 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
1144 ; CHECK-NEXT: vmv1r.v v8, v9
1146 %elt.head = insertelement <2 x double> poison, double %b, i32 0
1147 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
1148 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1149 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %a, <2 x double> %vb, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1150 %u = call <2 x double> @llvm.vp.merge.v2f64(<2 x i1> splat (i1 -1), <2 x double> %v, <2 x double> %c, i32 %evl)
1154 define <2 x double> @vfmsac_vv_v2f64_ta(<2 x double> %a, <2 x double> %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1155 ; CHECK-LABEL: vfmsac_vv_v2f64_ta:
1157 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1158 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1159 ; CHECK-NEXT: vmv.v.v v8, v10
1161 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1162 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %a, <2 x double> %b, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1163 %u = call <2 x double> @llvm.vp.select.v2f64(<2 x i1> %m, <2 x double> %v, <2 x double> %c, i32 %evl)
1167 define <2 x double> @vfmsac_vf_v2f64_ta(<2 x double> %a, double %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1168 ; CHECK-LABEL: vfmsac_vf_v2f64_ta:
1170 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1171 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1172 ; CHECK-NEXT: vmv.v.v v8, v9
1174 %elt.head = insertelement <2 x double> poison, double %b, i32 0
1175 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
1176 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1177 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %a, <2 x double> %vb, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1178 %u = call <2 x double> @llvm.vp.select.v2f64(<2 x i1> %m, <2 x double> %v, <2 x double> %c, i32 %evl)
1182 define <2 x double> @vfmsac_vf_v2f64_commute_ta(<2 x double> %a, double %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
1183 ; CHECK-LABEL: vfmsac_vf_v2f64_commute_ta:
1185 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1186 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1187 ; CHECK-NEXT: vmv.v.v v8, v9
1189 %elt.head = insertelement <2 x double> poison, double %b, i32 0
1190 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
1191 %negc = call <2 x double> @llvm.vp.fneg.v2f64(<2 x double> %c, <2 x i1> splat (i1 -1), i32 %evl)
1192 %v = call <2 x double> @llvm.vp.fma.v2f64(<2 x double> %vb, <2 x double> %a, <2 x double> %negc, <2 x i1> splat (i1 -1), i32 %evl)
1193 %u = call <2 x double> @llvm.vp.select.v2f64(<2 x i1> %m, <2 x double> %v, <2 x double> %c, i32 %evl)
1197 declare <4 x double> @llvm.vp.fma.v4f64(<4 x double>, <4 x double>, <4 x double>, <4 x i1>, i32)
1198 declare <4 x double> @llvm.vp.fneg.v4f64(<4 x double>, <4 x i1>, i32)
1199 declare <4 x double> @llvm.vp.merge.v4f64(<4 x i1>, <4 x double>, <4 x double>, i32)
1200 declare <4 x double> @llvm.vp.select.v4f64(<4 x i1>, <4 x double>, <4 x double>, i32)
1202 define <4 x double> @vfmsac_vv_v4f64(<4 x double> %a, <4 x double> %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1203 ; CHECK-LABEL: vfmsac_vv_v4f64:
1205 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1206 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1207 ; CHECK-NEXT: vmv2r.v v8, v12
1209 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1210 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %a, <4 x double> %b, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1211 %u = call <4 x double> @llvm.vp.merge.v4f64(<4 x i1> %m, <4 x double> %v, <4 x double> %c, i32 %evl)
1215 define <4 x double> @vfmsac_vv_v4f64_unmasked(<4 x double> %a, <4 x double> %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1216 ; CHECK-LABEL: vfmsac_vv_v4f64_unmasked:
1218 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1219 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
1220 ; CHECK-NEXT: vmv2r.v v8, v12
1222 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1223 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %a, <4 x double> %b, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1224 %u = call <4 x double> @llvm.vp.merge.v4f64(<4 x i1> splat (i1 -1), <4 x double> %v, <4 x double> %c, i32 %evl)
1228 define <4 x double> @vfmsac_vf_v4f64(<4 x double> %a, double %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1229 ; CHECK-LABEL: vfmsac_vf_v4f64:
1231 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1232 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1233 ; CHECK-NEXT: vmv2r.v v8, v10
1235 %elt.head = insertelement <4 x double> poison, double %b, i32 0
1236 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
1237 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1238 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %a, <4 x double> %vb, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1239 %u = call <4 x double> @llvm.vp.merge.v4f64(<4 x i1> %m, <4 x double> %v, <4 x double> %c, i32 %evl)
1243 define <4 x double> @vfmsac_vf_v4f64_commute(<4 x double> %a, double %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1244 ; CHECK-LABEL: vfmsac_vf_v4f64_commute:
1246 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1247 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1248 ; CHECK-NEXT: vmv2r.v v8, v10
1250 %elt.head = insertelement <4 x double> poison, double %b, i32 0
1251 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
1252 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1253 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %vb, <4 x double> %a, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1254 %u = call <4 x double> @llvm.vp.merge.v4f64(<4 x i1> %m, <4 x double> %v, <4 x double> %c, i32 %evl)
1258 define <4 x double> @vfmsac_vf_v4f64_unmasked(<4 x double> %a, double %b, <4 x double> %c, i32 zeroext %evl) {
1259 ; CHECK-LABEL: vfmsac_vf_v4f64_unmasked:
1261 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1262 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
1263 ; CHECK-NEXT: vmv2r.v v8, v10
1265 %elt.head = insertelement <4 x double> poison, double %b, i32 0
1266 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
1267 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1268 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %a, <4 x double> %vb, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1269 %u = call <4 x double> @llvm.vp.merge.v4f64(<4 x i1> splat (i1 -1), <4 x double> %v, <4 x double> %c, i32 %evl)
1273 define <4 x double> @vfmsac_vv_v4f64_ta(<4 x double> %a, <4 x double> %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1274 ; CHECK-LABEL: vfmsac_vv_v4f64_ta:
1276 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1277 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1278 ; CHECK-NEXT: vmv.v.v v8, v12
1280 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1281 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %a, <4 x double> %b, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1282 %u = call <4 x double> @llvm.vp.select.v4f64(<4 x i1> %m, <4 x double> %v, <4 x double> %c, i32 %evl)
1286 define <4 x double> @vfmsac_vf_v4f64_ta(<4 x double> %a, double %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1287 ; CHECK-LABEL: vfmsac_vf_v4f64_ta:
1289 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1290 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1291 ; CHECK-NEXT: vmv.v.v v8, v10
1293 %elt.head = insertelement <4 x double> poison, double %b, i32 0
1294 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
1295 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1296 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %a, <4 x double> %vb, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1297 %u = call <4 x double> @llvm.vp.select.v4f64(<4 x i1> %m, <4 x double> %v, <4 x double> %c, i32 %evl)
1301 define <4 x double> @vfmsac_vf_v4f64_commute_ta(<4 x double> %a, double %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
1302 ; CHECK-LABEL: vfmsac_vf_v4f64_commute_ta:
1304 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1305 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1306 ; CHECK-NEXT: vmv.v.v v8, v10
1308 %elt.head = insertelement <4 x double> poison, double %b, i32 0
1309 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
1310 %negc = call <4 x double> @llvm.vp.fneg.v4f64(<4 x double> %c, <4 x i1> splat (i1 -1), i32 %evl)
1311 %v = call <4 x double> @llvm.vp.fma.v4f64(<4 x double> %vb, <4 x double> %a, <4 x double> %negc, <4 x i1> splat (i1 -1), i32 %evl)
1312 %u = call <4 x double> @llvm.vp.select.v4f64(<4 x i1> %m, <4 x double> %v, <4 x double> %c, i32 %evl)
1316 declare <8 x double> @llvm.vp.fma.v8f64(<8 x double>, <8 x double>, <8 x double>, <8 x i1>, i32)
1317 declare <8 x double> @llvm.vp.fneg.v8f64(<8 x double>, <8 x i1>, i32)
1318 declare <8 x double> @llvm.vp.merge.v8f64(<8 x i1>, <8 x double>, <8 x double>, i32)
1319 declare <8 x double> @llvm.vp.select.v8f64(<8 x i1>, <8 x double>, <8 x double>, i32)
1321 define <8 x double> @vfmsac_vv_v8f64(<8 x double> %a, <8 x double> %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1322 ; CHECK-LABEL: vfmsac_vv_v8f64:
1324 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1325 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1326 ; CHECK-NEXT: vmv4r.v v8, v16
1328 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1329 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %a, <8 x double> %b, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1330 %u = call <8 x double> @llvm.vp.merge.v8f64(<8 x i1> %m, <8 x double> %v, <8 x double> %c, i32 %evl)
1334 define <8 x double> @vfmsac_vv_v8f64_unmasked(<8 x double> %a, <8 x double> %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1335 ; CHECK-LABEL: vfmsac_vv_v8f64_unmasked:
1337 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1338 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
1339 ; CHECK-NEXT: vmv4r.v v8, v16
1341 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1342 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %a, <8 x double> %b, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1343 %u = call <8 x double> @llvm.vp.merge.v8f64(<8 x i1> splat (i1 -1), <8 x double> %v, <8 x double> %c, i32 %evl)
1347 define <8 x double> @vfmsac_vf_v8f64(<8 x double> %a, double %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1348 ; CHECK-LABEL: vfmsac_vf_v8f64:
1350 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1351 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1352 ; CHECK-NEXT: vmv4r.v v8, v12
1354 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1355 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1356 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1357 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %a, <8 x double> %vb, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1358 %u = call <8 x double> @llvm.vp.merge.v8f64(<8 x i1> %m, <8 x double> %v, <8 x double> %c, i32 %evl)
1362 define <8 x double> @vfmsac_vf_v8f64_commute(<8 x double> %a, double %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1363 ; CHECK-LABEL: vfmsac_vf_v8f64_commute:
1365 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1366 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1367 ; CHECK-NEXT: vmv4r.v v8, v12
1369 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1370 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1371 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1372 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %vb, <8 x double> %a, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1373 %u = call <8 x double> @llvm.vp.merge.v8f64(<8 x i1> %m, <8 x double> %v, <8 x double> %c, i32 %evl)
1377 define <8 x double> @vfmsac_vf_v8f64_unmasked(<8 x double> %a, double %b, <8 x double> %c, i32 zeroext %evl) {
1378 ; CHECK-LABEL: vfmsac_vf_v8f64_unmasked:
1380 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1381 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
1382 ; CHECK-NEXT: vmv4r.v v8, v12
1384 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1385 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1386 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1387 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %a, <8 x double> %vb, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1388 %u = call <8 x double> @llvm.vp.merge.v8f64(<8 x i1> splat (i1 -1), <8 x double> %v, <8 x double> %c, i32 %evl)
1392 define <8 x double> @vfmsac_vv_v8f64_ta(<8 x double> %a, <8 x double> %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1393 ; CHECK-LABEL: vfmsac_vv_v8f64_ta:
1395 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1396 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1397 ; CHECK-NEXT: vmv.v.v v8, v16
1399 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1400 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %a, <8 x double> %b, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1401 %u = call <8 x double> @llvm.vp.select.v8f64(<8 x i1> %m, <8 x double> %v, <8 x double> %c, i32 %evl)
1405 define <8 x double> @vfmsac_vf_v8f64_ta(<8 x double> %a, double %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1406 ; CHECK-LABEL: vfmsac_vf_v8f64_ta:
1408 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1409 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1410 ; CHECK-NEXT: vmv.v.v v8, v12
1412 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1413 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1414 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1415 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %a, <8 x double> %vb, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1416 %u = call <8 x double> @llvm.vp.select.v8f64(<8 x i1> %m, <8 x double> %v, <8 x double> %c, i32 %evl)
1420 define <8 x double> @vfmsac_vf_v8f64_commute_ta(<8 x double> %a, double %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
1421 ; CHECK-LABEL: vfmsac_vf_v8f64_commute_ta:
1423 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1424 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1425 ; CHECK-NEXT: vmv.v.v v8, v12
1427 %elt.head = insertelement <8 x double> poison, double %b, i32 0
1428 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
1429 %negc = call <8 x double> @llvm.vp.fneg.v8f64(<8 x double> %c, <8 x i1> splat (i1 -1), i32 %evl)
1430 %v = call <8 x double> @llvm.vp.fma.v8f64(<8 x double> %vb, <8 x double> %a, <8 x double> %negc, <8 x i1> splat (i1 -1), i32 %evl)
1431 %u = call <8 x double> @llvm.vp.select.v8f64(<8 x i1> %m, <8 x double> %v, <8 x double> %c, i32 %evl)