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 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
20 %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> splat (i1 -1), i32 %evl)
21 %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)
22 ret <vscale x 1 x half> %u
25 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) {
26 ; CHECK-LABEL: vmfsac_vv_nxv1f16_unmasked:
28 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
29 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
30 ; CHECK-NEXT: vmv1r.v v8, v10
32 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
33 %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> splat (i1 -1), i32 %evl)
34 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> splat (i1 -1), <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
35 ret <vscale x 1 x half> %u
38 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) {
39 ; CHECK-LABEL: vmfsac_vf_nxv1f16:
41 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
42 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
43 ; CHECK-NEXT: vmv1r.v v8, v9
45 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
46 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
47 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
48 %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> splat (i1 -1), i32 %evl)
49 %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)
50 ret <vscale x 1 x half> %u
53 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) {
54 ; CHECK-LABEL: vmfsac_vf_nxv1f16_commute:
56 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
57 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
58 ; CHECK-NEXT: vmv1r.v v8, v9
60 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
61 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
62 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
63 %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> splat (i1 -1), i32 %evl)
64 %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)
65 ret <vscale x 1 x half> %u
68 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) {
69 ; CHECK-LABEL: vmfsac_vf_nxv1f16_unmasked:
71 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
72 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
73 ; CHECK-NEXT: vmv1r.v v8, v9
75 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
76 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
77 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
78 %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> splat (i1 -1), i32 %evl)
79 %u = call <vscale x 1 x half> @llvm.vp.merge.nxv1f16(<vscale x 1 x i1> splat (i1 -1), <vscale x 1 x half> %v, <vscale x 1 x half> %c, i32 %evl)
80 ret <vscale x 1 x half> %u
83 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) {
84 ; CHECK-LABEL: vmfsac_vv_nxv1f16_ta:
86 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
87 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
88 ; CHECK-NEXT: vmv1r.v v8, v10
90 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
91 %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> splat (i1 -1), i32 %evl)
92 %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)
93 ret <vscale x 1 x half> %u
96 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) {
97 ; CHECK-LABEL: vmfsac_vf_nxv1f16_ta:
99 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
100 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
101 ; CHECK-NEXT: vmv1r.v v8, v9
103 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
104 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
105 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
106 %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> splat (i1 -1), i32 %evl)
107 %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)
108 ret <vscale x 1 x half> %u
111 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) {
112 ; CHECK-LABEL: vmfsac_vf_nxv1f16_commute_ta:
114 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
115 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
116 ; CHECK-NEXT: vmv1r.v v8, v9
118 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
119 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
120 %negc = call <vscale x 1 x half> @llvm.vp.fneg.nxv1f16(<vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
121 %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> splat (i1 -1), i32 %evl)
122 %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)
123 ret <vscale x 1 x half> %u
126 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)
127 declare <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
128 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)
129 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)
131 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) {
132 ; CHECK-LABEL: vmfsac_vv_nxv2f16:
134 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
135 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
136 ; CHECK-NEXT: vmv1r.v v8, v10
138 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
139 %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> splat (i1 -1), i32 %evl)
140 %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)
141 ret <vscale x 2 x half> %u
144 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) {
145 ; CHECK-LABEL: vmfsac_vv_nxv2f16_unmasked:
147 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
148 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
149 ; CHECK-NEXT: vmv1r.v v8, v10
151 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
152 %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> splat (i1 -1), i32 %evl)
153 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> splat (i1 -1), <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
154 ret <vscale x 2 x half> %u
157 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) {
158 ; CHECK-LABEL: vmfsac_vf_nxv2f16:
160 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
161 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
162 ; CHECK-NEXT: vmv1r.v v8, v9
164 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
165 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
166 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
167 %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> splat (i1 -1), i32 %evl)
168 %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)
169 ret <vscale x 2 x half> %u
172 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) {
173 ; CHECK-LABEL: vmfsac_vf_nxv2f16_commute:
175 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
176 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
177 ; CHECK-NEXT: vmv1r.v v8, v9
179 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
180 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
181 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
182 %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> splat (i1 -1), i32 %evl)
183 %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)
184 ret <vscale x 2 x half> %u
187 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) {
188 ; CHECK-LABEL: vmfsac_vf_nxv2f16_unmasked:
190 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
191 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
192 ; CHECK-NEXT: vmv1r.v v8, v9
194 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
195 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
196 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
197 %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> splat (i1 -1), i32 %evl)
198 %u = call <vscale x 2 x half> @llvm.vp.merge.nxv2f16(<vscale x 2 x i1> splat (i1 -1), <vscale x 2 x half> %v, <vscale x 2 x half> %c, i32 %evl)
199 ret <vscale x 2 x half> %u
202 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) {
203 ; CHECK-LABEL: vmfsac_vv_nxv2f16_ta:
205 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
206 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
207 ; CHECK-NEXT: vmv1r.v v8, v10
209 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
210 %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> splat (i1 -1), i32 %evl)
211 %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)
212 ret <vscale x 2 x half> %u
215 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) {
216 ; CHECK-LABEL: vmfsac_vf_nxv2f16_ta:
218 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
219 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
220 ; CHECK-NEXT: vmv1r.v v8, v9
222 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
223 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
224 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
225 %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> splat (i1 -1), i32 %evl)
226 %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)
227 ret <vscale x 2 x half> %u
230 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) {
231 ; CHECK-LABEL: vmfsac_vf_nxv2f16_commute_ta:
233 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
234 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
235 ; CHECK-NEXT: vmv1r.v v8, v9
237 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
238 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
239 %negc = call <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
240 %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> splat (i1 -1), i32 %evl)
241 %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)
242 ret <vscale x 2 x half> %u
245 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)
246 declare <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
247 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)
248 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)
250 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) {
251 ; CHECK-LABEL: vmfsac_vv_nxv4f16:
253 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
254 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
255 ; CHECK-NEXT: vmv1r.v v8, v10
257 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
258 %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> splat (i1 -1), i32 %evl)
259 %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)
260 ret <vscale x 4 x half> %u
263 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) {
264 ; CHECK-LABEL: vmfsac_vv_nxv4f16_unmasked:
266 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
267 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
268 ; CHECK-NEXT: vmv1r.v v8, v10
270 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
271 %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> splat (i1 -1), i32 %evl)
272 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> splat (i1 -1), <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
273 ret <vscale x 4 x half> %u
276 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) {
277 ; CHECK-LABEL: vmfsac_vf_nxv4f16:
279 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
280 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
281 ; CHECK-NEXT: vmv1r.v v8, v9
283 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
284 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
285 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
286 %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> splat (i1 -1), i32 %evl)
287 %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)
288 ret <vscale x 4 x half> %u
291 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) {
292 ; CHECK-LABEL: vmfsac_vf_nxv4f16_commute:
294 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
295 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
296 ; CHECK-NEXT: vmv1r.v v8, v9
298 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
299 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
300 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
301 %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> splat (i1 -1), i32 %evl)
302 %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)
303 ret <vscale x 4 x half> %u
306 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) {
307 ; CHECK-LABEL: vmfsac_vf_nxv4f16_unmasked:
309 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
310 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
311 ; CHECK-NEXT: vmv1r.v v8, v9
313 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
314 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
315 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
316 %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> splat (i1 -1), i32 %evl)
317 %u = call <vscale x 4 x half> @llvm.vp.merge.nxv4f16(<vscale x 4 x i1> splat (i1 -1), <vscale x 4 x half> %v, <vscale x 4 x half> %c, i32 %evl)
318 ret <vscale x 4 x half> %u
321 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) {
322 ; CHECK-LABEL: vmfsac_vv_nxv4f16_ta:
324 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
325 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
326 ; CHECK-NEXT: vmv.v.v v8, v10
328 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
329 %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> splat (i1 -1), i32 %evl)
330 %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)
331 ret <vscale x 4 x half> %u
334 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) {
335 ; CHECK-LABEL: vmfsac_vf_nxv4f16_ta:
337 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
338 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
339 ; CHECK-NEXT: vmv.v.v v8, v9
341 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
342 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
343 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
344 %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> splat (i1 -1), i32 %evl)
345 %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)
346 ret <vscale x 4 x half> %u
349 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) {
350 ; CHECK-LABEL: vmfsac_vf_nxv4f16_commute_ta:
352 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
353 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
354 ; CHECK-NEXT: vmv.v.v v8, v9
356 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
357 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
358 %negc = call <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
359 %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> splat (i1 -1), i32 %evl)
360 %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)
361 ret <vscale x 4 x half> %u
364 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)
365 declare <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
366 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)
367 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)
369 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) {
370 ; CHECK-LABEL: vmfsac_vv_nxv8f16:
372 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
373 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
374 ; CHECK-NEXT: vmv2r.v v8, v12
376 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
377 %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> splat (i1 -1), i32 %evl)
378 %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)
379 ret <vscale x 8 x half> %u
382 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) {
383 ; CHECK-LABEL: vmfsac_vv_nxv8f16_unmasked:
385 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
386 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
387 ; CHECK-NEXT: vmv2r.v v8, v12
389 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
390 %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> splat (i1 -1), i32 %evl)
391 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> splat (i1 -1), <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
392 ret <vscale x 8 x half> %u
395 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) {
396 ; CHECK-LABEL: vmfsac_vf_nxv8f16:
398 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
399 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
400 ; CHECK-NEXT: vmv2r.v v8, v10
402 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
403 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
404 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
405 %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> splat (i1 -1), i32 %evl)
406 %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)
407 ret <vscale x 8 x half> %u
410 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) {
411 ; CHECK-LABEL: vmfsac_vf_nxv8f16_commute:
413 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
414 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
415 ; CHECK-NEXT: vmv2r.v v8, v10
417 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
418 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
419 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
420 %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> splat (i1 -1), i32 %evl)
421 %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)
422 ret <vscale x 8 x half> %u
425 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) {
426 ; CHECK-LABEL: vmfsac_vf_nxv8f16_unmasked:
428 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
429 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
430 ; CHECK-NEXT: vmv2r.v v8, v10
432 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
433 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
434 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
435 %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> splat (i1 -1), i32 %evl)
436 %u = call <vscale x 8 x half> @llvm.vp.merge.nxv8f16(<vscale x 8 x i1> splat (i1 -1), <vscale x 8 x half> %v, <vscale x 8 x half> %c, i32 %evl)
437 ret <vscale x 8 x half> %u
440 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) {
441 ; CHECK-LABEL: vmfsac_vv_nxv8f16_ta:
443 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
444 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
445 ; CHECK-NEXT: vmv.v.v v8, v12
447 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
448 %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> splat (i1 -1), i32 %evl)
449 %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)
450 ret <vscale x 8 x half> %u
453 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) {
454 ; CHECK-LABEL: vmfsac_vf_nxv8f16_ta:
456 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
457 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
458 ; CHECK-NEXT: vmv.v.v v8, v10
460 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
461 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
462 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
463 %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> splat (i1 -1), i32 %evl)
464 %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)
465 ret <vscale x 8 x half> %u
468 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) {
469 ; CHECK-LABEL: vmfsac_vf_nxv8f16_commute_ta:
471 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
472 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
473 ; CHECK-NEXT: vmv.v.v v8, v10
475 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
476 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
477 %negc = call <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
478 %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> splat (i1 -1), i32 %evl)
479 %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)
480 ret <vscale x 8 x half> %u
483 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)
484 declare <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half>, <vscale x 16 x i1>, i32)
485 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)
486 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)
488 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) {
489 ; CHECK-LABEL: vmfsac_vv_nxv16f16:
491 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
492 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
493 ; CHECK-NEXT: vmv4r.v v8, v16
495 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
496 %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> splat (i1 -1), i32 %evl)
497 %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)
498 ret <vscale x 16 x half> %u
501 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) {
502 ; CHECK-LABEL: vmfsac_vv_nxv16f16_unmasked:
504 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
505 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
506 ; CHECK-NEXT: vmv4r.v v8, v16
508 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
509 %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> splat (i1 -1), i32 %evl)
510 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> splat (i1 -1), <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
511 ret <vscale x 16 x half> %u
514 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) {
515 ; CHECK-LABEL: vmfsac_vf_nxv16f16:
517 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
518 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
519 ; CHECK-NEXT: vmv4r.v v8, v12
521 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
522 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
523 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
524 %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> splat (i1 -1), i32 %evl)
525 %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)
526 ret <vscale x 16 x half> %u
529 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) {
530 ; CHECK-LABEL: vmfsac_vf_nxv16f16_commute:
532 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
533 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
534 ; CHECK-NEXT: vmv4r.v v8, v12
536 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
537 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
538 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
539 %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> splat (i1 -1), i32 %evl)
540 %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)
541 ret <vscale x 16 x half> %u
544 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) {
545 ; CHECK-LABEL: vmfsac_vf_nxv16f16_unmasked:
547 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
548 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
549 ; CHECK-NEXT: vmv4r.v v8, v12
551 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
552 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
553 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
554 %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> splat (i1 -1), i32 %evl)
555 %u = call <vscale x 16 x half> @llvm.vp.merge.nxv16f16(<vscale x 16 x i1> splat (i1 -1), <vscale x 16 x half> %v, <vscale x 16 x half> %c, i32 %evl)
556 ret <vscale x 16 x half> %u
559 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) {
560 ; CHECK-LABEL: vmfsac_vv_nxv16f16_ta:
562 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
563 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
564 ; CHECK-NEXT: vmv.v.v v8, v16
566 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
567 %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> splat (i1 -1), i32 %evl)
568 %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)
569 ret <vscale x 16 x half> %u
572 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) {
573 ; CHECK-LABEL: vmfsac_vf_nxv16f16_ta:
575 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
576 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
577 ; CHECK-NEXT: vmv.v.v v8, v12
579 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
580 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
581 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
582 %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> splat (i1 -1), i32 %evl)
583 %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)
584 ret <vscale x 16 x half> %u
587 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) {
588 ; CHECK-LABEL: vmfsac_vf_nxv16f16_commute_ta:
590 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
591 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
592 ; CHECK-NEXT: vmv.v.v v8, v12
594 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
595 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
596 %negc = call <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
597 %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> splat (i1 -1), i32 %evl)
598 %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)
599 ret <vscale x 16 x half> %u
602 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)
603 declare <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half>, <vscale x 32 x i1>, i32)
604 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)
605 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)
607 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) {
608 ; CHECK-LABEL: vmfsac_vv_nxv32f16:
610 ; CHECK-NEXT: vl8re16.v v24, (a0)
611 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, tu, mu
612 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
613 ; CHECK-NEXT: vmv8r.v v8, v24
615 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
616 %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> splat (i1 -1), i32 %evl)
617 %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)
618 ret <vscale x 32 x half> %u
621 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) {
622 ; CHECK-LABEL: vmfsac_vv_nxv32f16_unmasked:
624 ; CHECK-NEXT: vl8re16.v v24, (a0)
625 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, tu, ma
626 ; CHECK-NEXT: vfmsac.vv v24, v8, v16
627 ; CHECK-NEXT: vmv8r.v v8, v24
629 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
630 %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> splat (i1 -1), i32 %evl)
631 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> splat (i1 -1), <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
632 ret <vscale x 32 x half> %u
635 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) {
636 ; CHECK-LABEL: vmfsac_vf_nxv32f16:
638 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, mu
639 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
640 ; CHECK-NEXT: vmv8r.v v8, v16
642 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
643 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
644 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
645 %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> splat (i1 -1), i32 %evl)
646 %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)
647 ret <vscale x 32 x half> %u
650 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) {
651 ; CHECK-LABEL: vmfsac_vf_nxv32f16_commute:
653 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, mu
654 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
655 ; CHECK-NEXT: vmv8r.v v8, v16
657 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
658 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
659 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
660 %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> splat (i1 -1), i32 %evl)
661 %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)
662 ret <vscale x 32 x half> %u
665 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) {
666 ; CHECK-LABEL: vmfsac_vf_nxv32f16_unmasked:
668 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, ma
669 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8
670 ; CHECK-NEXT: vmv8r.v v8, v16
672 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
673 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
674 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
675 %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> splat (i1 -1), i32 %evl)
676 %u = call <vscale x 32 x half> @llvm.vp.merge.nxv32f16(<vscale x 32 x i1> splat (i1 -1), <vscale x 32 x half> %v, <vscale x 32 x half> %c, i32 %evl)
677 ret <vscale x 32 x half> %u
680 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) {
681 ; CHECK-LABEL: vmfsac_vv_nxv32f16_ta:
683 ; CHECK-NEXT: vl8re16.v v24, (a0)
684 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, mu
685 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
686 ; CHECK-NEXT: vmv.v.v v8, v24
688 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
689 %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> splat (i1 -1), i32 %evl)
690 %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)
691 ret <vscale x 32 x half> %u
694 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) {
695 ; CHECK-LABEL: vmfsac_vf_nxv32f16_ta:
697 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
698 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
699 ; CHECK-NEXT: vmv.v.v v8, v16
701 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
702 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
703 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
704 %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> splat (i1 -1), i32 %evl)
705 %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)
706 ret <vscale x 32 x half> %u
709 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) {
710 ; CHECK-LABEL: vmfsac_vf_nxv32f16_commute_ta:
712 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
713 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
714 ; CHECK-NEXT: vmv.v.v v8, v16
716 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
717 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
718 %negc = call <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
719 %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> splat (i1 -1), i32 %evl)
720 %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)
721 ret <vscale x 32 x half> %u
724 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)
725 declare <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
726 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)
727 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)
729 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) {
730 ; CHECK-LABEL: vmfsac_vv_nxv1f32:
732 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
733 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
734 ; CHECK-NEXT: vmv1r.v v8, v10
736 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
737 %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> splat (i1 -1), i32 %evl)
738 %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)
739 ret <vscale x 1 x float> %u
742 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) {
743 ; CHECK-LABEL: vmfsac_vv_nxv1f32_unmasked:
745 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
746 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
747 ; CHECK-NEXT: vmv1r.v v8, v10
749 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
750 %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> splat (i1 -1), i32 %evl)
751 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> splat (i1 -1), <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
752 ret <vscale x 1 x float> %u
755 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) {
756 ; CHECK-LABEL: vmfsac_vf_nxv1f32:
758 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
759 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
760 ; CHECK-NEXT: vmv1r.v v8, v9
762 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
763 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
764 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
765 %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> splat (i1 -1), i32 %evl)
766 %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)
767 ret <vscale x 1 x float> %u
770 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) {
771 ; CHECK-LABEL: vmfsac_vf_nxv1f32_commute:
773 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
774 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
775 ; CHECK-NEXT: vmv1r.v v8, v9
777 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
778 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
779 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
780 %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> splat (i1 -1), i32 %evl)
781 %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)
782 ret <vscale x 1 x float> %u
785 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) {
786 ; CHECK-LABEL: vmfsac_vf_nxv1f32_unmasked:
788 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
789 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
790 ; CHECK-NEXT: vmv1r.v v8, v9
792 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
793 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
794 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
795 %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> splat (i1 -1), i32 %evl)
796 %u = call <vscale x 1 x float> @llvm.vp.merge.nxv1f32(<vscale x 1 x i1> splat (i1 -1), <vscale x 1 x float> %v, <vscale x 1 x float> %c, i32 %evl)
797 ret <vscale x 1 x float> %u
800 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) {
801 ; CHECK-LABEL: vmfsac_vv_nxv1f32_ta:
803 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
804 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
805 ; CHECK-NEXT: vmv1r.v v8, v10
807 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
808 %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> splat (i1 -1), i32 %evl)
809 %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)
810 ret <vscale x 1 x float> %u
813 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) {
814 ; CHECK-LABEL: vmfsac_vf_nxv1f32_ta:
816 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
817 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
818 ; CHECK-NEXT: vmv1r.v v8, v9
820 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
821 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
822 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
823 %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> splat (i1 -1), i32 %evl)
824 %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)
825 ret <vscale x 1 x float> %u
828 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) {
829 ; CHECK-LABEL: vmfsac_vf_nxv1f32_commute_ta:
831 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
832 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
833 ; CHECK-NEXT: vmv1r.v v8, v9
835 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
836 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
837 %negc = call <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
838 %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> splat (i1 -1), i32 %evl)
839 %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)
840 ret <vscale x 1 x float> %u
843 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)
844 declare <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
845 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)
846 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)
848 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) {
849 ; CHECK-LABEL: vmfsac_vv_nxv2f32:
851 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
852 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
853 ; CHECK-NEXT: vmv1r.v v8, v10
855 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
856 %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> splat (i1 -1), i32 %evl)
857 %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)
858 ret <vscale x 2 x float> %u
861 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) {
862 ; CHECK-LABEL: vmfsac_vv_nxv2f32_unmasked:
864 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
865 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
866 ; CHECK-NEXT: vmv1r.v v8, v10
868 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
869 %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> splat (i1 -1), i32 %evl)
870 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> splat (i1 -1), <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
871 ret <vscale x 2 x float> %u
874 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) {
875 ; CHECK-LABEL: vmfsac_vf_nxv2f32:
877 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
878 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
879 ; CHECK-NEXT: vmv1r.v v8, v9
881 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
882 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
883 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
884 %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> splat (i1 -1), i32 %evl)
885 %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)
886 ret <vscale x 2 x float> %u
889 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) {
890 ; CHECK-LABEL: vmfsac_vf_nxv2f32_commute:
892 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
893 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
894 ; CHECK-NEXT: vmv1r.v v8, v9
896 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
897 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
898 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
899 %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> splat (i1 -1), i32 %evl)
900 %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)
901 ret <vscale x 2 x float> %u
904 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) {
905 ; CHECK-LABEL: vmfsac_vf_nxv2f32_unmasked:
907 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
908 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
909 ; CHECK-NEXT: vmv1r.v v8, v9
911 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
912 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
913 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
914 %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> splat (i1 -1), i32 %evl)
915 %u = call <vscale x 2 x float> @llvm.vp.merge.nxv2f32(<vscale x 2 x i1> splat (i1 -1), <vscale x 2 x float> %v, <vscale x 2 x float> %c, i32 %evl)
916 ret <vscale x 2 x float> %u
919 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) {
920 ; CHECK-LABEL: vmfsac_vv_nxv2f32_ta:
922 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
923 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
924 ; CHECK-NEXT: vmv.v.v v8, v10
926 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
927 %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> splat (i1 -1), i32 %evl)
928 %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)
929 ret <vscale x 2 x float> %u
932 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) {
933 ; CHECK-LABEL: vmfsac_vf_nxv2f32_ta:
935 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
936 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
937 ; CHECK-NEXT: vmv.v.v v8, v9
939 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
940 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
941 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
942 %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> splat (i1 -1), i32 %evl)
943 %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)
944 ret <vscale x 2 x float> %u
947 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) {
948 ; CHECK-LABEL: vmfsac_vf_nxv2f32_commute_ta:
950 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
951 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
952 ; CHECK-NEXT: vmv.v.v v8, v9
954 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
955 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
956 %negc = call <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
957 %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> splat (i1 -1), i32 %evl)
958 %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)
959 ret <vscale x 2 x float> %u
962 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)
963 declare <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
964 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)
965 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)
967 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) {
968 ; CHECK-LABEL: vmfsac_vv_nxv4f32:
970 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
971 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
972 ; CHECK-NEXT: vmv2r.v v8, v12
974 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
975 %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> splat (i1 -1), i32 %evl)
976 %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)
977 ret <vscale x 4 x float> %u
980 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) {
981 ; CHECK-LABEL: vmfsac_vv_nxv4f32_unmasked:
983 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
984 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
985 ; CHECK-NEXT: vmv2r.v v8, v12
987 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
988 %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> splat (i1 -1), i32 %evl)
989 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> splat (i1 -1), <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
990 ret <vscale x 4 x float> %u
993 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) {
994 ; CHECK-LABEL: vmfsac_vf_nxv4f32:
996 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
997 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
998 ; CHECK-NEXT: vmv2r.v v8, v10
1000 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1001 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1002 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1003 %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> splat (i1 -1), i32 %evl)
1004 %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)
1005 ret <vscale x 4 x float> %u
1008 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) {
1009 ; CHECK-LABEL: vmfsac_vf_nxv4f32_commute:
1011 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
1012 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1013 ; CHECK-NEXT: vmv2r.v v8, v10
1015 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1016 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1017 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1018 %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> splat (i1 -1), i32 %evl)
1019 %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)
1020 ret <vscale x 4 x float> %u
1023 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) {
1024 ; CHECK-LABEL: vmfsac_vf_nxv4f32_unmasked:
1026 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
1027 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
1028 ; CHECK-NEXT: vmv2r.v v8, v10
1030 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1031 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1032 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1033 %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> splat (i1 -1), i32 %evl)
1034 %u = call <vscale x 4 x float> @llvm.vp.merge.nxv4f32(<vscale x 4 x i1> splat (i1 -1), <vscale x 4 x float> %v, <vscale x 4 x float> %c, i32 %evl)
1035 ret <vscale x 4 x float> %u
1038 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) {
1039 ; CHECK-LABEL: vmfsac_vv_nxv4f32_ta:
1041 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1042 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1043 ; CHECK-NEXT: vmv.v.v v8, v12
1045 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1046 %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> splat (i1 -1), i32 %evl)
1047 %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)
1048 ret <vscale x 4 x float> %u
1051 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) {
1052 ; CHECK-LABEL: vmfsac_vf_nxv4f32_ta:
1054 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1055 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1056 ; CHECK-NEXT: vmv.v.v v8, v10
1058 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1059 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1060 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1061 %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> splat (i1 -1), i32 %evl)
1062 %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)
1063 ret <vscale x 4 x float> %u
1066 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) {
1067 ; CHECK-LABEL: vmfsac_vf_nxv4f32_commute_ta:
1069 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
1070 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1071 ; CHECK-NEXT: vmv.v.v v8, v10
1073 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1074 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1075 %negc = call <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1076 %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> splat (i1 -1), i32 %evl)
1077 %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)
1078 ret <vscale x 4 x float> %u
1081 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)
1082 declare <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
1083 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)
1084 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)
1086 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) {
1087 ; CHECK-LABEL: vmfsac_vv_nxv8f32:
1089 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1090 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1091 ; CHECK-NEXT: vmv4r.v v8, v16
1093 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1094 %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> splat (i1 -1), i32 %evl)
1095 %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)
1096 ret <vscale x 8 x float> %u
1099 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) {
1100 ; CHECK-LABEL: vmfsac_vv_nxv8f32_unmasked:
1102 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1103 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
1104 ; CHECK-NEXT: vmv4r.v v8, v16
1106 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1107 %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> splat (i1 -1), i32 %evl)
1108 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> splat (i1 -1), <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1109 ret <vscale x 8 x float> %u
1112 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) {
1113 ; CHECK-LABEL: vmfsac_vf_nxv8f32:
1115 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1116 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1117 ; CHECK-NEXT: vmv4r.v v8, v12
1119 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1120 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1121 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1122 %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> splat (i1 -1), i32 %evl)
1123 %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)
1124 ret <vscale x 8 x float> %u
1127 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) {
1128 ; CHECK-LABEL: vmfsac_vf_nxv8f32_commute:
1130 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1131 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1132 ; CHECK-NEXT: vmv4r.v v8, v12
1134 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1135 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1136 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1137 %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> splat (i1 -1), i32 %evl)
1138 %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)
1139 ret <vscale x 8 x float> %u
1142 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) {
1143 ; CHECK-LABEL: vmfsac_vf_nxv8f32_unmasked:
1145 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1146 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
1147 ; CHECK-NEXT: vmv4r.v v8, v12
1149 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1150 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1151 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1152 %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> splat (i1 -1), i32 %evl)
1153 %u = call <vscale x 8 x float> @llvm.vp.merge.nxv8f32(<vscale x 8 x i1> splat (i1 -1), <vscale x 8 x float> %v, <vscale x 8 x float> %c, i32 %evl)
1154 ret <vscale x 8 x float> %u
1157 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) {
1158 ; CHECK-LABEL: vmfsac_vv_nxv8f32_ta:
1160 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1161 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1162 ; CHECK-NEXT: vmv.v.v v8, v16
1164 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1165 %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> splat (i1 -1), i32 %evl)
1166 %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)
1167 ret <vscale x 8 x float> %u
1170 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) {
1171 ; CHECK-LABEL: vmfsac_vf_nxv8f32_ta:
1173 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1174 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1175 ; CHECK-NEXT: vmv.v.v v8, v12
1177 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1178 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1179 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1180 %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> splat (i1 -1), i32 %evl)
1181 %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)
1182 ret <vscale x 8 x float> %u
1185 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) {
1186 ; CHECK-LABEL: vmfsac_vf_nxv8f32_commute_ta:
1188 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1189 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1190 ; CHECK-NEXT: vmv.v.v v8, v12
1192 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1193 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1194 %negc = call <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1195 %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> splat (i1 -1), i32 %evl)
1196 %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)
1197 ret <vscale x 8 x float> %u
1200 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)
1201 declare <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float>, <vscale x 16 x i1>, i32)
1202 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)
1203 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)
1205 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) {
1206 ; CHECK-LABEL: vmfsac_vv_nxv16f32:
1208 ; CHECK-NEXT: vl8re32.v v24, (a0)
1209 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, tu, mu
1210 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1211 ; CHECK-NEXT: vmv8r.v v8, v24
1213 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1214 %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> splat (i1 -1), i32 %evl)
1215 %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)
1216 ret <vscale x 16 x float> %u
1219 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) {
1220 ; CHECK-LABEL: vmfsac_vv_nxv16f32_unmasked:
1222 ; CHECK-NEXT: vl8re32.v v24, (a0)
1223 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, tu, ma
1224 ; CHECK-NEXT: vfmsac.vv v24, v8, v16
1225 ; CHECK-NEXT: vmv8r.v v8, v24
1227 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1228 %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> splat (i1 -1), i32 %evl)
1229 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> splat (i1 -1), <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1230 ret <vscale x 16 x float> %u
1233 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) {
1234 ; CHECK-LABEL: vmfsac_vf_nxv16f32:
1236 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, mu
1237 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1238 ; CHECK-NEXT: vmv8r.v v8, v16
1240 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1241 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1242 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1243 %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> splat (i1 -1), i32 %evl)
1244 %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)
1245 ret <vscale x 16 x float> %u
1248 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) {
1249 ; CHECK-LABEL: vmfsac_vf_nxv16f32_commute:
1251 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, mu
1252 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1253 ; CHECK-NEXT: vmv8r.v v8, v16
1255 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1256 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1257 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1258 %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> splat (i1 -1), i32 %evl)
1259 %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)
1260 ret <vscale x 16 x float> %u
1263 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) {
1264 ; CHECK-LABEL: vmfsac_vf_nxv16f32_unmasked:
1266 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, ma
1267 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8
1268 ; CHECK-NEXT: vmv8r.v v8, v16
1270 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1271 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1272 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1273 %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> splat (i1 -1), i32 %evl)
1274 %u = call <vscale x 16 x float> @llvm.vp.merge.nxv16f32(<vscale x 16 x i1> splat (i1 -1), <vscale x 16 x float> %v, <vscale x 16 x float> %c, i32 %evl)
1275 ret <vscale x 16 x float> %u
1278 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) {
1279 ; CHECK-LABEL: vmfsac_vv_nxv16f32_ta:
1281 ; CHECK-NEXT: vl8re32.v v24, (a0)
1282 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, mu
1283 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1284 ; CHECK-NEXT: vmv.v.v v8, v24
1286 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1287 %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> splat (i1 -1), i32 %evl)
1288 %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)
1289 ret <vscale x 16 x float> %u
1292 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) {
1293 ; CHECK-LABEL: vmfsac_vf_nxv16f32_ta:
1295 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
1296 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1297 ; CHECK-NEXT: vmv.v.v v8, v16
1299 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1300 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1301 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1302 %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> splat (i1 -1), i32 %evl)
1303 %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)
1304 ret <vscale x 16 x float> %u
1307 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) {
1308 ; CHECK-LABEL: vmfsac_vf_nxv16f32_commute_ta:
1310 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
1311 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1312 ; CHECK-NEXT: vmv.v.v v8, v16
1314 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1315 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1316 %negc = call <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1317 %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> splat (i1 -1), i32 %evl)
1318 %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)
1319 ret <vscale x 16 x float> %u
1322 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)
1323 declare <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double>, <vscale x 1 x i1>, i32)
1324 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)
1325 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)
1327 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) {
1328 ; CHECK-LABEL: vmfsac_vv_nxv1f64:
1330 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1331 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1332 ; CHECK-NEXT: vmv1r.v v8, v10
1334 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1335 %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> splat (i1 -1), i32 %evl)
1336 %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)
1337 ret <vscale x 1 x double> %u
1340 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) {
1341 ; CHECK-LABEL: vmfsac_vv_nxv1f64_unmasked:
1343 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1344 ; CHECK-NEXT: vfmsac.vv v10, v8, v9
1345 ; CHECK-NEXT: vmv1r.v v8, v10
1347 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1348 %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> splat (i1 -1), i32 %evl)
1349 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> splat (i1 -1), <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1350 ret <vscale x 1 x double> %u
1353 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) {
1354 ; CHECK-LABEL: vmfsac_vf_nxv1f64:
1356 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1357 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1358 ; CHECK-NEXT: vmv1r.v v8, v9
1360 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1361 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1362 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1363 %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> splat (i1 -1), i32 %evl)
1364 %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)
1365 ret <vscale x 1 x double> %u
1368 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) {
1369 ; CHECK-LABEL: vmfsac_vf_nxv1f64_commute:
1371 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1372 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1373 ; CHECK-NEXT: vmv1r.v v8, v9
1375 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1376 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1377 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1378 %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> splat (i1 -1), i32 %evl)
1379 %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)
1380 ret <vscale x 1 x double> %u
1383 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) {
1384 ; CHECK-LABEL: vmfsac_vf_nxv1f64_unmasked:
1386 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1387 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8
1388 ; CHECK-NEXT: vmv1r.v v8, v9
1390 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1391 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1392 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1393 %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> splat (i1 -1), i32 %evl)
1394 %u = call <vscale x 1 x double> @llvm.vp.merge.nxv1f64(<vscale x 1 x i1> splat (i1 -1), <vscale x 1 x double> %v, <vscale x 1 x double> %c, i32 %evl)
1395 ret <vscale x 1 x double> %u
1398 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) {
1399 ; CHECK-LABEL: vmfsac_vv_nxv1f64_ta:
1401 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1402 ; CHECK-NEXT: vfmsac.vv v10, v8, v9, v0.t
1403 ; CHECK-NEXT: vmv.v.v v8, v10
1405 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1406 %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> splat (i1 -1), i32 %evl)
1407 %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)
1408 ret <vscale x 1 x double> %u
1411 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) {
1412 ; CHECK-LABEL: vmfsac_vf_nxv1f64_ta:
1414 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1415 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1416 ; CHECK-NEXT: vmv.v.v v8, v9
1418 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1419 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1420 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1421 %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> splat (i1 -1), i32 %evl)
1422 %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)
1423 ret <vscale x 1 x double> %u
1426 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) {
1427 ; CHECK-LABEL: vmfsac_vf_nxv1f64_commute_ta:
1429 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1430 ; CHECK-NEXT: vfmsac.vf v9, fa0, v8, v0.t
1431 ; CHECK-NEXT: vmv.v.v v8, v9
1433 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1434 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1435 %negc = call <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1436 %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> splat (i1 -1), i32 %evl)
1437 %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)
1438 ret <vscale x 1 x double> %u
1441 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)
1442 declare <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, i32)
1443 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)
1444 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)
1446 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) {
1447 ; CHECK-LABEL: vmfsac_vv_nxv2f64:
1449 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1450 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1451 ; CHECK-NEXT: vmv2r.v v8, v12
1453 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1454 %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> splat (i1 -1), i32 %evl)
1455 %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)
1456 ret <vscale x 2 x double> %u
1459 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) {
1460 ; CHECK-LABEL: vmfsac_vv_nxv2f64_unmasked:
1462 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1463 ; CHECK-NEXT: vfmsac.vv v12, v8, v10
1464 ; CHECK-NEXT: vmv2r.v v8, v12
1466 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1467 %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> splat (i1 -1), i32 %evl)
1468 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> splat (i1 -1), <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1469 ret <vscale x 2 x double> %u
1472 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) {
1473 ; CHECK-LABEL: vmfsac_vf_nxv2f64:
1475 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1476 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1477 ; CHECK-NEXT: vmv2r.v v8, v10
1479 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1480 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1481 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1482 %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> splat (i1 -1), i32 %evl)
1483 %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)
1484 ret <vscale x 2 x double> %u
1487 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) {
1488 ; CHECK-LABEL: vmfsac_vf_nxv2f64_commute:
1490 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1491 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1492 ; CHECK-NEXT: vmv2r.v v8, v10
1494 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1495 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1496 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1497 %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> splat (i1 -1), i32 %evl)
1498 %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)
1499 ret <vscale x 2 x double> %u
1502 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) {
1503 ; CHECK-LABEL: vmfsac_vf_nxv2f64_unmasked:
1505 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1506 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8
1507 ; CHECK-NEXT: vmv2r.v v8, v10
1509 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1510 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1511 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1512 %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> splat (i1 -1), i32 %evl)
1513 %u = call <vscale x 2 x double> @llvm.vp.merge.nxv2f64(<vscale x 2 x i1> splat (i1 -1), <vscale x 2 x double> %v, <vscale x 2 x double> %c, i32 %evl)
1514 ret <vscale x 2 x double> %u
1517 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) {
1518 ; CHECK-LABEL: vmfsac_vv_nxv2f64_ta:
1520 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1521 ; CHECK-NEXT: vfmsac.vv v12, v8, v10, v0.t
1522 ; CHECK-NEXT: vmv.v.v v8, v12
1524 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1525 %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> splat (i1 -1), i32 %evl)
1526 %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)
1527 ret <vscale x 2 x double> %u
1530 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) {
1531 ; CHECK-LABEL: vmfsac_vf_nxv2f64_ta:
1533 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1534 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1535 ; CHECK-NEXT: vmv.v.v v8, v10
1537 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1538 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1539 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1540 %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> splat (i1 -1), i32 %evl)
1541 %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)
1542 ret <vscale x 2 x double> %u
1545 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) {
1546 ; CHECK-LABEL: vmfsac_vf_nxv2f64_commute_ta:
1548 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1549 ; CHECK-NEXT: vfmsac.vf v10, fa0, v8, v0.t
1550 ; CHECK-NEXT: vmv.v.v v8, v10
1552 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1553 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1554 %negc = call <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1555 %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> splat (i1 -1), i32 %evl)
1556 %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)
1557 ret <vscale x 2 x double> %u
1560 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)
1561 declare <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double>, <vscale x 4 x i1>, i32)
1562 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)
1563 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)
1565 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) {
1566 ; CHECK-LABEL: vmfsac_vv_nxv4f64:
1568 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1569 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1570 ; CHECK-NEXT: vmv4r.v v8, v16
1572 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1573 %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> splat (i1 -1), i32 %evl)
1574 %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)
1575 ret <vscale x 4 x double> %u
1578 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) {
1579 ; CHECK-LABEL: vmfsac_vv_nxv4f64_unmasked:
1581 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1582 ; CHECK-NEXT: vfmsac.vv v16, v8, v12
1583 ; CHECK-NEXT: vmv4r.v v8, v16
1585 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1586 %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> splat (i1 -1), i32 %evl)
1587 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> splat (i1 -1), <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1588 ret <vscale x 4 x double> %u
1591 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) {
1592 ; CHECK-LABEL: vmfsac_vf_nxv4f64:
1594 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1595 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1596 ; CHECK-NEXT: vmv4r.v v8, v12
1598 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1599 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1600 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1601 %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> splat (i1 -1), i32 %evl)
1602 %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)
1603 ret <vscale x 4 x double> %u
1606 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) {
1607 ; CHECK-LABEL: vmfsac_vf_nxv4f64_commute:
1609 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1610 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1611 ; CHECK-NEXT: vmv4r.v v8, v12
1613 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1614 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1615 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1616 %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> splat (i1 -1), i32 %evl)
1617 %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)
1618 ret <vscale x 4 x double> %u
1621 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) {
1622 ; CHECK-LABEL: vmfsac_vf_nxv4f64_unmasked:
1624 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1625 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8
1626 ; CHECK-NEXT: vmv4r.v v8, v12
1628 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1629 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1630 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1631 %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> splat (i1 -1), i32 %evl)
1632 %u = call <vscale x 4 x double> @llvm.vp.merge.nxv4f64(<vscale x 4 x i1> splat (i1 -1), <vscale x 4 x double> %v, <vscale x 4 x double> %c, i32 %evl)
1633 ret <vscale x 4 x double> %u
1636 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) {
1637 ; CHECK-LABEL: vmfsac_vv_nxv4f64_ta:
1639 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1640 ; CHECK-NEXT: vfmsac.vv v16, v8, v12, v0.t
1641 ; CHECK-NEXT: vmv.v.v v8, v16
1643 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1644 %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> splat (i1 -1), i32 %evl)
1645 %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)
1646 ret <vscale x 4 x double> %u
1649 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) {
1650 ; CHECK-LABEL: vmfsac_vf_nxv4f64_ta:
1652 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1653 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1654 ; CHECK-NEXT: vmv.v.v v8, v12
1656 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1657 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1658 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1659 %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> splat (i1 -1), i32 %evl)
1660 %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)
1661 ret <vscale x 4 x double> %u
1664 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) {
1665 ; CHECK-LABEL: vmfsac_vf_nxv4f64_commute_ta:
1667 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1668 ; CHECK-NEXT: vfmsac.vf v12, fa0, v8, v0.t
1669 ; CHECK-NEXT: vmv.v.v v8, v12
1671 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1672 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1673 %negc = call <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1674 %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> splat (i1 -1), i32 %evl)
1675 %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)
1676 ret <vscale x 4 x double> %u
1679 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)
1680 declare <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double>, <vscale x 8 x i1>, i32)
1681 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)
1682 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)
1684 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) {
1685 ; CHECK-LABEL: vmfsac_vv_nxv8f64:
1687 ; CHECK-NEXT: vl8re64.v v24, (a0)
1688 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, tu, mu
1689 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1690 ; CHECK-NEXT: vmv8r.v v8, v24
1692 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1693 %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> splat (i1 -1), i32 %evl)
1694 %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)
1695 ret <vscale x 8 x double> %u
1698 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) {
1699 ; CHECK-LABEL: vmfsac_vv_nxv8f64_unmasked:
1701 ; CHECK-NEXT: vl8re64.v v24, (a0)
1702 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, tu, ma
1703 ; CHECK-NEXT: vfmsac.vv v24, v8, v16
1704 ; CHECK-NEXT: vmv8r.v v8, v24
1706 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1707 %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> splat (i1 -1), i32 %evl)
1708 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> splat (i1 -1), <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1709 ret <vscale x 8 x double> %u
1712 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) {
1713 ; CHECK-LABEL: vmfsac_vf_nxv8f64:
1715 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, mu
1716 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1717 ; CHECK-NEXT: vmv8r.v v8, v16
1719 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1720 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1721 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1722 %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> splat (i1 -1), i32 %evl)
1723 %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)
1724 ret <vscale x 8 x double> %u
1727 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) {
1728 ; CHECK-LABEL: vmfsac_vf_nxv8f64_commute:
1730 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, mu
1731 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1732 ; CHECK-NEXT: vmv8r.v v8, v16
1734 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1735 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1736 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1737 %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> splat (i1 -1), i32 %evl)
1738 %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)
1739 ret <vscale x 8 x double> %u
1742 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) {
1743 ; CHECK-LABEL: vmfsac_vf_nxv8f64_unmasked:
1745 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, ma
1746 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8
1747 ; CHECK-NEXT: vmv8r.v v8, v16
1749 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1750 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1751 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1752 %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> splat (i1 -1), i32 %evl)
1753 %u = call <vscale x 8 x double> @llvm.vp.merge.nxv8f64(<vscale x 8 x i1> splat (i1 -1), <vscale x 8 x double> %v, <vscale x 8 x double> %c, i32 %evl)
1754 ret <vscale x 8 x double> %u
1757 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) {
1758 ; CHECK-LABEL: vmfsac_vv_nxv8f64_ta:
1760 ; CHECK-NEXT: vl8re64.v v24, (a0)
1761 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, mu
1762 ; CHECK-NEXT: vfmsac.vv v24, v8, v16, v0.t
1763 ; CHECK-NEXT: vmv.v.v v8, v24
1765 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1766 %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> splat (i1 -1), i32 %evl)
1767 %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)
1768 ret <vscale x 8 x double> %u
1771 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) {
1772 ; CHECK-LABEL: vmfsac_vf_nxv8f64_ta:
1774 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
1775 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1776 ; CHECK-NEXT: vmv.v.v v8, v16
1778 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1779 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1780 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1781 %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> splat (i1 -1), i32 %evl)
1782 %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)
1783 ret <vscale x 8 x double> %u
1786 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) {
1787 ; CHECK-LABEL: vmfsac_vf_nxv8f64_commute_ta:
1789 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
1790 ; CHECK-NEXT: vfmsac.vf v16, fa0, v8, v0.t
1791 ; CHECK-NEXT: vmv.v.v v8, v16
1793 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1794 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1795 %negc = call <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1796 %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> splat (i1 -1), i32 %evl)
1797 %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)
1798 ret <vscale x 8 x double> %u