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 <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x i1>, i32)
8 declare <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half>, <vscale x 1 x i1>, i32)
9 declare <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1>, <vscale x 1 x half>, <vscale x 1 x half>, i32)
10 declare <vscale x 1 x half> @llvm.vp.select.nxv1f16(<vscale x 1 x i1>, <vscale x 1 x half>, <vscale x 1 x half>, i32)
12 define <vscale x 1 x half> @vmfsac_vv_nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
13 ; CHECK-LABEL: vmfsac_vv_nxv1f16:
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 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
20 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
21 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
22 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
23 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> %m, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
24 ret <vscale x 1 x half> %u
27 define <vscale x 1 x half> @vmfsac_vv_nxv1f16_unmasked(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
28 ; CHECK-LABEL: vmfsac_vv_nxv1f16_unmasked:
30 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
31 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
32 ; CHECK-NEXT: vmv1r.v v8, v10
34 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
35 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
36 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
37 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
38 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> %allones, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
39 ret <vscale x 1 x half> %u
42 define <vscale x 1 x half> @vmfsac_vf_nxv1f16(<vscale x 1 x half> %a, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
43 ; CHECK-LABEL: vmfsac_vf_nxv1f16:
45 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
46 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
47 ; CHECK-NEXT: vmv1r.v v8, v9
49 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
50 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
51 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
52 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
53 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
54 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %vb, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
55 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> %m, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
56 ret <vscale x 1 x half> %u
59 define <vscale x 1 x half> @vmfsac_vf_nxv1f16_commute(<vscale x 1 x half> %a, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
60 ; CHECK-LABEL: vmfsac_vf_nxv1f16_commute:
62 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
63 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
64 ; CHECK-NEXT: vmv1r.v v8, v9
66 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
67 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
68 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
69 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
70 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
71 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x half> %a, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
72 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> %m, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
73 ret <vscale x 1 x half> %u
76 define <vscale x 1 x half> @vmfsac_vf_nxv1f16_unmasked(<vscale x 1 x half> %a, half %b, <vscale x 1 x half> %c, i32 zeroext %evl) {
77 ; CHECK-LABEL: vmfsac_vf_nxv1f16_unmasked:
79 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
80 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
81 ; CHECK-NEXT: vmv1r.v v8, v9
83 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
84 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
85 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
86 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
87 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
88 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %vb, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
89 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> %allones, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
90 ret <vscale x 1 x half> %u
93 define <vscale x 1 x half> @vmfsac_vv_nxv1f16_ta(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
94 ; CHECK-LABEL: vmfsac_vv_nxv1f16_ta:
96 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
97 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
98 ; CHECK-NEXT: vmv1r.v v8, v10
100 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
101 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
102 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
103 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %b, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
104 %u = call <vscale x 1 x half> @llvm.vp.select.nxv1f16(<vscale x 1 x i1> %m, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
105 ret <vscale x 1 x half> %u
108 define <vscale x 1 x half> @vmfsac_vf_nxv1f16_ta(<vscale x 1 x half> %a, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
109 ; CHECK-LABEL: vmfsac_vf_nxv1f16_ta:
111 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
112 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
113 ; CHECK-NEXT: vmv1r.v v8, v9
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 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
118 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
119 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
120 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %a, <vscale x 1 x half> %vb, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
121 %u = call <vscale x 1 x half> @llvm.vp.select.nxv1f16(<vscale x 1 x i1> %m, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
122 ret <vscale x 1 x half> %u
125 define <vscale x 1 x half> @vmfsac_vf_nxv1f16_commute_ta(<vscale x 1 x half> %a, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
126 ; CHECK-LABEL: vmfsac_vf_nxv1f16_commute_ta:
128 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
129 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
130 ; CHECK-NEXT: vmv1r.v v8, v9
132 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
133 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
134 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
135 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
136 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> %allones, i32 %evl)
137 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x half> %a, <vscale x 1 x half> %negc, <vscale x 1 x i1> %allones, i32 %evl)
138 %u = call <vscale x 1 x half> @llvm.vp.select.nxv1f16(<vscale x 1 x i1> %m, <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
139 ret <vscale x 1 x half> %u
142 declare <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x i1>, i32)
143 declare <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
144 declare <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1>, <vscale x 2 x half>, <vscale x 2 x half>, i32)
145 declare <vscale x 2 x half> @llvm.vp.select.nxv2f16(<vscale x 2 x i1>, <vscale x 2 x half>, <vscale x 2 x half>, i32)
147 define <vscale x 2 x half> @vmfsac_vv_nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
148 ; CHECK-LABEL: vmfsac_vv_nxv2f16:
150 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
151 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
152 ; CHECK-NEXT: vmv1r.v v8, v10
154 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
155 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
156 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
157 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
158 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> %m, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
159 ret <vscale x 2 x half> %u
162 define <vscale x 2 x half> @vmfsac_vv_nxv2f16_unmasked(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
163 ; CHECK-LABEL: vmfsac_vv_nxv2f16_unmasked:
165 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
166 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
167 ; CHECK-NEXT: vmv1r.v v8, v10
169 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
170 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
171 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
172 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
173 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> %allones, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
174 ret <vscale x 2 x half> %u
177 define <vscale x 2 x half> @vmfsac_vf_nxv2f16(<vscale x 2 x half> %a, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
178 ; CHECK-LABEL: vmfsac_vf_nxv2f16:
180 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
181 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
182 ; CHECK-NEXT: vmv1r.v v8, v9
184 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
185 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
186 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
187 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
188 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
189 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %vb, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
190 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> %m, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
191 ret <vscale x 2 x half> %u
194 define <vscale x 2 x half> @vmfsac_vf_nxv2f16_commute(<vscale x 2 x half> %a, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
195 ; CHECK-LABEL: vmfsac_vf_nxv2f16_commute:
197 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
198 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
199 ; CHECK-NEXT: vmv1r.v v8, v9
201 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
202 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
203 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
204 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
205 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
206 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x half> %a, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
207 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> %m, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
208 ret <vscale x 2 x half> %u
211 define <vscale x 2 x half> @vmfsac_vf_nxv2f16_unmasked(<vscale x 2 x half> %a, half %b, <vscale x 2 x half> %c, i32 zeroext %evl) {
212 ; CHECK-LABEL: vmfsac_vf_nxv2f16_unmasked:
214 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
215 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
216 ; CHECK-NEXT: vmv1r.v v8, v9
218 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
219 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
220 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
221 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
222 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
223 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %vb, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
224 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> %allones, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
225 ret <vscale x 2 x half> %u
228 define <vscale x 2 x half> @vmfsac_vv_nxv2f16_ta(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
229 ; CHECK-LABEL: vmfsac_vv_nxv2f16_ta:
231 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
232 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
233 ; CHECK-NEXT: vmv1r.v v8, v10
235 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
236 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
237 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
238 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %b, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
239 %u = call <vscale x 2 x half> @llvm.vp.select.nxv2f16(<vscale x 2 x i1> %m, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
240 ret <vscale x 2 x half> %u
243 define <vscale x 2 x half> @vmfsac_vf_nxv2f16_ta(<vscale x 2 x half> %a, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
244 ; CHECK-LABEL: vmfsac_vf_nxv2f16_ta:
246 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
247 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
248 ; CHECK-NEXT: vmv1r.v v8, v9
250 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
251 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
252 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
253 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
254 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
255 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %a, <vscale x 2 x half> %vb, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
256 %u = call <vscale x 2 x half> @llvm.vp.select.nxv2f16(<vscale x 2 x i1> %m, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
257 ret <vscale x 2 x half> %u
260 define <vscale x 2 x half> @vmfsac_vf_nxv2f16_commute_ta(<vscale x 2 x half> %a, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
261 ; CHECK-LABEL: vmfsac_vf_nxv2f16_commute_ta:
263 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
264 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
265 ; CHECK-NEXT: vmv1r.v v8, v9
267 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
268 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
269 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
270 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
271 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> %allones, i32 %evl)
272 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x half> %a, <vscale x 2 x half> %negc, <vscale x 2 x i1> %allones, i32 %evl)
273 %u = call <vscale x 2 x half> @llvm.vp.select.nxv2f16(<vscale x 2 x i1> %m, <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
274 ret <vscale x 2 x half> %u
277 declare <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x i1>, i32)
278 declare <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
279 declare <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1>, <vscale x 4 x half>, <vscale x 4 x half>, i32)
280 declare <vscale x 4 x half> @llvm.vp.select.nxv4f16(<vscale x 4 x i1>, <vscale x 4 x half>, <vscale x 4 x half>, i32)
282 define <vscale x 4 x half> @vmfsac_vv_nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
283 ; CHECK-LABEL: vmfsac_vv_nxv4f16:
285 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
286 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
287 ; CHECK-NEXT: vmv1r.v v8, v10
289 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
290 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
291 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
292 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
293 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> %m, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
294 ret <vscale x 4 x half> %u
297 define <vscale x 4 x half> @vmfsac_vv_nxv4f16_unmasked(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
298 ; CHECK-LABEL: vmfsac_vv_nxv4f16_unmasked:
300 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
301 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
302 ; CHECK-NEXT: vmv1r.v v8, v10
304 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
305 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
306 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
307 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
308 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> %allones, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
309 ret <vscale x 4 x half> %u
312 define <vscale x 4 x half> @vmfsac_vf_nxv4f16(<vscale x 4 x half> %a, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
313 ; CHECK-LABEL: vmfsac_vf_nxv4f16:
315 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
316 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
317 ; CHECK-NEXT: vmv1r.v v8, v9
319 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
320 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
321 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
322 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
323 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
324 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %vb, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
325 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> %m, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
326 ret <vscale x 4 x half> %u
329 define <vscale x 4 x half> @vmfsac_vf_nxv4f16_commute(<vscale x 4 x half> %a, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
330 ; CHECK-LABEL: vmfsac_vf_nxv4f16_commute:
332 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
333 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
334 ; CHECK-NEXT: vmv1r.v v8, v9
336 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
337 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
338 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
339 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
340 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
341 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x half> %a, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
342 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> %m, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
343 ret <vscale x 4 x half> %u
346 define <vscale x 4 x half> @vmfsac_vf_nxv4f16_unmasked(<vscale x 4 x half> %a, half %b, <vscale x 4 x half> %c, i32 zeroext %evl) {
347 ; CHECK-LABEL: vmfsac_vf_nxv4f16_unmasked:
349 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
350 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
351 ; CHECK-NEXT: vmv1r.v v8, v9
353 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
354 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
355 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
356 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
357 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
358 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %vb, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
359 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> %allones, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
360 ret <vscale x 4 x half> %u
363 define <vscale x 4 x half> @vmfsac_vv_nxv4f16_ta(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
364 ; CHECK-LABEL: vmfsac_vv_nxv4f16_ta:
366 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
367 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
368 ; CHECK-NEXT: vmv.v.v v8, v10
370 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
371 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
372 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
373 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
374 %u = call <vscale x 4 x half> @llvm.vp.select.nxv4f16(<vscale x 4 x i1> %m, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
375 ret <vscale x 4 x half> %u
378 define <vscale x 4 x half> @vmfsac_vf_nxv4f16_ta(<vscale x 4 x half> %a, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
379 ; CHECK-LABEL: vmfsac_vf_nxv4f16_ta:
381 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
382 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
383 ; CHECK-NEXT: vmv.v.v v8, v9
385 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
386 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
387 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
388 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
389 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
390 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %vb, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
391 %u = call <vscale x 4 x half> @llvm.vp.select.nxv4f16(<vscale x 4 x i1> %m, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
392 ret <vscale x 4 x half> %u
395 define <vscale x 4 x half> @vmfsac_vf_nxv4f16_commute_ta(<vscale x 4 x half> %a, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
396 ; CHECK-LABEL: vmfsac_vf_nxv4f16_commute_ta:
398 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
399 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
400 ; CHECK-NEXT: vmv.v.v v8, v9
402 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
403 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
404 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
405 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
406 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> %allones, i32 %evl)
407 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x half> %a, <vscale x 4 x half> %negc, <vscale x 4 x i1> %allones, i32 %evl)
408 %u = call <vscale x 4 x half> @llvm.vp.select.nxv4f16(<vscale x 4 x i1> %m, <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
409 ret <vscale x 4 x half> %u
412 declare <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, i32)
413 declare <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
414 declare <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>, i32)
415 declare <vscale x 8 x half> @llvm.vp.select.nxv8f16(<vscale x 8 x i1>, <vscale x 8 x half>, <vscale x 8 x half>, i32)
417 define <vscale x 8 x half> @vmfsac_vv_nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
418 ; CHECK-LABEL: vmfsac_vv_nxv8f16:
420 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
421 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
422 ; CHECK-NEXT: vmv2r.v v8, v12
424 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
425 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
426 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
427 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
428 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> %m, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
429 ret <vscale x 8 x half> %u
432 define <vscale x 8 x half> @vmfsac_vv_nxv8f16_unmasked(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
433 ; CHECK-LABEL: vmfsac_vv_nxv8f16_unmasked:
435 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
436 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
437 ; CHECK-NEXT: vmv2r.v v8, v12
439 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
440 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
441 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
442 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
443 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> %allones, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
444 ret <vscale x 8 x half> %u
447 define <vscale x 8 x half> @vmfsac_vf_nxv8f16(<vscale x 8 x half> %a, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
448 ; CHECK-LABEL: vmfsac_vf_nxv8f16:
450 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
451 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
452 ; CHECK-NEXT: vmv2r.v v8, v10
454 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
455 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
456 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
457 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
458 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
459 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %vb, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
460 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> %m, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
461 ret <vscale x 8 x half> %u
464 define <vscale x 8 x half> @vmfsac_vf_nxv8f16_commute(<vscale x 8 x half> %a, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
465 ; CHECK-LABEL: vmfsac_vf_nxv8f16_commute:
467 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
468 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
469 ; CHECK-NEXT: vmv2r.v v8, v10
471 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
472 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
473 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
474 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
475 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
476 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %a, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
477 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> %m, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
478 ret <vscale x 8 x half> %u
481 define <vscale x 8 x half> @vmfsac_vf_nxv8f16_unmasked(<vscale x 8 x half> %a, half %b, <vscale x 8 x half> %c, i32 zeroext %evl) {
482 ; CHECK-LABEL: vmfsac_vf_nxv8f16_unmasked:
484 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
485 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
486 ; CHECK-NEXT: vmv2r.v v8, v10
488 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
489 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
490 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
491 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
492 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
493 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %vb, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
494 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> %allones, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
495 ret <vscale x 8 x half> %u
498 define <vscale x 8 x half> @vmfsac_vv_nxv8f16_ta(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
499 ; CHECK-LABEL: vmfsac_vv_nxv8f16_ta:
501 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
502 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
503 ; CHECK-NEXT: vmv.v.v v8, v12
505 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
506 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
507 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
508 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %b, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
509 %u = call <vscale x 8 x half> @llvm.vp.select.nxv8f16(<vscale x 8 x i1> %m, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
510 ret <vscale x 8 x half> %u
513 define <vscale x 8 x half> @vmfsac_vf_nxv8f16_ta(<vscale x 8 x half> %a, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
514 ; CHECK-LABEL: vmfsac_vf_nxv8f16_ta:
516 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
517 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
518 ; CHECK-NEXT: vmv.v.v v8, v10
520 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
521 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
522 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
523 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
524 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
525 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %a, <vscale x 8 x half> %vb, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
526 %u = call <vscale x 8 x half> @llvm.vp.select.nxv8f16(<vscale x 8 x i1> %m, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
527 ret <vscale x 8 x half> %u
530 define <vscale x 8 x half> @vmfsac_vf_nxv8f16_commute_ta(<vscale x 8 x half> %a, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
531 ; CHECK-LABEL: vmfsac_vf_nxv8f16_commute_ta:
533 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
534 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
535 ; CHECK-NEXT: vmv.v.v v8, v10
537 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
538 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
539 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
540 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
541 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> %allones, i32 %evl)
542 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %a, <vscale x 8 x half> %negc, <vscale x 8 x i1> %allones, i32 %evl)
543 %u = call <vscale x 8 x half> @llvm.vp.select.nxv8f16(<vscale x 8 x i1> %m, <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
544 ret <vscale x 8 x half> %u
547 declare <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x i1>, i32)
548 declare <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half>, <vscale x 16 x i1>, i32)
549 declare <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1>, <vscale x 16 x half>, <vscale x 16 x half>, i32)
550 declare <vscale x 16 x half> @llvm.vp.select.nxv16f16(<vscale x 16 x i1>, <vscale x 16 x half>, <vscale x 16 x half>, i32)
552 define <vscale x 16 x half> @vmfsac_vv_nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
553 ; CHECK-LABEL: vmfsac_vv_nxv16f16:
555 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
556 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
557 ; CHECK-NEXT: vmv4r.v v8, v16
559 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
560 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
561 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
562 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
563 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> %m, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
564 ret <vscale x 16 x half> %u
567 define <vscale x 16 x half> @vmfsac_vv_nxv16f16_unmasked(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
568 ; CHECK-LABEL: vmfsac_vv_nxv16f16_unmasked:
570 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
571 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
572 ; CHECK-NEXT: vmv4r.v v8, v16
574 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
575 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
576 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
577 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
578 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> %allones, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
579 ret <vscale x 16 x half> %u
582 define <vscale x 16 x half> @vmfsac_vf_nxv16f16(<vscale x 16 x half> %a, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
583 ; CHECK-LABEL: vmfsac_vf_nxv16f16:
585 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
586 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
587 ; CHECK-NEXT: vmv4r.v v8, v12
589 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
590 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
591 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
592 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
593 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
594 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %vb, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
595 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> %m, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
596 ret <vscale x 16 x half> %u
599 define <vscale x 16 x half> @vmfsac_vf_nxv16f16_commute(<vscale x 16 x half> %a, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
600 ; CHECK-LABEL: vmfsac_vf_nxv16f16_commute:
602 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
603 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
604 ; CHECK-NEXT: vmv4r.v v8, v12
606 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
607 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
608 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
609 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
610 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
611 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x half> %a, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
612 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> %m, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
613 ret <vscale x 16 x half> %u
616 define <vscale x 16 x half> @vmfsac_vf_nxv16f16_unmasked(<vscale x 16 x half> %a, half %b, <vscale x 16 x half> %c, i32 zeroext %evl) {
617 ; CHECK-LABEL: vmfsac_vf_nxv16f16_unmasked:
619 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
620 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
621 ; CHECK-NEXT: vmv4r.v v8, v12
623 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
624 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
625 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
626 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
627 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
628 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %vb, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
629 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> %allones, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
630 ret <vscale x 16 x half> %u
633 define <vscale x 16 x half> @vmfsac_vv_nxv16f16_ta(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
634 ; CHECK-LABEL: vmfsac_vv_nxv16f16_ta:
636 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
637 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
638 ; CHECK-NEXT: vmv.v.v v8, v16
640 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
641 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
642 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
643 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %b, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
644 %u = call <vscale x 16 x half> @llvm.vp.select.nxv16f16(<vscale x 16 x i1> %m, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
645 ret <vscale x 16 x half> %u
648 define <vscale x 16 x half> @vmfsac_vf_nxv16f16_ta(<vscale x 16 x half> %a, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
649 ; CHECK-LABEL: vmfsac_vf_nxv16f16_ta:
651 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
652 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
653 ; CHECK-NEXT: vmv.v.v v8, v12
655 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
656 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
657 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
658 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
659 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
660 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %a, <vscale x 16 x half> %vb, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
661 %u = call <vscale x 16 x half> @llvm.vp.select.nxv16f16(<vscale x 16 x i1> %m, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
662 ret <vscale x 16 x half> %u
665 define <vscale x 16 x half> @vmfsac_vf_nxv16f16_commute_ta(<vscale x 16 x half> %a, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
666 ; CHECK-LABEL: vmfsac_vf_nxv16f16_commute_ta:
668 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
669 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
670 ; CHECK-NEXT: vmv.v.v v8, v12
672 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
673 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
674 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
675 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
676 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> %allones, i32 %evl)
677 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x half> %a, <vscale x 16 x half> %negc, <vscale x 16 x i1> %allones, i32 %evl)
678 %u = call <vscale x 16 x half> @llvm.vp.select.nxv16f16(<vscale x 16 x i1> %m, <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
679 ret <vscale x 16 x half> %u
682 declare <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x i1>, i32)
683 declare <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half>, <vscale x 32 x i1>, i32)
684 declare <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1>, <vscale x 32 x half>, <vscale x 32 x half>, i32)
685 declare <vscale x 32 x half> @llvm.vp.select.nxv32f16(<vscale x 32 x i1>, <vscale x 32 x half>, <vscale x 32 x half>, i32)
687 define <vscale x 32 x half> @vmfsac_vv_nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
688 ; CHECK-LABEL: vmfsac_vv_nxv32f16:
690 ; CHECK-NEXT: vl8re16.v v24, (a0)
691 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, tu, mu
692 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
693 ; CHECK-NEXT: vmv8r.v v8, v24
695 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
696 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
697 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
698 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
699 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> %m, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
700 ret <vscale x 32 x half> %u
703 define <vscale x 32 x half> @vmfsac_vv_nxv32f16_unmasked(<vscale x 32 x half> %a, <vscale x 32 x half> %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
704 ; CHECK-LABEL: vmfsac_vv_nxv32f16_unmasked:
706 ; CHECK-NEXT: vl8re16.v v24, (a0)
707 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, tu, ma
708 ; CHECK-NEXT: vfmsac.vv v24, v8, v16
709 ; CHECK-NEXT: vmv8r.v v8, v24
711 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
712 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
713 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
714 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
715 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> %allones, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
716 ret <vscale x 32 x half> %u
719 define <vscale x 32 x half> @vmfsac_vf_nxv32f16(<vscale x 32 x half> %a, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
720 ; CHECK-LABEL: vmfsac_vf_nxv32f16:
722 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, mu
723 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
724 ; CHECK-NEXT: vmv8r.v v8, v16
726 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
727 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
728 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
729 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
730 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
731 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %vb, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
732 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> %m, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
733 ret <vscale x 32 x half> %u
736 define <vscale x 32 x half> @vmfsac_vf_nxv32f16_commute(<vscale x 32 x half> %a, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
737 ; CHECK-LABEL: vmfsac_vf_nxv32f16_commute:
739 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, mu
740 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
741 ; CHECK-NEXT: vmv8r.v v8, v16
743 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
744 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
745 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
746 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
747 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
748 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %vb, <vscale x 32 x half> %a, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
749 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> %m, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
750 ret <vscale x 32 x half> %u
753 define <vscale x 32 x half> @vmfsac_vf_nxv32f16_unmasked(<vscale x 32 x half> %a, half %b, <vscale x 32 x half> %c, i32 zeroext %evl) {
754 ; CHECK-LABEL: vmfsac_vf_nxv32f16_unmasked:
756 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, ma
757 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8
758 ; CHECK-NEXT: vmv8r.v v8, v16
760 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
761 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
762 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
763 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
764 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
765 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %vb, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
766 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> %allones, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
767 ret <vscale x 32 x half> %u
770 define <vscale x 32 x half> @vmfsac_vv_nxv32f16_ta(<vscale x 32 x half> %a, <vscale x 32 x half> %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
771 ; CHECK-LABEL: vmfsac_vv_nxv32f16_ta:
773 ; CHECK-NEXT: vl8re16.v v24, (a0)
774 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, mu
775 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
776 ; CHECK-NEXT: vmv.v.v v8, v24
778 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
779 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
780 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
781 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %b, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
782 %u = call <vscale x 32 x half> @llvm.vp.select.nxv32f16(<vscale x 32 x i1> %m, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
783 ret <vscale x 32 x half> %u
786 define <vscale x 32 x half> @vmfsac_vf_nxv32f16_ta(<vscale x 32 x half> %a, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
787 ; CHECK-LABEL: vmfsac_vf_nxv32f16_ta:
789 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
790 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
791 ; CHECK-NEXT: vmv.v.v v8, v16
793 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
794 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
795 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
796 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
797 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
798 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %a, <vscale x 32 x half> %vb, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
799 %u = call <vscale x 32 x half> @llvm.vp.select.nxv32f16(<vscale x 32 x i1> %m, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
800 ret <vscale x 32 x half> %u
803 define <vscale x 32 x half> @vmfsac_vf_nxv32f16_commute_ta(<vscale x 32 x half> %a, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
804 ; CHECK-LABEL: vmfsac_vf_nxv32f16_commute_ta:
806 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
807 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
808 ; CHECK-NEXT: vmv.v.v v8, v16
810 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
811 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
812 %splat = insertelement <vscale x 32 x i1> poison, i1 -1, i32 0
813 %allones = shufflevector <vscale x 32 x i1> %splat, <vscale x 32 x i1> poison, <vscale x 32 x i32> zeroinitializer
814 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> %allones, i32 %evl)
815 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %vb, <vscale x 32 x half> %a, <vscale x 32 x half> %negc, <vscale x 32 x i1> %allones, i32 %evl)
816 %u = call <vscale x 32 x half> @llvm.vp.select.nxv32f16(<vscale x 32 x i1> %m, <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
817 ret <vscale x 32 x half> %u
820 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)
821 declare <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
822 declare <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1>, <vscale x 1 x float>, <vscale x 1 x float>, i32)
823 declare <vscale x 1 x float> @llvm.vp.select.nxv1f32(<vscale x 1 x i1>, <vscale x 1 x float>, <vscale x 1 x float>, i32)
825 define <vscale x 1 x float> @vmfsac_vv_nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
826 ; CHECK-LABEL: vmfsac_vv_nxv1f32:
828 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
829 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
830 ; CHECK-NEXT: vmv1r.v v8, v10
832 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
833 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
834 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
835 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
836 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> %m, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
837 ret <vscale x 1 x float> %u
840 define <vscale x 1 x float> @vmfsac_vv_nxv1f32_unmasked(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
841 ; CHECK-LABEL: vmfsac_vv_nxv1f32_unmasked:
843 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
844 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
845 ; CHECK-NEXT: vmv1r.v v8, v10
847 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
848 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
849 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
850 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
851 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> %allones, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
852 ret <vscale x 1 x float> %u
855 define <vscale x 1 x float> @vmfsac_vf_nxv1f32(<vscale x 1 x float> %a, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
856 ; CHECK-LABEL: vmfsac_vf_nxv1f32:
858 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
859 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
860 ; CHECK-NEXT: vmv1r.v v8, v9
862 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
863 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
864 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
865 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
866 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
867 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %vb, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
868 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> %m, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
869 ret <vscale x 1 x float> %u
872 define <vscale x 1 x float> @vmfsac_vf_nxv1f32_commute(<vscale x 1 x float> %a, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
873 ; CHECK-LABEL: vmfsac_vf_nxv1f32_commute:
875 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
876 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
877 ; CHECK-NEXT: vmv1r.v v8, v9
879 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
880 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
881 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
882 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
883 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
884 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x float> %a, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
885 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> %m, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
886 ret <vscale x 1 x float> %u
889 define <vscale x 1 x float> @vmfsac_vf_nxv1f32_unmasked(<vscale x 1 x float> %a, float %b, <vscale x 1 x float> %c, i32 zeroext %evl) {
890 ; CHECK-LABEL: vmfsac_vf_nxv1f32_unmasked:
892 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
893 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
894 ; CHECK-NEXT: vmv1r.v v8, v9
896 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
897 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
898 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
899 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
900 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
901 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %vb, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
902 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> %allones, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
903 ret <vscale x 1 x float> %u
906 define <vscale x 1 x float> @vmfsac_vv_nxv1f32_ta(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
907 ; CHECK-LABEL: vmfsac_vv_nxv1f32_ta:
909 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
910 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
911 ; CHECK-NEXT: vmv1r.v v8, v10
913 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
914 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
915 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
916 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %b, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
917 %u = call <vscale x 1 x float> @llvm.vp.select.nxv1f32(<vscale x 1 x i1> %m, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
918 ret <vscale x 1 x float> %u
921 define <vscale x 1 x float> @vmfsac_vf_nxv1f32_ta(<vscale x 1 x float> %a, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
922 ; CHECK-LABEL: vmfsac_vf_nxv1f32_ta:
924 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
925 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
926 ; CHECK-NEXT: vmv1r.v v8, v9
928 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
929 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
930 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
931 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
932 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
933 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %a, <vscale x 1 x float> %vb, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
934 %u = call <vscale x 1 x float> @llvm.vp.select.nxv1f32(<vscale x 1 x i1> %m, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
935 ret <vscale x 1 x float> %u
938 define <vscale x 1 x float> @vmfsac_vf_nxv1f32_commute_ta(<vscale x 1 x float> %a, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
939 ; CHECK-LABEL: vmfsac_vf_nxv1f32_commute_ta:
941 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
942 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
943 ; CHECK-NEXT: vmv1r.v v8, v9
945 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
946 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
947 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
948 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
949 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> %allones, i32 %evl)
950 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x float> %a, <vscale x 1 x float> %negc, <vscale x 1 x i1> %allones, i32 %evl)
951 %u = call <vscale x 1 x float> @llvm.vp.select.nxv1f32(<vscale x 1 x i1> %m, <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
952 ret <vscale x 1 x float> %u
955 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)
956 declare <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
957 declare <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1>, <vscale x 2 x float>, <vscale x 2 x float>, i32)
958 declare <vscale x 2 x float> @llvm.vp.select.nxv2f32(<vscale x 2 x i1>, <vscale x 2 x float>, <vscale x 2 x float>, i32)
960 define <vscale x 2 x float> @vmfsac_vv_nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
961 ; CHECK-LABEL: vmfsac_vv_nxv2f32:
963 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
964 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
965 ; CHECK-NEXT: vmv1r.v v8, v10
967 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
968 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
969 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
970 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
971 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> %m, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
972 ret <vscale x 2 x float> %u
975 define <vscale x 2 x float> @vmfsac_vv_nxv2f32_unmasked(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
976 ; CHECK-LABEL: vmfsac_vv_nxv2f32_unmasked:
978 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
979 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
980 ; CHECK-NEXT: vmv1r.v v8, v10
982 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
983 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
984 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
985 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
986 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> %allones, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
987 ret <vscale x 2 x float> %u
990 define <vscale x 2 x float> @vmfsac_vf_nxv2f32(<vscale x 2 x float> %a, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
991 ; CHECK-LABEL: vmfsac_vf_nxv2f32:
993 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
994 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
995 ; CHECK-NEXT: vmv1r.v v8, v9
997 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
998 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
999 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1000 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1001 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
1002 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %vb, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1003 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> %m, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
1004 ret <vscale x 2 x float> %u
1007 define <vscale x 2 x float> @vmfsac_vf_nxv2f32_commute(<vscale x 2 x float> %a, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1008 ; CHECK-LABEL: vmfsac_vf_nxv2f32_commute:
1010 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
1011 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1012 ; CHECK-NEXT: vmv1r.v v8, v9
1014 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
1015 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1016 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1017 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1018 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
1019 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x float> %a, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1020 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> %m, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
1021 ret <vscale x 2 x float> %u
1024 define <vscale x 2 x float> @vmfsac_vf_nxv2f32_unmasked(<vscale x 2 x float> %a, float %b, <vscale x 2 x float> %c, i32 zeroext %evl) {
1025 ; CHECK-LABEL: vmfsac_vf_nxv2f32_unmasked:
1027 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
1028 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
1029 ; CHECK-NEXT: vmv1r.v v8, v9
1031 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
1032 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1033 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1034 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1035 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
1036 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %vb, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1037 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> %allones, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
1038 ret <vscale x 2 x float> %u
1041 define <vscale x 2 x float> @vmfsac_vv_nxv2f32_ta(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1042 ; CHECK-LABEL: vmfsac_vv_nxv2f32_ta:
1044 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
1045 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1046 ; CHECK-NEXT: vmv.v.v v8, v10
1048 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1049 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1050 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
1051 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %b, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1052 %u = call <vscale x 2 x float> @llvm.vp.select.nxv2f32(<vscale x 2 x i1> %m, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
1053 ret <vscale x 2 x float> %u
1056 define <vscale x 2 x float> @vmfsac_vf_nxv2f32_ta(<vscale x 2 x float> %a, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1057 ; CHECK-LABEL: vmfsac_vf_nxv2f32_ta:
1059 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
1060 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1061 ; CHECK-NEXT: vmv.v.v v8, v9
1063 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
1064 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1065 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1066 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1067 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
1068 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %a, <vscale x 2 x float> %vb, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1069 %u = call <vscale x 2 x float> @llvm.vp.select.nxv2f32(<vscale x 2 x i1> %m, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
1070 ret <vscale x 2 x float> %u
1073 define <vscale x 2 x float> @vmfsac_vf_nxv2f32_commute_ta(<vscale x 2 x float> %a, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1074 ; CHECK-LABEL: vmfsac_vf_nxv2f32_commute_ta:
1076 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
1077 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1078 ; CHECK-NEXT: vmv.v.v v8, v9
1080 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
1081 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
1082 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1083 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1084 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> %allones, i32 %evl)
1085 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x float> %a, <vscale x 2 x float> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1086 %u = call <vscale x 2 x float> @llvm.vp.select.nxv2f32(<vscale x 2 x i1> %m, <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
1087 ret <vscale x 2 x float> %u
1090 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)
1091 declare <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
1092 declare <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>, i32)
1093 declare <vscale x 4 x float> @llvm.vp.select.nxv4f32(<vscale x 4 x i1>, <vscale x 4 x float>, <vscale x 4 x float>, i32)
1095 define <vscale x 4 x float> @vmfsac_vv_nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1096 ; CHECK-LABEL: vmfsac_vv_nxv4f32:
1098 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
1099 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1100 ; CHECK-NEXT: vmv2r.v v8, v12
1102 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1103 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1104 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1105 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1106 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> %m, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1107 ret <vscale x 4 x float> %u
1110 define <vscale x 4 x float> @vmfsac_vv_nxv4f32_unmasked(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1111 ; CHECK-LABEL: vmfsac_vv_nxv4f32_unmasked:
1113 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
1114 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
1115 ; CHECK-NEXT: vmv2r.v v8, v12
1117 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1118 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1119 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1120 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1121 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> %allones, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1122 ret <vscale x 4 x float> %u
1125 define <vscale x 4 x float> @vmfsac_vf_nxv4f32(<vscale x 4 x float> %a, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1126 ; CHECK-LABEL: vmfsac_vf_nxv4f32:
1128 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
1129 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1130 ; CHECK-NEXT: vmv2r.v v8, v10
1132 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1133 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1134 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1135 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1136 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1137 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %vb, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1138 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> %m, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1139 ret <vscale x 4 x float> %u
1142 define <vscale x 4 x float> @vmfsac_vf_nxv4f32_commute(<vscale x 4 x float> %a, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1143 ; CHECK-LABEL: vmfsac_vf_nxv4f32_commute:
1145 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
1146 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1147 ; CHECK-NEXT: vmv2r.v v8, v10
1149 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1150 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1151 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1152 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1153 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1154 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x float> %a, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1155 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> %m, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1156 ret <vscale x 4 x float> %u
1159 define <vscale x 4 x float> @vmfsac_vf_nxv4f32_unmasked(<vscale x 4 x float> %a, float %b, <vscale x 4 x float> %c, i32 zeroext %evl) {
1160 ; CHECK-LABEL: vmfsac_vf_nxv4f32_unmasked:
1162 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
1163 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
1164 ; CHECK-NEXT: vmv2r.v v8, v10
1166 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1167 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1168 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1169 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1170 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1171 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %vb, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1172 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> %allones, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1173 ret <vscale x 4 x float> %u
1176 define <vscale x 4 x float> @vmfsac_vv_nxv4f32_ta(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1177 ; CHECK-LABEL: vmfsac_vv_nxv4f32_ta:
1179 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1180 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1181 ; CHECK-NEXT: vmv.v.v v8, v12
1183 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1184 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1185 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1186 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %b, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1187 %u = call <vscale x 4 x float> @llvm.vp.select.nxv4f32(<vscale x 4 x i1> %m, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1188 ret <vscale x 4 x float> %u
1191 define <vscale x 4 x float> @vmfsac_vf_nxv4f32_ta(<vscale x 4 x float> %a, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1192 ; CHECK-LABEL: vmfsac_vf_nxv4f32_ta:
1194 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1195 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1196 ; CHECK-NEXT: vmv.v.v v8, v10
1198 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1199 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1200 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1201 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1202 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1203 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %a, <vscale x 4 x float> %vb, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1204 %u = call <vscale x 4 x float> @llvm.vp.select.nxv4f32(<vscale x 4 x i1> %m, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1205 ret <vscale x 4 x float> %u
1208 define <vscale x 4 x float> @vmfsac_vf_nxv4f32_commute_ta(<vscale x 4 x float> %a, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1209 ; CHECK-LABEL: vmfsac_vf_nxv4f32_commute_ta:
1211 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1212 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1213 ; CHECK-NEXT: vmv.v.v v8, v10
1215 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1216 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1217 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1218 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1219 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> %allones, i32 %evl)
1220 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x float> %a, <vscale x 4 x float> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1221 %u = call <vscale x 4 x float> @llvm.vp.select.nxv4f32(<vscale x 4 x i1> %m, <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1222 ret <vscale x 4 x float> %u
1225 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)
1226 declare <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
1227 declare <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1>, <vscale x 8 x float>, <vscale x 8 x float>, i32)
1228 declare <vscale x 8 x float> @llvm.vp.select.nxv8f32(<vscale x 8 x i1>, <vscale x 8 x float>, <vscale x 8 x float>, i32)
1230 define <vscale x 8 x float> @vmfsac_vv_nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1231 ; CHECK-LABEL: vmfsac_vv_nxv8f32:
1233 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1234 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1235 ; CHECK-NEXT: vmv4r.v v8, v16
1237 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1238 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1239 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1240 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1241 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> %m, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1242 ret <vscale x 8 x float> %u
1245 define <vscale x 8 x float> @vmfsac_vv_nxv8f32_unmasked(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1246 ; CHECK-LABEL: vmfsac_vv_nxv8f32_unmasked:
1248 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1249 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
1250 ; CHECK-NEXT: vmv4r.v v8, v16
1252 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1253 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1254 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1255 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1256 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> %allones, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1257 ret <vscale x 8 x float> %u
1260 define <vscale x 8 x float> @vmfsac_vf_nxv8f32(<vscale x 8 x float> %a, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1261 ; CHECK-LABEL: vmfsac_vf_nxv8f32:
1263 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1264 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1265 ; CHECK-NEXT: vmv4r.v v8, v12
1267 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1268 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1269 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1270 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1271 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1272 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %vb, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1273 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> %m, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1274 ret <vscale x 8 x float> %u
1277 define <vscale x 8 x float> @vmfsac_vf_nxv8f32_commute(<vscale x 8 x float> %a, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1278 ; CHECK-LABEL: vmfsac_vf_nxv8f32_commute:
1280 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1281 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1282 ; CHECK-NEXT: vmv4r.v v8, v12
1284 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1285 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1286 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1287 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1288 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1289 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %a, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1290 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> %m, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1291 ret <vscale x 8 x float> %u
1294 define <vscale x 8 x float> @vmfsac_vf_nxv8f32_unmasked(<vscale x 8 x float> %a, float %b, <vscale x 8 x float> %c, i32 zeroext %evl) {
1295 ; CHECK-LABEL: vmfsac_vf_nxv8f32_unmasked:
1297 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1298 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
1299 ; CHECK-NEXT: vmv4r.v v8, v12
1301 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1302 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1303 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1304 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1305 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1306 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %vb, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1307 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> %allones, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1308 ret <vscale x 8 x float> %u
1311 define <vscale x 8 x float> @vmfsac_vv_nxv8f32_ta(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1312 ; CHECK-LABEL: vmfsac_vv_nxv8f32_ta:
1314 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1315 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1316 ; CHECK-NEXT: vmv.v.v v8, v16
1318 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1319 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1320 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1321 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %b, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1322 %u = call <vscale x 8 x float> @llvm.vp.select.nxv8f32(<vscale x 8 x i1> %m, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1323 ret <vscale x 8 x float> %u
1326 define <vscale x 8 x float> @vmfsac_vf_nxv8f32_ta(<vscale x 8 x float> %a, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1327 ; CHECK-LABEL: vmfsac_vf_nxv8f32_ta:
1329 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1330 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1331 ; CHECK-NEXT: vmv.v.v v8, v12
1333 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1334 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1335 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1336 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1337 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1338 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %a, <vscale x 8 x float> %vb, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1339 %u = call <vscale x 8 x float> @llvm.vp.select.nxv8f32(<vscale x 8 x i1> %m, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1340 ret <vscale x 8 x float> %u
1343 define <vscale x 8 x float> @vmfsac_vf_nxv8f32_commute_ta(<vscale x 8 x float> %a, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1344 ; CHECK-LABEL: vmfsac_vf_nxv8f32_commute_ta:
1346 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1347 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1348 ; CHECK-NEXT: vmv.v.v v8, v12
1350 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1351 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1352 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1353 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1354 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> %allones, i32 %evl)
1355 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %a, <vscale x 8 x float> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1356 %u = call <vscale x 8 x float> @llvm.vp.select.nxv8f32(<vscale x 8 x i1> %m, <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1357 ret <vscale x 8 x float> %u
1360 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)
1361 declare <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float>, <vscale x 16 x i1>, i32)
1362 declare <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1>, <vscale x 16 x float>, <vscale x 16 x float>, i32)
1363 declare <vscale x 16 x float> @llvm.vp.select.nxv16f32(<vscale x 16 x i1>, <vscale x 16 x float>, <vscale x 16 x float>, i32)
1365 define <vscale x 16 x float> @vmfsac_vv_nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1366 ; CHECK-LABEL: vmfsac_vv_nxv16f32:
1368 ; CHECK-NEXT: vl8re32.v v24, (a0)
1369 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, tu, mu
1370 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1371 ; CHECK-NEXT: vmv8r.v v8, v24
1373 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1374 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1375 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1376 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1377 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> %m, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1378 ret <vscale x 16 x float> %u
1381 define <vscale x 16 x float> @vmfsac_vv_nxv16f32_unmasked(<vscale x 16 x float> %a, <vscale x 16 x float> %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1382 ; CHECK-LABEL: vmfsac_vv_nxv16f32_unmasked:
1384 ; CHECK-NEXT: vl8re32.v v24, (a0)
1385 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, tu, ma
1386 ; CHECK-NEXT: vfmsac.vv v24, v8, v16
1387 ; CHECK-NEXT: vmv8r.v v8, v24
1389 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1390 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1391 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1392 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1393 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> %allones, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1394 ret <vscale x 16 x float> %u
1397 define <vscale x 16 x float> @vmfsac_vf_nxv16f32(<vscale x 16 x float> %a, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1398 ; CHECK-LABEL: vmfsac_vf_nxv16f32:
1400 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, mu
1401 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1402 ; CHECK-NEXT: vmv8r.v v8, v16
1404 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1405 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1406 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1407 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1408 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1409 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %vb, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1410 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> %m, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1411 ret <vscale x 16 x float> %u
1414 define <vscale x 16 x float> @vmfsac_vf_nxv16f32_commute(<vscale x 16 x float> %a, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1415 ; CHECK-LABEL: vmfsac_vf_nxv16f32_commute:
1417 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, mu
1418 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1419 ; CHECK-NEXT: vmv8r.v v8, v16
1421 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1422 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1423 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1424 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1425 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1426 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %vb, <vscale x 16 x float> %a, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1427 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> %m, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1428 ret <vscale x 16 x float> %u
1431 define <vscale x 16 x float> @vmfsac_vf_nxv16f32_unmasked(<vscale x 16 x float> %a, float %b, <vscale x 16 x float> %c, i32 zeroext %evl) {
1432 ; CHECK-LABEL: vmfsac_vf_nxv16f32_unmasked:
1434 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, ma
1435 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8
1436 ; CHECK-NEXT: vmv8r.v v8, v16
1438 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1439 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1440 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1441 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1442 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1443 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %vb, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1444 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> %allones, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1445 ret <vscale x 16 x float> %u
1448 define <vscale x 16 x float> @vmfsac_vv_nxv16f32_ta(<vscale x 16 x float> %a, <vscale x 16 x float> %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1449 ; CHECK-LABEL: vmfsac_vv_nxv16f32_ta:
1451 ; CHECK-NEXT: vl8re32.v v24, (a0)
1452 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, mu
1453 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1454 ; CHECK-NEXT: vmv.v.v v8, v24
1456 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1457 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1458 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1459 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %b, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1460 %u = call <vscale x 16 x float> @llvm.vp.select.nxv16f32(<vscale x 16 x i1> %m, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1461 ret <vscale x 16 x float> %u
1464 define <vscale x 16 x float> @vmfsac_vf_nxv16f32_ta(<vscale x 16 x float> %a, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1465 ; CHECK-LABEL: vmfsac_vf_nxv16f32_ta:
1467 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
1468 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1469 ; CHECK-NEXT: vmv.v.v v8, v16
1471 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1472 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1473 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1474 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1475 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1476 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %a, <vscale x 16 x float> %vb, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1477 %u = call <vscale x 16 x float> @llvm.vp.select.nxv16f32(<vscale x 16 x i1> %m, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1478 ret <vscale x 16 x float> %u
1481 define <vscale x 16 x float> @vmfsac_vf_nxv16f32_commute_ta(<vscale x 16 x float> %a, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1482 ; CHECK-LABEL: vmfsac_vf_nxv16f32_commute_ta:
1484 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
1485 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1486 ; CHECK-NEXT: vmv.v.v v8, v16
1488 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1489 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1490 %splat = insertelement <vscale x 16 x i1> poison, i1 -1, i32 0
1491 %allones = shufflevector <vscale x 16 x i1> %splat, <vscale x 16 x i1> poison, <vscale x 16 x i32> zeroinitializer
1492 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> %allones, i32 %evl)
1493 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %vb, <vscale x 16 x float> %a, <vscale x 16 x float> %negc, <vscale x 16 x i1> %allones, i32 %evl)
1494 %u = call <vscale x 16 x float> @llvm.vp.select.nxv16f32(<vscale x 16 x i1> %m, <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1495 ret <vscale x 16 x float> %u
1498 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)
1499 declare <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double>, <vscale x 1 x i1>, i32)
1500 declare <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1>, <vscale x 1 x double>, <vscale x 1 x double>, i32)
1501 declare <vscale x 1 x double> @llvm.vp.select.nxv1f64(<vscale x 1 x i1>, <vscale x 1 x double>, <vscale x 1 x double>, i32)
1503 define <vscale x 1 x double> @vmfsac_vv_nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1504 ; CHECK-LABEL: vmfsac_vv_nxv1f64:
1506 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1507 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1508 ; CHECK-NEXT: vmv1r.v v8, v10
1510 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1511 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1512 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1513 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1514 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> %m, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1515 ret <vscale x 1 x double> %u
1518 define <vscale x 1 x double> @vmfsac_vv_nxv1f64_unmasked(<vscale x 1 x double> %a, <vscale x 1 x double> %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1519 ; CHECK-LABEL: vmfsac_vv_nxv1f64_unmasked:
1521 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1522 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
1523 ; CHECK-NEXT: vmv1r.v v8, v10
1525 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1526 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1527 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1528 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1529 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> %allones, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1530 ret <vscale x 1 x double> %u
1533 define <vscale x 1 x double> @vmfsac_vf_nxv1f64(<vscale x 1 x double> %a, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1534 ; CHECK-LABEL: vmfsac_vf_nxv1f64:
1536 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1537 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1538 ; CHECK-NEXT: vmv1r.v v8, v9
1540 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1541 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1542 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1543 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1544 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1545 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %vb, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1546 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> %m, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1547 ret <vscale x 1 x double> %u
1550 define <vscale x 1 x double> @vmfsac_vf_nxv1f64_commute(<vscale x 1 x double> %a, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1551 ; CHECK-LABEL: vmfsac_vf_nxv1f64_commute:
1553 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1554 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1555 ; CHECK-NEXT: vmv1r.v v8, v9
1557 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1558 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1559 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1560 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1561 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1562 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %vb, <vscale x 1 x double> %a, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1563 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> %m, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1564 ret <vscale x 1 x double> %u
1567 define <vscale x 1 x double> @vmfsac_vf_nxv1f64_unmasked(<vscale x 1 x double> %a, double %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
1568 ; CHECK-LABEL: vmfsac_vf_nxv1f64_unmasked:
1570 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1571 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
1572 ; CHECK-NEXT: vmv1r.v v8, v9
1574 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1575 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1576 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1577 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1578 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1579 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %vb, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1580 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> %allones, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1581 ret <vscale x 1 x double> %u
1584 define <vscale x 1 x double> @vmfsac_vv_nxv1f64_ta(<vscale x 1 x double> %a, <vscale x 1 x double> %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1585 ; CHECK-LABEL: vmfsac_vv_nxv1f64_ta:
1587 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1588 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1589 ; CHECK-NEXT: vmv.v.v v8, v10
1591 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1592 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1593 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1594 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %b, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1595 %u = call <vscale x 1 x double> @llvm.vp.select.nxv1f64(<vscale x 1 x i1> %m, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1596 ret <vscale x 1 x double> %u
1599 define <vscale x 1 x double> @vmfsac_vf_nxv1f64_ta(<vscale x 1 x double> %a, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1600 ; CHECK-LABEL: vmfsac_vf_nxv1f64_ta:
1602 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1603 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1604 ; CHECK-NEXT: vmv.v.v v8, v9
1606 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1607 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1608 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1609 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1610 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1611 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %a, <vscale x 1 x double> %vb, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1612 %u = call <vscale x 1 x double> @llvm.vp.select.nxv1f64(<vscale x 1 x i1> %m, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1613 ret <vscale x 1 x double> %u
1616 define <vscale x 1 x double> @vmfsac_vf_nxv1f64_commute_ta(<vscale x 1 x double> %a, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1617 ; CHECK-LABEL: vmfsac_vf_nxv1f64_commute_ta:
1619 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1620 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1621 ; CHECK-NEXT: vmv.v.v v8, v9
1623 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1624 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1625 %splat = insertelement <vscale x 1 x i1> poison, i1 -1, i32 0
1626 %allones = shufflevector <vscale x 1 x i1> %splat, <vscale x 1 x i1> poison, <vscale x 1 x i32> zeroinitializer
1627 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> %allones, i32 %evl)
1628 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %vb, <vscale x 1 x double> %a, <vscale x 1 x double> %negc, <vscale x 1 x i1> %allones, i32 %evl)
1629 %u = call <vscale x 1 x double> @llvm.vp.select.nxv1f64(<vscale x 1 x i1> %m, <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1630 ret <vscale x 1 x double> %u
1633 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)
1634 declare <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, i32)
1635 declare <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>, i32)
1636 declare <vscale x 2 x double> @llvm.vp.select.nxv2f64(<vscale x 2 x i1>, <vscale x 2 x double>, <vscale x 2 x double>, i32)
1638 define <vscale x 2 x double> @vmfsac_vv_nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1639 ; CHECK-LABEL: vmfsac_vv_nxv2f64:
1641 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1642 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1643 ; CHECK-NEXT: vmv2r.v v8, v12
1645 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1646 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1647 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1648 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1649 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> %m, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1650 ret <vscale x 2 x double> %u
1653 define <vscale x 2 x double> @vmfsac_vv_nxv2f64_unmasked(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1654 ; CHECK-LABEL: vmfsac_vv_nxv2f64_unmasked:
1656 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1657 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
1658 ; CHECK-NEXT: vmv2r.v v8, v12
1660 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1661 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1662 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1663 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1664 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> %allones, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1665 ret <vscale x 2 x double> %u
1668 define <vscale x 2 x double> @vmfsac_vf_nxv2f64(<vscale x 2 x double> %a, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1669 ; CHECK-LABEL: vmfsac_vf_nxv2f64:
1671 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1672 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1673 ; CHECK-NEXT: vmv2r.v v8, v10
1675 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1676 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1677 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1678 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1679 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1680 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %vb, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1681 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> %m, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1682 ret <vscale x 2 x double> %u
1685 define <vscale x 2 x double> @vmfsac_vf_nxv2f64_commute(<vscale x 2 x double> %a, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1686 ; CHECK-LABEL: vmfsac_vf_nxv2f64_commute:
1688 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1689 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1690 ; CHECK-NEXT: vmv2r.v v8, v10
1692 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1693 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1694 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1695 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1696 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1697 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %vb, <vscale x 2 x double> %a, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1698 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> %m, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1699 ret <vscale x 2 x double> %u
1702 define <vscale x 2 x double> @vmfsac_vf_nxv2f64_unmasked(<vscale x 2 x double> %a, double %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
1703 ; CHECK-LABEL: vmfsac_vf_nxv2f64_unmasked:
1705 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1706 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
1707 ; CHECK-NEXT: vmv2r.v v8, v10
1709 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1710 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1711 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1712 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1713 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1714 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %vb, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1715 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> %allones, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1716 ret <vscale x 2 x double> %u
1719 define <vscale x 2 x double> @vmfsac_vv_nxv2f64_ta(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1720 ; CHECK-LABEL: vmfsac_vv_nxv2f64_ta:
1722 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1723 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1724 ; CHECK-NEXT: vmv.v.v v8, v12
1726 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1727 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1728 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1729 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1730 %u = call <vscale x 2 x double> @llvm.vp.select.nxv2f64(<vscale x 2 x i1> %m, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1731 ret <vscale x 2 x double> %u
1734 define <vscale x 2 x double> @vmfsac_vf_nxv2f64_ta(<vscale x 2 x double> %a, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1735 ; CHECK-LABEL: vmfsac_vf_nxv2f64_ta:
1737 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1738 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1739 ; CHECK-NEXT: vmv.v.v v8, v10
1741 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1742 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1743 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1744 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1745 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1746 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %vb, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1747 %u = call <vscale x 2 x double> @llvm.vp.select.nxv2f64(<vscale x 2 x i1> %m, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1748 ret <vscale x 2 x double> %u
1751 define <vscale x 2 x double> @vmfsac_vf_nxv2f64_commute_ta(<vscale x 2 x double> %a, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1752 ; CHECK-LABEL: vmfsac_vf_nxv2f64_commute_ta:
1754 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1755 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1756 ; CHECK-NEXT: vmv.v.v v8, v10
1758 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1759 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1760 %splat = insertelement <vscale x 2 x i1> poison, i1 -1, i32 0
1761 %allones = shufflevector <vscale x 2 x i1> %splat, <vscale x 2 x i1> poison, <vscale x 2 x i32> zeroinitializer
1762 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> %allones, i32 %evl)
1763 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %vb, <vscale x 2 x double> %a, <vscale x 2 x double> %negc, <vscale x 2 x i1> %allones, i32 %evl)
1764 %u = call <vscale x 2 x double> @llvm.vp.select.nxv2f64(<vscale x 2 x i1> %m, <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1765 ret <vscale x 2 x double> %u
1768 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)
1769 declare <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double>, <vscale x 4 x i1>, i32)
1770 declare <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1>, <vscale x 4 x double>, <vscale x 4 x double>, i32)
1771 declare <vscale x 4 x double> @llvm.vp.select.nxv4f64(<vscale x 4 x i1>, <vscale x 4 x double>, <vscale x 4 x double>, i32)
1773 define <vscale x 4 x double> @vmfsac_vv_nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1774 ; CHECK-LABEL: vmfsac_vv_nxv4f64:
1776 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1777 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1778 ; CHECK-NEXT: vmv4r.v v8, v16
1780 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1781 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1782 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1783 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1784 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> %m, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1785 ret <vscale x 4 x double> %u
1788 define <vscale x 4 x double> @vmfsac_vv_nxv4f64_unmasked(<vscale x 4 x double> %a, <vscale x 4 x double> %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1789 ; CHECK-LABEL: vmfsac_vv_nxv4f64_unmasked:
1791 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1792 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
1793 ; CHECK-NEXT: vmv4r.v v8, v16
1795 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1796 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1797 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1798 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1799 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> %allones, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1800 ret <vscale x 4 x double> %u
1803 define <vscale x 4 x double> @vmfsac_vf_nxv4f64(<vscale x 4 x double> %a, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1804 ; CHECK-LABEL: vmfsac_vf_nxv4f64:
1806 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1807 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1808 ; CHECK-NEXT: vmv4r.v v8, v12
1810 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1811 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1812 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1813 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1814 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1815 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %vb, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1816 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> %m, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1817 ret <vscale x 4 x double> %u
1820 define <vscale x 4 x double> @vmfsac_vf_nxv4f64_commute(<vscale x 4 x double> %a, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1821 ; CHECK-LABEL: vmfsac_vf_nxv4f64_commute:
1823 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1824 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1825 ; CHECK-NEXT: vmv4r.v v8, v12
1827 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1828 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1829 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1830 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1831 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1832 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %vb, <vscale x 4 x double> %a, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1833 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> %m, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1834 ret <vscale x 4 x double> %u
1837 define <vscale x 4 x double> @vmfsac_vf_nxv4f64_unmasked(<vscale x 4 x double> %a, double %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
1838 ; CHECK-LABEL: vmfsac_vf_nxv4f64_unmasked:
1840 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1841 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
1842 ; CHECK-NEXT: vmv4r.v v8, v12
1844 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1845 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1846 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1847 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1848 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1849 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %vb, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1850 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> %allones, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1851 ret <vscale x 4 x double> %u
1854 define <vscale x 4 x double> @vmfsac_vv_nxv4f64_ta(<vscale x 4 x double> %a, <vscale x 4 x double> %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1855 ; CHECK-LABEL: vmfsac_vv_nxv4f64_ta:
1857 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1858 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1859 ; CHECK-NEXT: vmv.v.v v8, v16
1861 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1862 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1863 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1864 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %b, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1865 %u = call <vscale x 4 x double> @llvm.vp.select.nxv4f64(<vscale x 4 x i1> %m, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1866 ret <vscale x 4 x double> %u
1869 define <vscale x 4 x double> @vmfsac_vf_nxv4f64_ta(<vscale x 4 x double> %a, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1870 ; CHECK-LABEL: vmfsac_vf_nxv4f64_ta:
1872 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1873 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1874 ; CHECK-NEXT: vmv.v.v v8, v12
1876 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1877 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1878 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1879 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1880 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1881 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %a, <vscale x 4 x double> %vb, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1882 %u = call <vscale x 4 x double> @llvm.vp.select.nxv4f64(<vscale x 4 x i1> %m, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1883 ret <vscale x 4 x double> %u
1886 define <vscale x 4 x double> @vmfsac_vf_nxv4f64_commute_ta(<vscale x 4 x double> %a, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1887 ; CHECK-LABEL: vmfsac_vf_nxv4f64_commute_ta:
1889 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1890 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1891 ; CHECK-NEXT: vmv.v.v v8, v12
1893 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1894 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1895 %splat = insertelement <vscale x 4 x i1> poison, i1 -1, i32 0
1896 %allones = shufflevector <vscale x 4 x i1> %splat, <vscale x 4 x i1> poison, <vscale x 4 x i32> zeroinitializer
1897 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> %allones, i32 %evl)
1898 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %vb, <vscale x 4 x double> %a, <vscale x 4 x double> %negc, <vscale x 4 x i1> %allones, i32 %evl)
1899 %u = call <vscale x 4 x double> @llvm.vp.select.nxv4f64(<vscale x 4 x i1> %m, <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1900 ret <vscale x 4 x double> %u
1903 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)
1904 declare <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double>, <vscale x 8 x i1>, i32)
1905 declare <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1>, <vscale x 8 x double>, <vscale x 8 x double>, i32)
1906 declare <vscale x 8 x double> @llvm.vp.select.nxv8f64(<vscale x 8 x i1>, <vscale x 8 x double>, <vscale x 8 x double>, i32)
1908 define <vscale x 8 x double> @vmfsac_vv_nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1909 ; CHECK-LABEL: vmfsac_vv_nxv8f64:
1911 ; CHECK-NEXT: vl8re64.v v24, (a0)
1912 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, tu, mu
1913 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1914 ; CHECK-NEXT: vmv8r.v v8, v24
1916 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1917 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1918 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1919 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1920 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> %m, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1921 ret <vscale x 8 x double> %u
1924 define <vscale x 8 x double> @vmfsac_vv_nxv8f64_unmasked(<vscale x 8 x double> %a, <vscale x 8 x double> %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1925 ; CHECK-LABEL: vmfsac_vv_nxv8f64_unmasked:
1927 ; CHECK-NEXT: vl8re64.v v24, (a0)
1928 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, tu, ma
1929 ; CHECK-NEXT: vfmsac.vv v24, v8, v16
1930 ; CHECK-NEXT: vmv8r.v v8, v24
1932 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1933 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1934 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1935 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1936 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> %allones, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1937 ret <vscale x 8 x double> %u
1940 define <vscale x 8 x double> @vmfsac_vf_nxv8f64(<vscale x 8 x double> %a, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1941 ; CHECK-LABEL: vmfsac_vf_nxv8f64:
1943 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, mu
1944 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1945 ; CHECK-NEXT: vmv8r.v v8, v16
1947 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1948 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1949 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1950 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1951 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1952 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %vb, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1953 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> %m, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1954 ret <vscale x 8 x double> %u
1957 define <vscale x 8 x double> @vmfsac_vf_nxv8f64_commute(<vscale x 8 x double> %a, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1958 ; CHECK-LABEL: vmfsac_vf_nxv8f64_commute:
1960 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, mu
1961 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1962 ; CHECK-NEXT: vmv8r.v v8, v16
1964 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1965 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1966 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1967 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1968 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1969 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %a, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1970 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> %m, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1971 ret <vscale x 8 x double> %u
1974 define <vscale x 8 x double> @vmfsac_vf_nxv8f64_unmasked(<vscale x 8 x double> %a, double %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1975 ; CHECK-LABEL: vmfsac_vf_nxv8f64_unmasked:
1977 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, ma
1978 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8
1979 ; CHECK-NEXT: vmv8r.v v8, v16
1981 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1982 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1983 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
1984 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
1985 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
1986 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %vb, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
1987 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> %allones, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1988 ret <vscale x 8 x double> %u
1991 define <vscale x 8 x double> @vmfsac_vv_nxv8f64_ta(<vscale x 8 x double> %a, <vscale x 8 x double> %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1992 ; CHECK-LABEL: vmfsac_vv_nxv8f64_ta:
1994 ; CHECK-NEXT: vl8re64.v v24, (a0)
1995 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, mu
1996 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1997 ; CHECK-NEXT: vmv.v.v v8, v24
1999 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
2000 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
2001 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
2002 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %b, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
2003 %u = call <vscale x 8 x double> @llvm.vp.select.nxv8f64(<vscale x 8 x i1> %m, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
2004 ret <vscale x 8 x double> %u
2007 define <vscale x 8 x double> @vmfsac_vf_nxv8f64_ta(<vscale x 8 x double> %a, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2008 ; CHECK-LABEL: vmfsac_vf_nxv8f64_ta:
2010 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
2011 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
2012 ; CHECK-NEXT: vmv.v.v v8, v16
2014 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
2015 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
2016 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
2017 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
2018 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
2019 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %a, <vscale x 8 x double> %vb, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
2020 %u = call <vscale x 8 x double> @llvm.vp.select.nxv8f64(<vscale x 8 x i1> %m, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
2021 ret <vscale x 8 x double> %u
2024 define <vscale x 8 x double> @vmfsac_vf_nxv8f64_commute_ta(<vscale x 8 x double> %a, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
2025 ; CHECK-LABEL: vmfsac_vf_nxv8f64_commute_ta:
2027 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
2028 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
2029 ; CHECK-NEXT: vmv.v.v v8, v16
2031 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
2032 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
2033 %splat = insertelement <vscale x 8 x i1> poison, i1 -1, i32 0
2034 %allones = shufflevector <vscale x 8 x i1> %splat, <vscale x 8 x i1> poison, <vscale x 8 x i32> zeroinitializer
2035 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> %allones, i32 %evl)
2036 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %a, <vscale x 8 x double> %negc, <vscale x 8 x i1> %allones, i32 %evl)
2037 %u = call <vscale x 8 x double> @llvm.vp.select.nxv8f64(<vscale x 8 x i1> %m, <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
2038 ret <vscale x 8 x double> %u