1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zvfh,+v,+m -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+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> @vfmacc_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: vfmacc_vv_nxv1f16:
15 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
16 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
17 ; CHECK-NEXT: vmv1r.v v8, v10
19 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
20 %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)
21 ret <vscale x 1 x half> %u
24 define <vscale x 1 x half> @vfmacc_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) {
25 ; CHECK-LABEL: vfmacc_vv_nxv1f16_unmasked:
27 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
28 ; CHECK-NEXT: vfmacc.vv v10, v8, v9
29 ; CHECK-NEXT: vmv1r.v v8, v10
31 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
32 %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)
33 ret <vscale x 1 x half> %u
36 define <vscale x 1 x half> @vfmacc_vf_nxv1f16(<vscale x 1 x half> %va, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
37 ; CHECK-LABEL: vfmacc_vf_nxv1f16:
39 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
40 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
41 ; CHECK-NEXT: vmv1r.v v8, v9
43 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
44 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
45 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
46 %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)
47 ret <vscale x 1 x half> %u
50 define <vscale x 1 x half> @vfmacc_vf_nxv1f16_commute(<vscale x 1 x half> %va, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
51 ; CHECK-LABEL: vfmacc_vf_nxv1f16_commute:
53 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, mu
54 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
55 ; CHECK-NEXT: vmv1r.v v8, v9
57 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
58 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
59 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x half> %va, <vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
60 %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)
61 ret <vscale x 1 x half> %u
64 define <vscale x 1 x half> @vfmacc_vf_nxv1f16_unmasked(<vscale x 1 x half> %va, half %b, <vscale x 1 x half> %c, i32 zeroext %evl) {
65 ; CHECK-LABEL: vfmacc_vf_nxv1f16_unmasked:
67 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, tu, ma
68 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8
69 ; CHECK-NEXT: vmv1r.v v8, v9
71 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
72 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
73 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
74 %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)
75 ret <vscale x 1 x half> %u
78 define <vscale x 1 x half> @vfmacc_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) {
79 ; CHECK-LABEL: vfmacc_vv_nxv1f16_ta:
81 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
82 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
83 ; CHECK-NEXT: vmv1r.v v8, v10
85 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
86 %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)
87 ret <vscale x 1 x half> %u
90 define <vscale x 1 x half> @vfmacc_vf_nxv1f16_ta(<vscale x 1 x half> %va, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
91 ; CHECK-LABEL: vfmacc_vf_nxv1f16_ta:
93 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
94 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
95 ; CHECK-NEXT: vmv1r.v v8, v9
97 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
98 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
99 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
100 %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)
101 ret <vscale x 1 x half> %u
104 define <vscale x 1 x half> @vfmacc_vf_nxv1f16_commute_ta(<vscale x 1 x half> %va, half %b, <vscale x 1 x half> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
105 ; CHECK-LABEL: vfmacc_vf_nxv1f16_commute_ta:
107 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, mu
108 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
109 ; CHECK-NEXT: vmv1r.v v8, v9
111 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
112 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
113 %v = call <vscale x 1 x half> @llvm.vp.fma.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x half> %va, <vscale x 1 x half> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
114 %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)
115 ret <vscale x 1 x half> %u
118 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)
119 declare <vscale x 2 x half> @llvm.vp.fneg.nxv2f16(<vscale x 2 x half>, <vscale x 2 x i1>, i32)
120 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)
121 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)
123 define <vscale x 2 x half> @vfmacc_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) {
124 ; CHECK-LABEL: vfmacc_vv_nxv2f16:
126 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
127 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
128 ; CHECK-NEXT: vmv1r.v v8, v10
130 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
131 %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)
132 ret <vscale x 2 x half> %u
135 define <vscale x 2 x half> @vfmacc_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) {
136 ; CHECK-LABEL: vfmacc_vv_nxv2f16_unmasked:
138 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
139 ; CHECK-NEXT: vfmacc.vv v10, v8, v9
140 ; CHECK-NEXT: vmv1r.v v8, v10
142 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
143 %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)
144 ret <vscale x 2 x half> %u
147 define <vscale x 2 x half> @vfmacc_vf_nxv2f16(<vscale x 2 x half> %va, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
148 ; CHECK-LABEL: vfmacc_vf_nxv2f16:
150 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
151 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
152 ; CHECK-NEXT: vmv1r.v v8, v9
154 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
155 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
156 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
157 %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)
158 ret <vscale x 2 x half> %u
161 define <vscale x 2 x half> @vfmacc_vf_nxv2f16_commute(<vscale x 2 x half> %va, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
162 ; CHECK-LABEL: vfmacc_vf_nxv2f16_commute:
164 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, mu
165 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
166 ; CHECK-NEXT: vmv1r.v v8, v9
168 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
169 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
170 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x half> %va, <vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
171 %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)
172 ret <vscale x 2 x half> %u
175 define <vscale x 2 x half> @vfmacc_vf_nxv2f16_unmasked(<vscale x 2 x half> %va, half %b, <vscale x 2 x half> %c, i32 zeroext %evl) {
176 ; CHECK-LABEL: vfmacc_vf_nxv2f16_unmasked:
178 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, tu, ma
179 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8
180 ; CHECK-NEXT: vmv1r.v v8, v9
182 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
183 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
184 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
185 %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)
186 ret <vscale x 2 x half> %u
189 define <vscale x 2 x half> @vfmacc_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) {
190 ; CHECK-LABEL: vfmacc_vv_nxv2f16_ta:
192 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
193 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
194 ; CHECK-NEXT: vmv1r.v v8, v10
196 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
197 %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)
198 ret <vscale x 2 x half> %u
201 define <vscale x 2 x half> @vfmacc_vf_nxv2f16_ta(<vscale x 2 x half> %va, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
202 ; CHECK-LABEL: vfmacc_vf_nxv2f16_ta:
204 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
205 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
206 ; CHECK-NEXT: vmv1r.v v8, v9
208 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
209 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
210 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x half> %c, <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> @vfmacc_vf_nxv2f16_commute_ta(<vscale x 2 x half> %va, half %b, <vscale x 2 x half> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
216 ; CHECK-LABEL: vfmacc_vf_nxv2f16_commute_ta:
218 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, mu
219 ; CHECK-NEXT: vfmacc.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 %v = call <vscale x 2 x half> @llvm.vp.fma.nxv2f16(<vscale x 2 x half> %vb, <vscale x 2 x half> %va, <vscale x 2 x half> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
225 %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)
226 ret <vscale x 2 x half> %u
229 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)
230 declare <vscale x 4 x half> @llvm.vp.fneg.nxv4f16(<vscale x 4 x half>, <vscale x 4 x i1>, i32)
231 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)
232 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)
234 define <vscale x 4 x half> @vfmacc_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) {
235 ; CHECK-LABEL: vfmacc_vv_nxv4f16:
237 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
238 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
239 ; CHECK-NEXT: vmv1r.v v8, v10
241 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
242 %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)
243 ret <vscale x 4 x half> %u
246 define <vscale x 4 x half> @vfmacc_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) {
247 ; CHECK-LABEL: vfmacc_vv_nxv4f16_unmasked:
249 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
250 ; CHECK-NEXT: vfmacc.vv v10, v8, v9
251 ; CHECK-NEXT: vmv1r.v v8, v10
253 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
254 %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)
255 ret <vscale x 4 x half> %u
258 define <vscale x 4 x half> @vfmacc_vf_nxv4f16(<vscale x 4 x half> %va, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
259 ; CHECK-LABEL: vfmacc_vf_nxv4f16:
261 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
262 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
263 ; CHECK-NEXT: vmv1r.v v8, v9
265 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
266 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
267 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
268 %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)
269 ret <vscale x 4 x half> %u
272 define <vscale x 4 x half> @vfmacc_vf_nxv4f16_commute(<vscale x 4 x half> %va, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
273 ; CHECK-LABEL: vfmacc_vf_nxv4f16_commute:
275 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, mu
276 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
277 ; CHECK-NEXT: vmv1r.v v8, v9
279 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
280 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
281 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x half> %va, <vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
282 %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)
283 ret <vscale x 4 x half> %u
286 define <vscale x 4 x half> @vfmacc_vf_nxv4f16_unmasked(<vscale x 4 x half> %va, half %b, <vscale x 4 x half> %c, i32 zeroext %evl) {
287 ; CHECK-LABEL: vfmacc_vf_nxv4f16_unmasked:
289 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, tu, ma
290 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8
291 ; CHECK-NEXT: vmv1r.v v8, v9
293 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
294 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
295 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
296 %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)
297 ret <vscale x 4 x half> %u
300 define <vscale x 4 x half> @vfmacc_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) {
301 ; CHECK-LABEL: vfmacc_vv_nxv4f16_ta:
303 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
304 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
305 ; CHECK-NEXT: vmv.v.v v8, v10
307 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %a, <vscale x 4 x half> %b, <vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
308 %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)
309 ret <vscale x 4 x half> %u
312 define <vscale x 4 x half> @vfmacc_vf_nxv4f16_ta(<vscale x 4 x half> %va, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
313 ; CHECK-LABEL: vfmacc_vf_nxv4f16_ta:
315 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
316 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
317 ; CHECK-NEXT: vmv.v.v v8, v9
319 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
320 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
321 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
322 %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)
323 ret <vscale x 4 x half> %u
326 define <vscale x 4 x half> @vfmacc_vf_nxv4f16_commute_ta(<vscale x 4 x half> %va, half %b, <vscale x 4 x half> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
327 ; CHECK-LABEL: vfmacc_vf_nxv4f16_commute_ta:
329 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, mu
330 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
331 ; CHECK-NEXT: vmv.v.v v8, v9
333 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
334 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
335 %v = call <vscale x 4 x half> @llvm.vp.fma.nxv4f16(<vscale x 4 x half> %vb, <vscale x 4 x half> %va, <vscale x 4 x half> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
336 %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)
337 ret <vscale x 4 x half> %u
340 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)
341 declare <vscale x 8 x half> @llvm.vp.fneg.nxv8f16(<vscale x 8 x half>, <vscale x 8 x i1>, i32)
342 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)
343 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)
345 define <vscale x 8 x half> @vfmacc_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) {
346 ; CHECK-LABEL: vfmacc_vv_nxv8f16:
348 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
349 ; CHECK-NEXT: vfmacc.vv v12, v8, v10, v0.t
350 ; CHECK-NEXT: vmv2r.v v8, v12
352 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
353 %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)
354 ret <vscale x 8 x half> %u
357 define <vscale x 8 x half> @vfmacc_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) {
358 ; CHECK-LABEL: vfmacc_vv_nxv8f16_unmasked:
360 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
361 ; CHECK-NEXT: vfmacc.vv v12, v8, v10
362 ; CHECK-NEXT: vmv2r.v v8, v12
364 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
365 %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)
366 ret <vscale x 8 x half> %u
369 define <vscale x 8 x half> @vfmacc_vf_nxv8f16(<vscale x 8 x half> %va, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
370 ; CHECK-LABEL: vfmacc_vf_nxv8f16:
372 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
373 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
374 ; CHECK-NEXT: vmv2r.v v8, v10
376 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
377 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
378 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
379 %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)
380 ret <vscale x 8 x half> %u
383 define <vscale x 8 x half> @vfmacc_vf_nxv8f16_commute(<vscale x 8 x half> %va, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
384 ; CHECK-LABEL: vfmacc_vf_nxv8f16_commute:
386 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, mu
387 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
388 ; CHECK-NEXT: vmv2r.v v8, v10
390 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
391 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
392 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %va, <vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
393 %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)
394 ret <vscale x 8 x half> %u
397 define <vscale x 8 x half> @vfmacc_vf_nxv8f16_unmasked(<vscale x 8 x half> %va, half %b, <vscale x 8 x half> %c, i32 zeroext %evl) {
398 ; CHECK-LABEL: vfmacc_vf_nxv8f16_unmasked:
400 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, tu, ma
401 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8
402 ; CHECK-NEXT: vmv2r.v v8, v10
404 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
405 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
406 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
407 %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)
408 ret <vscale x 8 x half> %u
411 define <vscale x 8 x half> @vfmacc_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) {
412 ; CHECK-LABEL: vfmacc_vv_nxv8f16_ta:
414 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
415 ; CHECK-NEXT: vfmacc.vv v12, v8, v10, v0.t
416 ; CHECK-NEXT: vmv.v.v v8, v12
418 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
419 %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)
420 ret <vscale x 8 x half> %u
423 define <vscale x 8 x half> @vfmacc_vf_nxv8f16_ta(<vscale x 8 x half> %va, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
424 ; CHECK-LABEL: vfmacc_vf_nxv8f16_ta:
426 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
427 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
428 ; CHECK-NEXT: vmv.v.v v8, v10
430 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
431 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
432 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
433 %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)
434 ret <vscale x 8 x half> %u
437 define <vscale x 8 x half> @vfmacc_vf_nxv8f16_commute_ta(<vscale x 8 x half> %va, half %b, <vscale x 8 x half> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
438 ; CHECK-LABEL: vfmacc_vf_nxv8f16_commute_ta:
440 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, mu
441 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
442 ; CHECK-NEXT: vmv.v.v v8, v10
444 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
445 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
446 %v = call <vscale x 8 x half> @llvm.vp.fma.nxv8f16(<vscale x 8 x half> %vb, <vscale x 8 x half> %va, <vscale x 8 x half> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
447 %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)
448 ret <vscale x 8 x half> %u
451 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)
452 declare <vscale x 16 x half> @llvm.vp.fneg.nxv16f16(<vscale x 16 x half>, <vscale x 16 x i1>, i32)
453 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)
454 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)
456 define <vscale x 16 x half> @vfmacc_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) {
457 ; CHECK-LABEL: vfmacc_vv_nxv16f16:
459 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
460 ; CHECK-NEXT: vfmacc.vv v16, v8, v12, v0.t
461 ; CHECK-NEXT: vmv4r.v v8, v16
463 %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> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
464 %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)
465 ret <vscale x 16 x half> %u
468 define <vscale x 16 x half> @vfmacc_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) {
469 ; CHECK-LABEL: vfmacc_vv_nxv16f16_unmasked:
471 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
472 ; CHECK-NEXT: vfmacc.vv v16, v8, v12
473 ; CHECK-NEXT: vmv4r.v v8, v16
475 %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> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
476 %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)
477 ret <vscale x 16 x half> %u
480 define <vscale x 16 x half> @vfmacc_vf_nxv16f16(<vscale x 16 x half> %va, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
481 ; CHECK-LABEL: vfmacc_vf_nxv16f16:
483 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
484 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
485 ; CHECK-NEXT: vmv4r.v v8, v12
487 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
488 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
489 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
490 %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)
491 ret <vscale x 16 x half> %u
494 define <vscale x 16 x half> @vfmacc_vf_nxv16f16_commute(<vscale x 16 x half> %va, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
495 ; CHECK-LABEL: vfmacc_vf_nxv16f16_commute:
497 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, mu
498 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
499 ; CHECK-NEXT: vmv4r.v v8, v12
501 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
502 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
503 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x half> %va, <vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
504 %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)
505 ret <vscale x 16 x half> %u
508 define <vscale x 16 x half> @vfmacc_vf_nxv16f16_unmasked(<vscale x 16 x half> %va, half %b, <vscale x 16 x half> %c, i32 zeroext %evl) {
509 ; CHECK-LABEL: vfmacc_vf_nxv16f16_unmasked:
511 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, tu, ma
512 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8
513 ; CHECK-NEXT: vmv4r.v v8, v12
515 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
516 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
517 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
518 %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)
519 ret <vscale x 16 x half> %u
522 define <vscale x 16 x half> @vfmacc_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) {
523 ; CHECK-LABEL: vfmacc_vv_nxv16f16_ta:
525 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
526 ; CHECK-NEXT: vfmacc.vv v16, v8, v12, v0.t
527 ; CHECK-NEXT: vmv.v.v v8, v16
529 %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> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
530 %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)
531 ret <vscale x 16 x half> %u
534 define <vscale x 16 x half> @vfmacc_vf_nxv16f16_ta(<vscale x 16 x half> %va, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
535 ; CHECK-LABEL: vfmacc_vf_nxv16f16_ta:
537 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
538 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
539 ; CHECK-NEXT: vmv.v.v v8, v12
541 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
542 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
543 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
544 %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)
545 ret <vscale x 16 x half> %u
548 define <vscale x 16 x half> @vfmacc_vf_nxv16f16_commute_ta(<vscale x 16 x half> %va, half %b, <vscale x 16 x half> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
549 ; CHECK-LABEL: vfmacc_vf_nxv16f16_commute_ta:
551 ; CHECK-NEXT: vsetvli zero, a0, e16, m4, ta, mu
552 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
553 ; CHECK-NEXT: vmv.v.v v8, v12
555 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
556 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
557 %v = call <vscale x 16 x half> @llvm.vp.fma.nxv16f16(<vscale x 16 x half> %vb, <vscale x 16 x half> %va, <vscale x 16 x half> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
558 %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)
559 ret <vscale x 16 x half> %u
562 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)
563 declare <vscale x 32 x half> @llvm.vp.fneg.nxv32f16(<vscale x 32 x half>, <vscale x 32 x i1>, i32)
564 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)
565 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)
567 define <vscale x 32 x half> @vfmacc_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) {
568 ; CHECK-LABEL: vfmacc_vv_nxv32f16:
570 ; CHECK-NEXT: vl8re16.v v24, (a0)
571 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, tu, mu
572 ; CHECK-NEXT: vfmacc.vv v24, v8, v16, v0.t
573 ; CHECK-NEXT: vmv8r.v v8, v24
575 %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> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
576 %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)
577 ret <vscale x 32 x half> %u
580 define <vscale x 32 x half> @vfmacc_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) {
581 ; CHECK-LABEL: vfmacc_vv_nxv32f16_unmasked:
583 ; CHECK-NEXT: vl8re16.v v24, (a0)
584 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, tu, ma
585 ; CHECK-NEXT: vfmacc.vv v24, v8, v16
586 ; CHECK-NEXT: vmv8r.v v8, v24
588 %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> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
589 %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)
590 ret <vscale x 32 x half> %u
593 define <vscale x 32 x half> @vfmacc_vf_nxv32f16(<vscale x 32 x half> %va, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
594 ; CHECK-LABEL: vfmacc_vf_nxv32f16:
596 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, mu
597 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
598 ; CHECK-NEXT: vmv8r.v v8, v16
600 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
601 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
602 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
603 %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)
604 ret <vscale x 32 x half> %u
607 define <vscale x 32 x half> @vfmacc_vf_nxv32f16_commute(<vscale x 32 x half> %va, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
608 ; CHECK-LABEL: vfmacc_vf_nxv32f16_commute:
610 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, mu
611 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
612 ; CHECK-NEXT: vmv8r.v v8, v16
614 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
615 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
616 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %vb, <vscale x 32 x half> %va, <vscale x 32 x half> %c, <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> @vfmacc_vf_nxv32f16_unmasked(<vscale x 32 x half> %va, half %b, <vscale x 32 x half> %c, i32 zeroext %evl) {
622 ; CHECK-LABEL: vfmacc_vf_nxv32f16_unmasked:
624 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, tu, ma
625 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8
626 ; CHECK-NEXT: vmv8r.v v8, v16
628 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
629 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
630 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x half> %c, <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> @vfmacc_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) {
636 ; CHECK-LABEL: vfmacc_vv_nxv32f16_ta:
638 ; CHECK-NEXT: vl8re16.v v24, (a0)
639 ; CHECK-NEXT: vsetvli zero, a1, e16, m8, ta, mu
640 ; CHECK-NEXT: vfmacc.vv v24, v8, v16, v0.t
641 ; CHECK-NEXT: vmv.v.v v8, v24
643 %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> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
644 %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)
645 ret <vscale x 32 x half> %u
648 define <vscale x 32 x half> @vfmacc_vf_nxv32f16_ta(<vscale x 32 x half> %va, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
649 ; CHECK-LABEL: vfmacc_vf_nxv32f16_ta:
651 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
652 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
653 ; CHECK-NEXT: vmv.v.v v8, v16
655 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
656 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
657 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
658 %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)
659 ret <vscale x 32 x half> %u
662 define <vscale x 32 x half> @vfmacc_vf_nxv32f16_commute_ta(<vscale x 32 x half> %va, half %b, <vscale x 32 x half> %c, <vscale x 32 x i1> %m, i32 zeroext %evl) {
663 ; CHECK-LABEL: vfmacc_vf_nxv32f16_commute_ta:
665 ; CHECK-NEXT: vsetvli zero, a0, e16, m8, ta, mu
666 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
667 ; CHECK-NEXT: vmv.v.v v8, v16
669 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
670 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
671 %v = call <vscale x 32 x half> @llvm.vp.fma.nxv32f16(<vscale x 32 x half> %vb, <vscale x 32 x half> %va, <vscale x 32 x half> %c, <vscale x 32 x i1> splat (i1 -1), i32 %evl)
672 %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)
673 ret <vscale x 32 x half> %u
676 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)
677 declare <vscale x 1 x float> @llvm.vp.fneg.nxv1f32(<vscale x 1 x float>, <vscale x 1 x i1>, i32)
678 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)
679 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)
681 define <vscale x 1 x float> @vfmacc_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) {
682 ; CHECK-LABEL: vfmacc_vv_nxv1f32:
684 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
685 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
686 ; CHECK-NEXT: vmv1r.v v8, v10
688 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
689 %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)
690 ret <vscale x 1 x float> %u
693 define <vscale x 1 x float> @vfmacc_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) {
694 ; CHECK-LABEL: vfmacc_vv_nxv1f32_unmasked:
696 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
697 ; CHECK-NEXT: vfmacc.vv v10, v8, v9
698 ; CHECK-NEXT: vmv1r.v v8, v10
700 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
701 %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)
702 ret <vscale x 1 x float> %u
705 define <vscale x 1 x float> @vfmacc_vf_nxv1f32(<vscale x 1 x float> %va, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
706 ; CHECK-LABEL: vfmacc_vf_nxv1f32:
708 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
709 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
710 ; CHECK-NEXT: vmv1r.v v8, v9
712 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
713 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
714 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
715 %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)
716 ret <vscale x 1 x float> %u
719 define <vscale x 1 x float> @vfmacc_vf_nxv1f32_commute(<vscale x 1 x float> %va, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
720 ; CHECK-LABEL: vfmacc_vf_nxv1f32_commute:
722 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, mu
723 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
724 ; CHECK-NEXT: vmv1r.v v8, v9
726 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
727 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
728 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x float> %va, <vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
729 %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)
730 ret <vscale x 1 x float> %u
733 define <vscale x 1 x float> @vfmacc_vf_nxv1f32_unmasked(<vscale x 1 x float> %va, float %b, <vscale x 1 x float> %c, i32 zeroext %evl) {
734 ; CHECK-LABEL: vfmacc_vf_nxv1f32_unmasked:
736 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, tu, ma
737 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8
738 ; CHECK-NEXT: vmv1r.v v8, v9
740 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
741 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
742 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
743 %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)
744 ret <vscale x 1 x float> %u
747 define <vscale x 1 x float> @vfmacc_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) {
748 ; CHECK-LABEL: vfmacc_vv_nxv1f32_ta:
750 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
751 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
752 ; CHECK-NEXT: vmv1r.v v8, v10
754 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
755 %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)
756 ret <vscale x 1 x float> %u
759 define <vscale x 1 x float> @vfmacc_vf_nxv1f32_ta(<vscale x 1 x float> %va, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
760 ; CHECK-LABEL: vfmacc_vf_nxv1f32_ta:
762 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
763 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
764 ; CHECK-NEXT: vmv1r.v v8, v9
766 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
767 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
768 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
769 %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)
770 ret <vscale x 1 x float> %u
773 define <vscale x 1 x float> @vfmacc_vf_nxv1f32_commute_ta(<vscale x 1 x float> %va, float %b, <vscale x 1 x float> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
774 ; CHECK-LABEL: vfmacc_vf_nxv1f32_commute_ta:
776 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, mu
777 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
778 ; CHECK-NEXT: vmv1r.v v8, v9
780 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
781 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
782 %v = call <vscale x 1 x float> @llvm.vp.fma.nxv1f32(<vscale x 1 x float> %vb, <vscale x 1 x float> %va, <vscale x 1 x float> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
783 %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)
784 ret <vscale x 1 x float> %u
787 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)
788 declare <vscale x 2 x float> @llvm.vp.fneg.nxv2f32(<vscale x 2 x float>, <vscale x 2 x i1>, i32)
789 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)
790 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)
792 define <vscale x 2 x float> @vfmacc_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) {
793 ; CHECK-LABEL: vfmacc_vv_nxv2f32:
795 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
796 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
797 ; CHECK-NEXT: vmv1r.v v8, v10
799 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
800 %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)
801 ret <vscale x 2 x float> %u
804 define <vscale x 2 x float> @vfmacc_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) {
805 ; CHECK-LABEL: vfmacc_vv_nxv2f32_unmasked:
807 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
808 ; CHECK-NEXT: vfmacc.vv v10, v8, v9
809 ; CHECK-NEXT: vmv1r.v v8, v10
811 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
812 %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)
813 ret <vscale x 2 x float> %u
816 define <vscale x 2 x float> @vfmacc_vf_nxv2f32(<vscale x 2 x float> %va, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
817 ; CHECK-LABEL: vfmacc_vf_nxv2f32:
819 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
820 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
821 ; CHECK-NEXT: vmv1r.v v8, v9
823 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
824 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
825 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
826 %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)
827 ret <vscale x 2 x float> %u
830 define <vscale x 2 x float> @vfmacc_vf_nxv2f32_commute(<vscale x 2 x float> %va, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
831 ; CHECK-LABEL: vfmacc_vf_nxv2f32_commute:
833 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, mu
834 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
835 ; CHECK-NEXT: vmv1r.v v8, v9
837 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
838 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
839 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x float> %va, <vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
840 %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)
841 ret <vscale x 2 x float> %u
844 define <vscale x 2 x float> @vfmacc_vf_nxv2f32_unmasked(<vscale x 2 x float> %va, float %b, <vscale x 2 x float> %c, i32 zeroext %evl) {
845 ; CHECK-LABEL: vfmacc_vf_nxv2f32_unmasked:
847 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, tu, ma
848 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8
849 ; CHECK-NEXT: vmv1r.v v8, v9
851 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
852 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
853 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
854 %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)
855 ret <vscale x 2 x float> %u
858 define <vscale x 2 x float> @vfmacc_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) {
859 ; CHECK-LABEL: vfmacc_vv_nxv2f32_ta:
861 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
862 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
863 ; CHECK-NEXT: vmv.v.v v8, v10
865 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
866 %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)
867 ret <vscale x 2 x float> %u
870 define <vscale x 2 x float> @vfmacc_vf_nxv2f32_ta(<vscale x 2 x float> %va, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
871 ; CHECK-LABEL: vfmacc_vf_nxv2f32_ta:
873 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
874 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
875 ; CHECK-NEXT: vmv.v.v v8, v9
877 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
878 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
879 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
880 %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)
881 ret <vscale x 2 x float> %u
884 define <vscale x 2 x float> @vfmacc_vf_nxv2f32_commute_ta(<vscale x 2 x float> %va, float %b, <vscale x 2 x float> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
885 ; CHECK-LABEL: vfmacc_vf_nxv2f32_commute_ta:
887 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, mu
888 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
889 ; CHECK-NEXT: vmv.v.v v8, v9
891 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
892 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
893 %v = call <vscale x 2 x float> @llvm.vp.fma.nxv2f32(<vscale x 2 x float> %vb, <vscale x 2 x float> %va, <vscale x 2 x float> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
894 %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)
895 ret <vscale x 2 x float> %u
898 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)
899 declare <vscale x 4 x float> @llvm.vp.fneg.nxv4f32(<vscale x 4 x float>, <vscale x 4 x i1>, i32)
900 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)
901 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)
903 define <vscale x 4 x float> @vfmacc_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) {
904 ; CHECK-LABEL: vfmacc_vv_nxv4f32:
906 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
907 ; CHECK-NEXT: vfmacc.vv v12, v8, v10, v0.t
908 ; CHECK-NEXT: vmv2r.v v8, v12
910 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
911 %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)
912 ret <vscale x 4 x float> %u
915 define <vscale x 4 x float> @vfmacc_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) {
916 ; CHECK-LABEL: vfmacc_vv_nxv4f32_unmasked:
918 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
919 ; CHECK-NEXT: vfmacc.vv v12, v8, v10
920 ; CHECK-NEXT: vmv2r.v v8, v12
922 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
923 %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)
924 ret <vscale x 4 x float> %u
927 define <vscale x 4 x float> @vfmacc_vf_nxv4f32(<vscale x 4 x float> %va, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
928 ; CHECK-LABEL: vfmacc_vf_nxv4f32:
930 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
931 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
932 ; CHECK-NEXT: vmv2r.v v8, v10
934 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
935 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
936 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
937 %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)
938 ret <vscale x 4 x float> %u
941 define <vscale x 4 x float> @vfmacc_vf_nxv4f32_commute(<vscale x 4 x float> %va, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
942 ; CHECK-LABEL: vfmacc_vf_nxv4f32_commute:
944 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, mu
945 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
946 ; CHECK-NEXT: vmv2r.v v8, v10
948 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
949 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
950 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x float> %va, <vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
951 %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)
952 ret <vscale x 4 x float> %u
955 define <vscale x 4 x float> @vfmacc_vf_nxv4f32_unmasked(<vscale x 4 x float> %va, float %b, <vscale x 4 x float> %c, i32 zeroext %evl) {
956 ; CHECK-LABEL: vfmacc_vf_nxv4f32_unmasked:
958 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, tu, ma
959 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8
960 ; CHECK-NEXT: vmv2r.v v8, v10
962 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
963 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
964 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
965 %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)
966 ret <vscale x 4 x float> %u
969 define <vscale x 4 x float> @vfmacc_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) {
970 ; CHECK-LABEL: vfmacc_vv_nxv4f32_ta:
972 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
973 ; CHECK-NEXT: vfmacc.vv v12, v8, v10, v0.t
974 ; CHECK-NEXT: vmv.v.v v8, v12
976 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
977 %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)
978 ret <vscale x 4 x float> %u
981 define <vscale x 4 x float> @vfmacc_vf_nxv4f32_ta(<vscale x 4 x float> %va, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
982 ; CHECK-LABEL: vfmacc_vf_nxv4f32_ta:
984 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
985 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
986 ; CHECK-NEXT: vmv.v.v v8, v10
988 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
989 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
990 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
991 %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)
992 ret <vscale x 4 x float> %u
995 define <vscale x 4 x float> @vfmacc_vf_nxv4f32_commute_ta(<vscale x 4 x float> %va, float %b, <vscale x 4 x float> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
996 ; CHECK-LABEL: vfmacc_vf_nxv4f32_commute_ta:
998 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, mu
999 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
1000 ; CHECK-NEXT: vmv.v.v v8, v10
1002 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
1003 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
1004 %v = call <vscale x 4 x float> @llvm.vp.fma.nxv4f32(<vscale x 4 x float> %vb, <vscale x 4 x float> %va, <vscale x 4 x float> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1005 %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)
1006 ret <vscale x 4 x float> %u
1009 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)
1010 declare <vscale x 8 x float> @llvm.vp.fneg.nxv8f32(<vscale x 8 x float>, <vscale x 8 x i1>, i32)
1011 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)
1012 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)
1014 define <vscale x 8 x float> @vfmacc_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) {
1015 ; CHECK-LABEL: vfmacc_vv_nxv8f32:
1017 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1018 ; CHECK-NEXT: vfmacc.vv v16, v8, v12, v0.t
1019 ; CHECK-NEXT: vmv4r.v v8, v16
1021 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1022 %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)
1023 ret <vscale x 8 x float> %u
1026 define <vscale x 8 x float> @vfmacc_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) {
1027 ; CHECK-LABEL: vfmacc_vv_nxv8f32_unmasked:
1029 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1030 ; CHECK-NEXT: vfmacc.vv v16, v8, v12
1031 ; CHECK-NEXT: vmv4r.v v8, v16
1033 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1034 %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)
1035 ret <vscale x 8 x float> %u
1038 define <vscale x 8 x float> @vfmacc_vf_nxv8f32(<vscale x 8 x float> %va, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1039 ; CHECK-LABEL: vfmacc_vf_nxv8f32:
1041 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1042 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1043 ; CHECK-NEXT: vmv4r.v v8, v12
1045 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1046 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1047 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1048 %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)
1049 ret <vscale x 8 x float> %u
1052 define <vscale x 8 x float> @vfmacc_vf_nxv8f32_commute(<vscale x 8 x float> %va, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1053 ; CHECK-LABEL: vfmacc_vf_nxv8f32_commute:
1055 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, mu
1056 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1057 ; CHECK-NEXT: vmv4r.v v8, v12
1059 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1060 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1061 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %va, <vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1062 %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)
1063 ret <vscale x 8 x float> %u
1066 define <vscale x 8 x float> @vfmacc_vf_nxv8f32_unmasked(<vscale x 8 x float> %va, float %b, <vscale x 8 x float> %c, i32 zeroext %evl) {
1067 ; CHECK-LABEL: vfmacc_vf_nxv8f32_unmasked:
1069 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, tu, ma
1070 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8
1071 ; CHECK-NEXT: vmv4r.v v8, v12
1073 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1074 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1075 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1076 %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)
1077 ret <vscale x 8 x float> %u
1080 define <vscale x 8 x float> @vfmacc_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) {
1081 ; CHECK-LABEL: vfmacc_vv_nxv8f32_ta:
1083 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1084 ; CHECK-NEXT: vfmacc.vv v16, v8, v12, v0.t
1085 ; CHECK-NEXT: vmv.v.v v8, v16
1087 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1088 %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)
1089 ret <vscale x 8 x float> %u
1092 define <vscale x 8 x float> @vfmacc_vf_nxv8f32_ta(<vscale x 8 x float> %va, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1093 ; CHECK-LABEL: vfmacc_vf_nxv8f32_ta:
1095 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1096 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1097 ; CHECK-NEXT: vmv.v.v v8, v12
1099 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1100 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1101 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1102 %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)
1103 ret <vscale x 8 x float> %u
1106 define <vscale x 8 x float> @vfmacc_vf_nxv8f32_commute_ta(<vscale x 8 x float> %va, float %b, <vscale x 8 x float> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1107 ; CHECK-LABEL: vfmacc_vf_nxv8f32_commute_ta:
1109 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, mu
1110 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1111 ; CHECK-NEXT: vmv.v.v v8, v12
1113 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
1114 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
1115 %v = call <vscale x 8 x float> @llvm.vp.fma.nxv8f32(<vscale x 8 x float> %vb, <vscale x 8 x float> %va, <vscale x 8 x float> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1116 %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)
1117 ret <vscale x 8 x float> %u
1120 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)
1121 declare <vscale x 16 x float> @llvm.vp.fneg.nxv16f32(<vscale x 16 x float>, <vscale x 16 x i1>, i32)
1122 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)
1123 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)
1125 define <vscale x 16 x float> @vfmacc_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) {
1126 ; CHECK-LABEL: vfmacc_vv_nxv16f32:
1128 ; CHECK-NEXT: vl8re32.v v24, (a0)
1129 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, tu, mu
1130 ; CHECK-NEXT: vfmacc.vv v24, v8, v16, v0.t
1131 ; CHECK-NEXT: vmv8r.v v8, v24
1133 %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> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1134 %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)
1135 ret <vscale x 16 x float> %u
1138 define <vscale x 16 x float> @vfmacc_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) {
1139 ; CHECK-LABEL: vfmacc_vv_nxv16f32_unmasked:
1141 ; CHECK-NEXT: vl8re32.v v24, (a0)
1142 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, tu, ma
1143 ; CHECK-NEXT: vfmacc.vv v24, v8, v16
1144 ; CHECK-NEXT: vmv8r.v v8, v24
1146 %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> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1147 %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)
1148 ret <vscale x 16 x float> %u
1151 define <vscale x 16 x float> @vfmacc_vf_nxv16f32(<vscale x 16 x float> %va, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1152 ; CHECK-LABEL: vfmacc_vf_nxv16f32:
1154 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, mu
1155 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1156 ; CHECK-NEXT: vmv8r.v v8, v16
1158 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1159 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1160 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1161 %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)
1162 ret <vscale x 16 x float> %u
1165 define <vscale x 16 x float> @vfmacc_vf_nxv16f32_commute(<vscale x 16 x float> %va, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1166 ; CHECK-LABEL: vfmacc_vf_nxv16f32_commute:
1168 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, mu
1169 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1170 ; CHECK-NEXT: vmv8r.v v8, v16
1172 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1173 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1174 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %vb, <vscale x 16 x float> %va, <vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1175 %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)
1176 ret <vscale x 16 x float> %u
1179 define <vscale x 16 x float> @vfmacc_vf_nxv16f32_unmasked(<vscale x 16 x float> %va, float %b, <vscale x 16 x float> %c, i32 zeroext %evl) {
1180 ; CHECK-LABEL: vfmacc_vf_nxv16f32_unmasked:
1182 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, tu, ma
1183 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8
1184 ; CHECK-NEXT: vmv8r.v v8, v16
1186 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1187 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1188 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1189 %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)
1190 ret <vscale x 16 x float> %u
1193 define <vscale x 16 x float> @vfmacc_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) {
1194 ; CHECK-LABEL: vfmacc_vv_nxv16f32_ta:
1196 ; CHECK-NEXT: vl8re32.v v24, (a0)
1197 ; CHECK-NEXT: vsetvli zero, a1, e32, m8, ta, mu
1198 ; CHECK-NEXT: vfmacc.vv v24, v8, v16, v0.t
1199 ; CHECK-NEXT: vmv.v.v v8, v24
1201 %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> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1202 %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)
1203 ret <vscale x 16 x float> %u
1206 define <vscale x 16 x float> @vfmacc_vf_nxv16f32_ta(<vscale x 16 x float> %va, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1207 ; CHECK-LABEL: vfmacc_vf_nxv16f32_ta:
1209 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
1210 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1211 ; CHECK-NEXT: vmv.v.v v8, v16
1213 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1214 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1215 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1216 %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)
1217 ret <vscale x 16 x float> %u
1220 define <vscale x 16 x float> @vfmacc_vf_nxv16f32_commute_ta(<vscale x 16 x float> %va, float %b, <vscale x 16 x float> %c, <vscale x 16 x i1> %m, i32 zeroext %evl) {
1221 ; CHECK-LABEL: vfmacc_vf_nxv16f32_commute_ta:
1223 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, mu
1224 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1225 ; CHECK-NEXT: vmv.v.v v8, v16
1227 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1228 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1229 %v = call <vscale x 16 x float> @llvm.vp.fma.nxv16f32(<vscale x 16 x float> %vb, <vscale x 16 x float> %va, <vscale x 16 x float> %c, <vscale x 16 x i1> splat (i1 -1), i32 %evl)
1230 %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)
1231 ret <vscale x 16 x float> %u
1234 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)
1235 declare <vscale x 1 x double> @llvm.vp.fneg.nxv1f64(<vscale x 1 x double>, <vscale x 1 x i1>, i32)
1236 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)
1237 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)
1239 define <vscale x 1 x double> @vfmacc_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) {
1240 ; CHECK-LABEL: vfmacc_vv_nxv1f64:
1242 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1243 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
1244 ; CHECK-NEXT: vmv1r.v v8, v10
1246 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1247 %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)
1248 ret <vscale x 1 x double> %u
1251 define <vscale x 1 x double> @vfmacc_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) {
1252 ; CHECK-LABEL: vfmacc_vv_nxv1f64_unmasked:
1254 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1255 ; CHECK-NEXT: vfmacc.vv v10, v8, v9
1256 ; CHECK-NEXT: vmv1r.v v8, v10
1258 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1259 %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)
1260 ret <vscale x 1 x double> %u
1263 define <vscale x 1 x double> @vfmacc_vf_nxv1f64(<vscale x 1 x double> %va, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1264 ; CHECK-LABEL: vfmacc_vf_nxv1f64:
1266 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1267 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
1268 ; CHECK-NEXT: vmv1r.v v8, v9
1270 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1271 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1272 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1273 %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)
1274 ret <vscale x 1 x double> %u
1277 define <vscale x 1 x double> @vfmacc_vf_nxv1f64_commute(<vscale x 1 x double> %va, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1278 ; CHECK-LABEL: vfmacc_vf_nxv1f64_commute:
1280 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, mu
1281 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
1282 ; CHECK-NEXT: vmv1r.v v8, v9
1284 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1285 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1286 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %vb, <vscale x 1 x double> %va, <vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1287 %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)
1288 ret <vscale x 1 x double> %u
1291 define <vscale x 1 x double> @vfmacc_vf_nxv1f64_unmasked(<vscale x 1 x double> %va, double %b, <vscale x 1 x double> %c, i32 zeroext %evl) {
1292 ; CHECK-LABEL: vfmacc_vf_nxv1f64_unmasked:
1294 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, tu, ma
1295 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8
1296 ; CHECK-NEXT: vmv1r.v v8, v9
1298 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1299 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1300 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1301 %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)
1302 ret <vscale x 1 x double> %u
1305 define <vscale x 1 x double> @vfmacc_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) {
1306 ; CHECK-LABEL: vfmacc_vv_nxv1f64_ta:
1308 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1309 ; CHECK-NEXT: vfmacc.vv v10, v8, v9, v0.t
1310 ; CHECK-NEXT: vmv.v.v v8, v10
1312 %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> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1313 %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)
1314 ret <vscale x 1 x double> %u
1317 define <vscale x 1 x double> @vfmacc_vf_nxv1f64_ta(<vscale x 1 x double> %va, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1318 ; CHECK-LABEL: vfmacc_vf_nxv1f64_ta:
1320 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1321 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
1322 ; CHECK-NEXT: vmv.v.v v8, v9
1324 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1325 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1326 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1327 %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)
1328 ret <vscale x 1 x double> %u
1331 define <vscale x 1 x double> @vfmacc_vf_nxv1f64_commute_ta(<vscale x 1 x double> %va, double %b, <vscale x 1 x double> %c, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1332 ; CHECK-LABEL: vfmacc_vf_nxv1f64_commute_ta:
1334 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, mu
1335 ; CHECK-NEXT: vfmacc.vf v9, fa0, v8, v0.t
1336 ; CHECK-NEXT: vmv.v.v v8, v9
1338 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1339 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1340 %v = call <vscale x 1 x double> @llvm.vp.fma.nxv1f64(<vscale x 1 x double> %vb, <vscale x 1 x double> %va, <vscale x 1 x double> %c, <vscale x 1 x i1> splat (i1 -1), i32 %evl)
1341 %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)
1342 ret <vscale x 1 x double> %u
1345 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)
1346 declare <vscale x 2 x double> @llvm.vp.fneg.nxv2f64(<vscale x 2 x double>, <vscale x 2 x i1>, i32)
1347 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)
1348 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)
1350 define <vscale x 2 x double> @vfmacc_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) {
1351 ; CHECK-LABEL: vfmacc_vv_nxv2f64:
1353 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1354 ; CHECK-NEXT: vfmacc.vv v12, v8, v10, v0.t
1355 ; CHECK-NEXT: vmv2r.v v8, v12
1357 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1358 %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)
1359 ret <vscale x 2 x double> %u
1362 define <vscale x 2 x double> @vfmacc_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) {
1363 ; CHECK-LABEL: vfmacc_vv_nxv2f64_unmasked:
1365 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1366 ; CHECK-NEXT: vfmacc.vv v12, v8, v10
1367 ; CHECK-NEXT: vmv2r.v v8, v12
1369 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1370 %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)
1371 ret <vscale x 2 x double> %u
1374 define <vscale x 2 x double> @vfmacc_vf_nxv2f64(<vscale x 2 x double> %va, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1375 ; CHECK-LABEL: vfmacc_vf_nxv2f64:
1377 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1378 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
1379 ; CHECK-NEXT: vmv2r.v v8, v10
1381 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1382 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1383 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1384 %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)
1385 ret <vscale x 2 x double> %u
1388 define <vscale x 2 x double> @vfmacc_vf_nxv2f64_commute(<vscale x 2 x double> %va, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1389 ; CHECK-LABEL: vfmacc_vf_nxv2f64_commute:
1391 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, mu
1392 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
1393 ; CHECK-NEXT: vmv2r.v v8, v10
1395 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1396 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1397 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %vb, <vscale x 2 x double> %va, <vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1398 %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)
1399 ret <vscale x 2 x double> %u
1402 define <vscale x 2 x double> @vfmacc_vf_nxv2f64_unmasked(<vscale x 2 x double> %va, double %b, <vscale x 2 x double> %c, i32 zeroext %evl) {
1403 ; CHECK-LABEL: vfmacc_vf_nxv2f64_unmasked:
1405 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, tu, ma
1406 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8
1407 ; CHECK-NEXT: vmv2r.v v8, v10
1409 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1410 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1411 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1412 %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)
1413 ret <vscale x 2 x double> %u
1416 define <vscale x 2 x double> @vfmacc_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) {
1417 ; CHECK-LABEL: vfmacc_vv_nxv2f64_ta:
1419 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1420 ; CHECK-NEXT: vfmacc.vv v12, v8, v10, v0.t
1421 ; CHECK-NEXT: vmv.v.v v8, v12
1423 %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> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1424 %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)
1425 ret <vscale x 2 x double> %u
1428 define <vscale x 2 x double> @vfmacc_vf_nxv2f64_ta(<vscale x 2 x double> %va, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1429 ; CHECK-LABEL: vfmacc_vf_nxv2f64_ta:
1431 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1432 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
1433 ; CHECK-NEXT: vmv.v.v v8, v10
1435 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1436 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1437 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1438 %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)
1439 ret <vscale x 2 x double> %u
1442 define <vscale x 2 x double> @vfmacc_vf_nxv2f64_commute_ta(<vscale x 2 x double> %va, double %b, <vscale x 2 x double> %c, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1443 ; CHECK-LABEL: vfmacc_vf_nxv2f64_commute_ta:
1445 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, mu
1446 ; CHECK-NEXT: vfmacc.vf v10, fa0, v8, v0.t
1447 ; CHECK-NEXT: vmv.v.v v8, v10
1449 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1450 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1451 %v = call <vscale x 2 x double> @llvm.vp.fma.nxv2f64(<vscale x 2 x double> %vb, <vscale x 2 x double> %va, <vscale x 2 x double> %c, <vscale x 2 x i1> splat (i1 -1), i32 %evl)
1452 %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)
1453 ret <vscale x 2 x double> %u
1456 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)
1457 declare <vscale x 4 x double> @llvm.vp.fneg.nxv4f64(<vscale x 4 x double>, <vscale x 4 x i1>, i32)
1458 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)
1459 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)
1461 define <vscale x 4 x double> @vfmacc_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) {
1462 ; CHECK-LABEL: vfmacc_vv_nxv4f64:
1464 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1465 ; CHECK-NEXT: vfmacc.vv v16, v8, v12, v0.t
1466 ; CHECK-NEXT: vmv4r.v v8, v16
1468 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1469 %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)
1470 ret <vscale x 4 x double> %u
1473 define <vscale x 4 x double> @vfmacc_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) {
1474 ; CHECK-LABEL: vfmacc_vv_nxv4f64_unmasked:
1476 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1477 ; CHECK-NEXT: vfmacc.vv v16, v8, v12
1478 ; CHECK-NEXT: vmv4r.v v8, v16
1480 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1481 %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)
1482 ret <vscale x 4 x double> %u
1485 define <vscale x 4 x double> @vfmacc_vf_nxv4f64(<vscale x 4 x double> %va, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1486 ; CHECK-LABEL: vfmacc_vf_nxv4f64:
1488 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1489 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1490 ; CHECK-NEXT: vmv4r.v v8, v12
1492 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1493 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1494 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1495 %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)
1496 ret <vscale x 4 x double> %u
1499 define <vscale x 4 x double> @vfmacc_vf_nxv4f64_commute(<vscale x 4 x double> %va, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1500 ; CHECK-LABEL: vfmacc_vf_nxv4f64_commute:
1502 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, mu
1503 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1504 ; CHECK-NEXT: vmv4r.v v8, v12
1506 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1507 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1508 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %vb, <vscale x 4 x double> %va, <vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1509 %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)
1510 ret <vscale x 4 x double> %u
1513 define <vscale x 4 x double> @vfmacc_vf_nxv4f64_unmasked(<vscale x 4 x double> %va, double %b, <vscale x 4 x double> %c, i32 zeroext %evl) {
1514 ; CHECK-LABEL: vfmacc_vf_nxv4f64_unmasked:
1516 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, tu, ma
1517 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8
1518 ; CHECK-NEXT: vmv4r.v v8, v12
1520 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1521 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1522 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1523 %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)
1524 ret <vscale x 4 x double> %u
1527 define <vscale x 4 x double> @vfmacc_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) {
1528 ; CHECK-LABEL: vfmacc_vv_nxv4f64_ta:
1530 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1531 ; CHECK-NEXT: vfmacc.vv v16, v8, v12, v0.t
1532 ; CHECK-NEXT: vmv.v.v v8, v16
1534 %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> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1535 %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)
1536 ret <vscale x 4 x double> %u
1539 define <vscale x 4 x double> @vfmacc_vf_nxv4f64_ta(<vscale x 4 x double> %va, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1540 ; CHECK-LABEL: vfmacc_vf_nxv4f64_ta:
1542 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1543 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1544 ; CHECK-NEXT: vmv.v.v v8, v12
1546 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1547 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1548 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1549 %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)
1550 ret <vscale x 4 x double> %u
1553 define <vscale x 4 x double> @vfmacc_vf_nxv4f64_commute_ta(<vscale x 4 x double> %va, double %b, <vscale x 4 x double> %c, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1554 ; CHECK-LABEL: vfmacc_vf_nxv4f64_commute_ta:
1556 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, mu
1557 ; CHECK-NEXT: vfmacc.vf v12, fa0, v8, v0.t
1558 ; CHECK-NEXT: vmv.v.v v8, v12
1560 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1561 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1562 %v = call <vscale x 4 x double> @llvm.vp.fma.nxv4f64(<vscale x 4 x double> %vb, <vscale x 4 x double> %va, <vscale x 4 x double> %c, <vscale x 4 x i1> splat (i1 -1), i32 %evl)
1563 %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)
1564 ret <vscale x 4 x double> %u
1567 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)
1568 declare <vscale x 8 x double> @llvm.vp.fneg.nxv8f64(<vscale x 8 x double>, <vscale x 8 x i1>, i32)
1569 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)
1570 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)
1572 define <vscale x 8 x double> @vfmacc_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) {
1573 ; CHECK-LABEL: vfmacc_vv_nxv8f64:
1575 ; CHECK-NEXT: vl8re64.v v24, (a0)
1576 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, tu, mu
1577 ; CHECK-NEXT: vfmacc.vv v24, v8, v16, v0.t
1578 ; CHECK-NEXT: vmv8r.v v8, v24
1580 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1581 %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)
1582 ret <vscale x 8 x double> %u
1585 define <vscale x 8 x double> @vfmacc_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) {
1586 ; CHECK-LABEL: vfmacc_vv_nxv8f64_unmasked:
1588 ; CHECK-NEXT: vl8re64.v v24, (a0)
1589 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, tu, ma
1590 ; CHECK-NEXT: vfmacc.vv v24, v8, v16
1591 ; CHECK-NEXT: vmv8r.v v8, v24
1593 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1594 %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)
1595 ret <vscale x 8 x double> %u
1598 define <vscale x 8 x double> @vfmacc_vf_nxv8f64(<vscale x 8 x double> %va, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1599 ; CHECK-LABEL: vfmacc_vf_nxv8f64:
1601 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, mu
1602 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1603 ; CHECK-NEXT: vmv8r.v v8, v16
1605 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1606 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1607 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1608 %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)
1609 ret <vscale x 8 x double> %u
1612 define <vscale x 8 x double> @vfmacc_vf_nxv8f64_commute(<vscale x 8 x double> %va, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1613 ; CHECK-LABEL: vfmacc_vf_nxv8f64_commute:
1615 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, mu
1616 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1617 ; CHECK-NEXT: vmv8r.v v8, v16
1619 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1620 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1621 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %va, <vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1622 %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)
1623 ret <vscale x 8 x double> %u
1626 define <vscale x 8 x double> @vfmacc_vf_nxv8f64_unmasked(<vscale x 8 x double> %va, double %b, <vscale x 8 x double> %c, i32 zeroext %evl) {
1627 ; CHECK-LABEL: vfmacc_vf_nxv8f64_unmasked:
1629 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, tu, ma
1630 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8
1631 ; CHECK-NEXT: vmv8r.v v8, v16
1633 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1634 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1635 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1636 %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)
1637 ret <vscale x 8 x double> %u
1640 define <vscale x 8 x double> @vfmacc_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) {
1641 ; CHECK-LABEL: vfmacc_vv_nxv8f64_ta:
1643 ; CHECK-NEXT: vl8re64.v v24, (a0)
1644 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, mu
1645 ; CHECK-NEXT: vfmacc.vv v24, v8, v16, v0.t
1646 ; CHECK-NEXT: vmv.v.v v8, v24
1648 %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> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1649 %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)
1650 ret <vscale x 8 x double> %u
1653 define <vscale x 8 x double> @vfmacc_vf_nxv8f64_ta(<vscale x 8 x double> %va, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1654 ; CHECK-LABEL: vfmacc_vf_nxv8f64_ta:
1656 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
1657 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1658 ; CHECK-NEXT: vmv.v.v v8, v16
1660 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1661 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1662 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1663 %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)
1664 ret <vscale x 8 x double> %u
1667 define <vscale x 8 x double> @vfmacc_vf_nxv8f64_commute_ta(<vscale x 8 x double> %va, double %b, <vscale x 8 x double> %c, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1668 ; CHECK-LABEL: vfmacc_vf_nxv8f64_commute_ta:
1670 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, mu
1671 ; CHECK-NEXT: vfmacc.vf v16, fa0, v8, v0.t
1672 ; CHECK-NEXT: vmv.v.v v8, v16
1674 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1675 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1676 %v = call <vscale x 8 x double> @llvm.vp.fma.nxv8f64(<vscale x 8 x double> %vb, <vscale x 8 x double> %va, <vscale x 8 x double> %c, <vscale x 8 x i1> splat (i1 -1), i32 %evl)
1677 %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)
1678 ret <vscale x 8 x double> %u