1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFH
6 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=ilp32d \
7 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
8 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfhmin,+zvfhmin,+v -target-abi=lp64d \
9 ; RUN: -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,ZVFHMIN
11 declare <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half>, <vscale x 1 x half>, <vscale x 1 x i1>, i32)
13 define <vscale x 1 x half> @vfadd_vv_nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
14 ; ZVFH-LABEL: vfadd_vv_nxv1f16:
16 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
17 ; ZVFH-NEXT: vfadd.vv v8, v8, v9, v0.t
20 ; ZVFHMIN-LABEL: vfadd_vv_nxv1f16:
22 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
23 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
24 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
25 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
26 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v10, v0.t
27 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
28 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
30 %v = call <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> %m, i32 %evl)
31 ret <vscale x 1 x half> %v
34 define <vscale x 1 x half> @vfadd_vv_nxv1f16_unmasked(<vscale x 1 x half> %va, <vscale x 1 x half> %b, i32 zeroext %evl) {
35 ; ZVFH-LABEL: vfadd_vv_nxv1f16_unmasked:
37 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
38 ; ZVFH-NEXT: vfadd.vv v8, v8, v9
41 ; ZVFHMIN-LABEL: vfadd_vv_nxv1f16_unmasked:
43 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf4, ta, ma
44 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
45 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
46 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
47 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v10
48 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
49 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
51 %v = call <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
52 ret <vscale x 1 x half> %v
55 define <vscale x 1 x half> @vfadd_vf_nxv1f16(<vscale x 1 x half> %va, half %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
56 ; ZVFH-LABEL: vfadd_vf_nxv1f16:
58 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
59 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
62 ; ZVFHMIN-LABEL: vfadd_vf_nxv1f16:
64 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
65 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
66 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
67 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
68 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
69 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
70 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
71 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
72 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v8, v0.t
73 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
74 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
76 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
77 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
78 %v = call <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> %m, i32 %evl)
79 ret <vscale x 1 x half> %v
82 define <vscale x 1 x half> @vfadd_vf_nxv1f16_commute(<vscale x 1 x half> %va, half %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
83 ; ZVFH-LABEL: vfadd_vf_nxv1f16_commute:
85 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
86 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
89 ; ZVFHMIN-LABEL: vfadd_vf_nxv1f16_commute:
91 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
92 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
93 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
94 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
95 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
96 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
97 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
98 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
99 ; ZVFHMIN-NEXT: vfadd.vv v9, v8, v9, v0.t
100 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
101 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
103 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
104 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
105 %v = call <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x half> %va, <vscale x 1 x i1> %m, i32 %evl)
106 ret <vscale x 1 x half> %v
109 define <vscale x 1 x half> @vfadd_vf_nxv1f16_unmasked(<vscale x 1 x half> %va, half %b, i32 zeroext %evl) {
110 ; ZVFH-LABEL: vfadd_vf_nxv1f16_unmasked:
112 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
113 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
116 ; ZVFHMIN-LABEL: vfadd_vf_nxv1f16_unmasked:
118 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
119 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
120 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
121 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
122 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
123 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
124 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
125 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
126 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v8
127 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
128 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
130 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
131 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
132 %v = call <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half> %va, <vscale x 1 x half> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
133 ret <vscale x 1 x half> %v
136 define <vscale x 1 x half> @vfadd_vf_nxv1f16_unmasked_commute(<vscale x 1 x half> %va, half %b, i32 zeroext %evl) {
137 ; ZVFH-LABEL: vfadd_vf_nxv1f16_unmasked_commute:
139 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
140 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
143 ; ZVFHMIN-LABEL: vfadd_vf_nxv1f16_unmasked_commute:
145 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
146 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
147 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
148 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf4, ta, ma
149 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
150 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
151 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
152 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
153 ; ZVFHMIN-NEXT: vfadd.vv v9, v8, v9
154 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf4, ta, ma
155 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
157 %elt.head = insertelement <vscale x 1 x half> poison, half %b, i32 0
158 %vb = shufflevector <vscale x 1 x half> %elt.head, <vscale x 1 x half> poison, <vscale x 1 x i32> zeroinitializer
159 %v = call <vscale x 1 x half> @llvm.vp.fadd.nxv1f16(<vscale x 1 x half> %vb, <vscale x 1 x half> %va, <vscale x 1 x i1> splat (i1 true), i32 %evl)
160 ret <vscale x 1 x half> %v
163 declare <vscale x 2 x half> @llvm.vp.fadd.nxv2f16(<vscale x 2 x half>, <vscale x 2 x half>, <vscale x 2 x i1>, i32)
165 define <vscale x 2 x half> @vfadd_vv_nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
166 ; ZVFH-LABEL: vfadd_vv_nxv2f16:
168 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
169 ; ZVFH-NEXT: vfadd.vv v8, v8, v9, v0.t
172 ; ZVFHMIN-LABEL: vfadd_vv_nxv2f16:
174 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
175 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
176 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
177 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
178 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v10, v0.t
179 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
180 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
182 %v = call <vscale x 2 x half> @llvm.vp.fadd.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> %m, i32 %evl)
183 ret <vscale x 2 x half> %v
186 define <vscale x 2 x half> @vfadd_vv_nxv2f16_unmasked(<vscale x 2 x half> %va, <vscale x 2 x half> %b, i32 zeroext %evl) {
187 ; ZVFH-LABEL: vfadd_vv_nxv2f16_unmasked:
189 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
190 ; ZVFH-NEXT: vfadd.vv v8, v8, v9
193 ; ZVFHMIN-LABEL: vfadd_vv_nxv2f16_unmasked:
195 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, mf2, ta, ma
196 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
197 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
198 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
199 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v10
200 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
201 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
203 %v = call <vscale x 2 x half> @llvm.vp.fadd.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
204 ret <vscale x 2 x half> %v
207 define <vscale x 2 x half> @vfadd_vf_nxv2f16(<vscale x 2 x half> %va, half %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
208 ; ZVFH-LABEL: vfadd_vf_nxv2f16:
210 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
211 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
214 ; ZVFHMIN-LABEL: vfadd_vf_nxv2f16:
216 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
217 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
218 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
219 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
220 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
221 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
222 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
223 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
224 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v8, v0.t
225 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
226 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
228 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
229 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
230 %v = call <vscale x 2 x half> @llvm.vp.fadd.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> %m, i32 %evl)
231 ret <vscale x 2 x half> %v
234 define <vscale x 2 x half> @vfadd_vf_nxv2f16_unmasked(<vscale x 2 x half> %va, half %b, i32 zeroext %evl) {
235 ; ZVFH-LABEL: vfadd_vf_nxv2f16_unmasked:
237 ; ZVFH-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
238 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
241 ; ZVFHMIN-LABEL: vfadd_vf_nxv2f16_unmasked:
243 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
244 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m1, ta, ma
245 ; ZVFHMIN-NEXT: vfmv.v.f v9, fa5
246 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, mf2, ta, ma
247 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v9
248 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v9, v8
249 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v8, v10
250 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m1, ta, ma
251 ; ZVFHMIN-NEXT: vfadd.vv v9, v9, v8
252 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, mf2, ta, ma
253 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v9
255 %elt.head = insertelement <vscale x 2 x half> poison, half %b, i32 0
256 %vb = shufflevector <vscale x 2 x half> %elt.head, <vscale x 2 x half> poison, <vscale x 2 x i32> zeroinitializer
257 %v = call <vscale x 2 x half> @llvm.vp.fadd.nxv2f16(<vscale x 2 x half> %va, <vscale x 2 x half> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
258 ret <vscale x 2 x half> %v
261 declare <vscale x 4 x half> @llvm.vp.fadd.nxv4f16(<vscale x 4 x half>, <vscale x 4 x half>, <vscale x 4 x i1>, i32)
263 define <vscale x 4 x half> @vfadd_vv_nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
264 ; ZVFH-LABEL: vfadd_vv_nxv4f16:
266 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
267 ; ZVFH-NEXT: vfadd.vv v8, v8, v9, v0.t
270 ; ZVFHMIN-LABEL: vfadd_vv_nxv4f16:
272 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
273 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
274 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
275 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
276 ; ZVFHMIN-NEXT: vfadd.vv v10, v12, v10, v0.t
277 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
278 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
280 %v = call <vscale x 4 x half> @llvm.vp.fadd.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> %m, i32 %evl)
281 ret <vscale x 4 x half> %v
284 define <vscale x 4 x half> @vfadd_vv_nxv4f16_unmasked(<vscale x 4 x half> %va, <vscale x 4 x half> %b, i32 zeroext %evl) {
285 ; ZVFH-LABEL: vfadd_vv_nxv4f16_unmasked:
287 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
288 ; ZVFH-NEXT: vfadd.vv v8, v8, v9
291 ; ZVFHMIN-LABEL: vfadd_vv_nxv4f16_unmasked:
293 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m1, ta, ma
294 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v9
295 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
296 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
297 ; ZVFHMIN-NEXT: vfadd.vv v10, v12, v10
298 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
299 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
301 %v = call <vscale x 4 x half> @llvm.vp.fadd.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
302 ret <vscale x 4 x half> %v
305 define <vscale x 4 x half> @vfadd_vf_nxv4f16(<vscale x 4 x half> %va, half %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
306 ; ZVFH-LABEL: vfadd_vf_nxv4f16:
308 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
309 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
312 ; ZVFHMIN-LABEL: vfadd_vf_nxv4f16:
314 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
315 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
316 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
317 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
318 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
319 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
320 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
321 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
322 ; ZVFHMIN-NEXT: vfadd.vv v10, v10, v12, v0.t
323 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
324 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
326 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
327 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
328 %v = call <vscale x 4 x half> @llvm.vp.fadd.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> %m, i32 %evl)
329 ret <vscale x 4 x half> %v
332 define <vscale x 4 x half> @vfadd_vf_nxv4f16_unmasked(<vscale x 4 x half> %va, half %b, i32 zeroext %evl) {
333 ; ZVFH-LABEL: vfadd_vf_nxv4f16_unmasked:
335 ; ZVFH-NEXT: vsetvli zero, a0, e16, m1, ta, ma
336 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
339 ; ZVFHMIN-LABEL: vfadd_vf_nxv4f16_unmasked:
341 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
342 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m2, ta, ma
343 ; ZVFHMIN-NEXT: vfmv.v.f v10, fa5
344 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m1, ta, ma
345 ; ZVFHMIN-NEXT: vfncvt.f.f.w v9, v10
346 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v10, v8
347 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v9
348 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m2, ta, ma
349 ; ZVFHMIN-NEXT: vfadd.vv v10, v10, v12
350 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m1, ta, ma
351 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v10
353 %elt.head = insertelement <vscale x 4 x half> poison, half %b, i32 0
354 %vb = shufflevector <vscale x 4 x half> %elt.head, <vscale x 4 x half> poison, <vscale x 4 x i32> zeroinitializer
355 %v = call <vscale x 4 x half> @llvm.vp.fadd.nxv4f16(<vscale x 4 x half> %va, <vscale x 4 x half> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
356 ret <vscale x 4 x half> %v
359 declare <vscale x 8 x half> @llvm.vp.fadd.nxv8f16(<vscale x 8 x half>, <vscale x 8 x half>, <vscale x 8 x i1>, i32)
361 define <vscale x 8 x half> @vfadd_vv_nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
362 ; ZVFH-LABEL: vfadd_vv_nxv8f16:
364 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
365 ; ZVFH-NEXT: vfadd.vv v8, v8, v10, v0.t
368 ; ZVFHMIN-LABEL: vfadd_vv_nxv8f16:
370 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
371 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
372 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
373 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
374 ; ZVFHMIN-NEXT: vfadd.vv v12, v16, v12, v0.t
375 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
376 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
378 %v = call <vscale x 8 x half> @llvm.vp.fadd.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> %m, i32 %evl)
379 ret <vscale x 8 x half> %v
382 define <vscale x 8 x half> @vfadd_vv_nxv8f16_unmasked(<vscale x 8 x half> %va, <vscale x 8 x half> %b, i32 zeroext %evl) {
383 ; ZVFH-LABEL: vfadd_vv_nxv8f16_unmasked:
385 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
386 ; ZVFH-NEXT: vfadd.vv v8, v8, v10
389 ; ZVFHMIN-LABEL: vfadd_vv_nxv8f16_unmasked:
391 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m2, ta, ma
392 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v10
393 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
394 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
395 ; ZVFHMIN-NEXT: vfadd.vv v12, v16, v12
396 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
397 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
399 %v = call <vscale x 8 x half> @llvm.vp.fadd.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
400 ret <vscale x 8 x half> %v
403 define <vscale x 8 x half> @vfadd_vf_nxv8f16(<vscale x 8 x half> %va, half %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
404 ; ZVFH-LABEL: vfadd_vf_nxv8f16:
406 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
407 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
410 ; ZVFHMIN-LABEL: vfadd_vf_nxv8f16:
412 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
413 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
414 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
415 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
416 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
417 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
418 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
419 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
420 ; ZVFHMIN-NEXT: vfadd.vv v12, v12, v16, v0.t
421 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
422 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
424 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
425 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
426 %v = call <vscale x 8 x half> @llvm.vp.fadd.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> %m, i32 %evl)
427 ret <vscale x 8 x half> %v
430 define <vscale x 8 x half> @vfadd_vf_nxv8f16_unmasked(<vscale x 8 x half> %va, half %b, i32 zeroext %evl) {
431 ; ZVFH-LABEL: vfadd_vf_nxv8f16_unmasked:
433 ; ZVFH-NEXT: vsetvli zero, a0, e16, m2, ta, ma
434 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
437 ; ZVFHMIN-LABEL: vfadd_vf_nxv8f16_unmasked:
439 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
440 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m4, ta, ma
441 ; ZVFHMIN-NEXT: vfmv.v.f v12, fa5
442 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m2, ta, ma
443 ; ZVFHMIN-NEXT: vfncvt.f.f.w v10, v12
444 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v12, v8
445 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v10
446 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m4, ta, ma
447 ; ZVFHMIN-NEXT: vfadd.vv v12, v12, v16
448 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m2, ta, ma
449 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v12
451 %elt.head = insertelement <vscale x 8 x half> poison, half %b, i32 0
452 %vb = shufflevector <vscale x 8 x half> %elt.head, <vscale x 8 x half> poison, <vscale x 8 x i32> zeroinitializer
453 %v = call <vscale x 8 x half> @llvm.vp.fadd.nxv8f16(<vscale x 8 x half> %va, <vscale x 8 x half> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
454 ret <vscale x 8 x half> %v
457 declare <vscale x 16 x half> @llvm.vp.fadd.nxv16f16(<vscale x 16 x half>, <vscale x 16 x half>, <vscale x 16 x i1>, i32)
459 define <vscale x 16 x half> @vfadd_vv_nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
460 ; ZVFH-LABEL: vfadd_vv_nxv16f16:
462 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
463 ; ZVFH-NEXT: vfadd.vv v8, v8, v12, v0.t
466 ; ZVFHMIN-LABEL: vfadd_vv_nxv16f16:
468 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
469 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
470 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
471 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
472 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16, v0.t
473 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
474 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
476 %v = call <vscale x 16 x half> @llvm.vp.fadd.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> %m, i32 %evl)
477 ret <vscale x 16 x half> %v
480 define <vscale x 16 x half> @vfadd_vv_nxv16f16_unmasked(<vscale x 16 x half> %va, <vscale x 16 x half> %b, i32 zeroext %evl) {
481 ; ZVFH-LABEL: vfadd_vv_nxv16f16_unmasked:
483 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
484 ; ZVFH-NEXT: vfadd.vv v8, v8, v12
487 ; ZVFHMIN-LABEL: vfadd_vv_nxv16f16_unmasked:
489 ; ZVFHMIN-NEXT: vsetvli a1, zero, e16, m4, ta, ma
490 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
491 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
492 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
493 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16
494 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
495 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
497 %v = call <vscale x 16 x half> @llvm.vp.fadd.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
498 ret <vscale x 16 x half> %v
501 define <vscale x 16 x half> @vfadd_vf_nxv16f16(<vscale x 16 x half> %va, half %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
502 ; ZVFH-LABEL: vfadd_vf_nxv16f16:
504 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
505 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
508 ; ZVFHMIN-LABEL: vfadd_vf_nxv16f16:
510 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
511 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
512 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
513 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
514 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
515 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
516 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
517 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
518 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24, v0.t
519 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
520 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
522 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
523 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
524 %v = call <vscale x 16 x half> @llvm.vp.fadd.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> %m, i32 %evl)
525 ret <vscale x 16 x half> %v
528 define <vscale x 16 x half> @vfadd_vf_nxv16f16_unmasked(<vscale x 16 x half> %va, half %b, i32 zeroext %evl) {
529 ; ZVFH-LABEL: vfadd_vf_nxv16f16_unmasked:
531 ; ZVFH-NEXT: vsetvli zero, a0, e16, m4, ta, ma
532 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
535 ; ZVFHMIN-LABEL: vfadd_vf_nxv16f16_unmasked:
537 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
538 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
539 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
540 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
541 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
542 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
543 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
544 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
545 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24
546 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
547 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
549 %elt.head = insertelement <vscale x 16 x half> poison, half %b, i32 0
550 %vb = shufflevector <vscale x 16 x half> %elt.head, <vscale x 16 x half> poison, <vscale x 16 x i32> zeroinitializer
551 %v = call <vscale x 16 x half> @llvm.vp.fadd.nxv16f16(<vscale x 16 x half> %va, <vscale x 16 x half> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
552 ret <vscale x 16 x half> %v
555 declare <vscale x 32 x half> @llvm.vp.fadd.nxv32f16(<vscale x 32 x half>, <vscale x 32 x half>, <vscale x 32 x i1>, i32)
557 define <vscale x 32 x half> @vfadd_vv_nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
558 ; ZVFH-LABEL: vfadd_vv_nxv32f16:
560 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
561 ; ZVFH-NEXT: vfadd.vv v8, v8, v16, v0.t
564 ; ZVFHMIN-LABEL: vfadd_vv_nxv32f16:
566 ; ZVFHMIN-NEXT: addi sp, sp, -16
567 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
568 ; ZVFHMIN-NEXT: csrr a1, vlenb
569 ; ZVFHMIN-NEXT: slli a1, a1, 3
570 ; ZVFHMIN-NEXT: sub sp, sp, a1
571 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
572 ; ZVFHMIN-NEXT: vmv1r.v v7, v0
573 ; ZVFHMIN-NEXT: csrr a2, vlenb
574 ; ZVFHMIN-NEXT: slli a1, a2, 1
575 ; ZVFHMIN-NEXT: sub a3, a0, a1
576 ; ZVFHMIN-NEXT: sltu a4, a0, a3
577 ; ZVFHMIN-NEXT: addi a4, a4, -1
578 ; ZVFHMIN-NEXT: and a3, a4, a3
579 ; ZVFHMIN-NEXT: srli a2, a2, 2
580 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
581 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a2
582 ; ZVFHMIN-NEXT: addi a2, sp, 16
583 ; ZVFHMIN-NEXT: vs8r.v v16, (a2) # Unknown-size Folded Spill
584 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
585 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
586 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
587 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
588 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24, v0.t
589 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
590 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
591 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB22_2
592 ; ZVFHMIN-NEXT: # %bb.1:
593 ; ZVFHMIN-NEXT: mv a0, a1
594 ; ZVFHMIN-NEXT: .LBB22_2:
595 ; ZVFHMIN-NEXT: addi a1, sp, 16
596 ; ZVFHMIN-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
597 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
598 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
599 ; ZVFHMIN-NEXT: vmv1r.v v0, v7
600 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
601 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16, v0.t
602 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
603 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
604 ; ZVFHMIN-NEXT: csrr a0, vlenb
605 ; ZVFHMIN-NEXT: slli a0, a0, 3
606 ; ZVFHMIN-NEXT: add sp, sp, a0
607 ; ZVFHMIN-NEXT: addi sp, sp, 16
609 %v = call <vscale x 32 x half> @llvm.vp.fadd.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> %m, i32 %evl)
610 ret <vscale x 32 x half> %v
613 define <vscale x 32 x half> @vfadd_vv_nxv32f16_unmasked(<vscale x 32 x half> %va, <vscale x 32 x half> %b, i32 zeroext %evl) {
614 ; ZVFH-LABEL: vfadd_vv_nxv32f16_unmasked:
616 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
617 ; ZVFH-NEXT: vfadd.vv v8, v8, v16
620 ; ZVFHMIN-LABEL: vfadd_vv_nxv32f16_unmasked:
622 ; ZVFHMIN-NEXT: addi sp, sp, -16
623 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
624 ; ZVFHMIN-NEXT: csrr a1, vlenb
625 ; ZVFHMIN-NEXT: slli a1, a1, 3
626 ; ZVFHMIN-NEXT: sub sp, sp, a1
627 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x08, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 8 * vlenb
628 ; ZVFHMIN-NEXT: csrr a2, vlenb
629 ; ZVFHMIN-NEXT: slli a1, a2, 1
630 ; ZVFHMIN-NEXT: sub a3, a0, a1
631 ; ZVFHMIN-NEXT: sltu a4, a0, a3
632 ; ZVFHMIN-NEXT: addi a4, a4, -1
633 ; ZVFHMIN-NEXT: and a3, a4, a3
634 ; ZVFHMIN-NEXT: srli a2, a2, 2
635 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, m4, ta, ma
636 ; ZVFHMIN-NEXT: vmset.m v24
637 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
638 ; ZVFHMIN-NEXT: vslidedown.vx v0, v24, a2
639 ; ZVFHMIN-NEXT: addi a2, sp, 16
640 ; ZVFHMIN-NEXT: vs8r.v v16, (a2) # Unknown-size Folded Spill
641 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
642 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v20
643 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
644 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
645 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24, v0.t
646 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
647 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
648 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB23_2
649 ; ZVFHMIN-NEXT: # %bb.1:
650 ; ZVFHMIN-NEXT: mv a0, a1
651 ; ZVFHMIN-NEXT: .LBB23_2:
652 ; ZVFHMIN-NEXT: addi a1, sp, 16
653 ; ZVFHMIN-NEXT: vl8r.v v24, (a1) # Unknown-size Folded Reload
654 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v24
655 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
656 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
657 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16
658 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
659 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
660 ; ZVFHMIN-NEXT: csrr a0, vlenb
661 ; ZVFHMIN-NEXT: slli a0, a0, 3
662 ; ZVFHMIN-NEXT: add sp, sp, a0
663 ; ZVFHMIN-NEXT: addi sp, sp, 16
665 %v = call <vscale x 32 x half> @llvm.vp.fadd.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %b, <vscale x 32 x i1> splat (i1 true), i32 %evl)
666 ret <vscale x 32 x half> %v
669 define <vscale x 32 x half> @vfadd_vf_nxv32f16(<vscale x 32 x half> %va, half %b, <vscale x 32 x i1> %m, i32 zeroext %evl) {
670 ; ZVFH-LABEL: vfadd_vf_nxv32f16:
672 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
673 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0, v0.t
676 ; ZVFHMIN-LABEL: vfadd_vf_nxv32f16:
678 ; ZVFHMIN-NEXT: addi sp, sp, -16
679 ; ZVFHMIN-NEXT: .cfi_def_cfa_offset 16
680 ; ZVFHMIN-NEXT: csrr a1, vlenb
681 ; ZVFHMIN-NEXT: slli a1, a1, 2
682 ; ZVFHMIN-NEXT: sub sp, sp, a1
683 ; ZVFHMIN-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x04, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 4 * vlenb
684 ; ZVFHMIN-NEXT: vmv1r.v v7, v0
685 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
686 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
687 ; ZVFHMIN-NEXT: vfmv.v.f v24, fa5
688 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
689 ; ZVFHMIN-NEXT: vfncvt.f.f.w v16, v24
690 ; ZVFHMIN-NEXT: addi a1, sp, 16
691 ; ZVFHMIN-NEXT: vs4r.v v16, (a1) # Unknown-size Folded Spill
692 ; ZVFHMIN-NEXT: csrr a2, vlenb
693 ; ZVFHMIN-NEXT: slli a1, a2, 1
694 ; ZVFHMIN-NEXT: sub a3, a0, a1
695 ; ZVFHMIN-NEXT: sltu a4, a0, a3
696 ; ZVFHMIN-NEXT: addi a4, a4, -1
697 ; ZVFHMIN-NEXT: and a3, a4, a3
698 ; ZVFHMIN-NEXT: srli a2, a2, 2
699 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
700 ; ZVFHMIN-NEXT: vslidedown.vx v0, v0, a2
701 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
702 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v12
703 ; ZVFHMIN-NEXT: addi a2, sp, 16
704 ; ZVFHMIN-NEXT: vl4r.v v12, (a2) # Unknown-size Folded Reload
705 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
706 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
707 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24, v0.t
708 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
709 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v16
710 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB24_2
711 ; ZVFHMIN-NEXT: # %bb.1:
712 ; ZVFHMIN-NEXT: mv a0, a1
713 ; ZVFHMIN-NEXT: .LBB24_2:
714 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v8
715 ; ZVFHMIN-NEXT: vmv1r.v v0, v7
716 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
717 ; ZVFHMIN-NEXT: vfadd.vv v16, v16, v24, v0.t
718 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
719 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
720 ; ZVFHMIN-NEXT: csrr a0, vlenb
721 ; ZVFHMIN-NEXT: slli a0, a0, 2
722 ; ZVFHMIN-NEXT: add sp, sp, a0
723 ; ZVFHMIN-NEXT: addi sp, sp, 16
725 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
726 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
727 %v = call <vscale x 32 x half> @llvm.vp.fadd.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> %m, i32 %evl)
728 ret <vscale x 32 x half> %v
731 define <vscale x 32 x half> @vfadd_vf_nxv32f16_unmasked(<vscale x 32 x half> %va, half %b, i32 zeroext %evl) {
732 ; ZVFH-LABEL: vfadd_vf_nxv32f16_unmasked:
734 ; ZVFH-NEXT: vsetvli zero, a0, e16, m8, ta, ma
735 ; ZVFH-NEXT: vfadd.vf v8, v8, fa0
738 ; ZVFHMIN-LABEL: vfadd_vf_nxv32f16_unmasked:
740 ; ZVFHMIN-NEXT: fcvt.s.h fa5, fa0
741 ; ZVFHMIN-NEXT: vsetvli a1, zero, e32, m8, ta, ma
742 ; ZVFHMIN-NEXT: vfmv.v.f v16, fa5
743 ; ZVFHMIN-NEXT: vsetvli zero, zero, e16, m4, ta, ma
744 ; ZVFHMIN-NEXT: vfncvt.f.f.w v4, v16
745 ; ZVFHMIN-NEXT: csrr a2, vlenb
746 ; ZVFHMIN-NEXT: slli a1, a2, 1
747 ; ZVFHMIN-NEXT: sub a3, a0, a1
748 ; ZVFHMIN-NEXT: sltu a4, a0, a3
749 ; ZVFHMIN-NEXT: addi a4, a4, -1
750 ; ZVFHMIN-NEXT: and a3, a4, a3
751 ; ZVFHMIN-NEXT: srli a2, a2, 2
752 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, m4, ta, ma
753 ; ZVFHMIN-NEXT: vmset.m v16
754 ; ZVFHMIN-NEXT: vsetvli a4, zero, e8, mf2, ta, ma
755 ; ZVFHMIN-NEXT: vslidedown.vx v0, v16, a2
756 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
757 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v12
758 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v16, v4
759 ; ZVFHMIN-NEXT: vsetvli zero, a3, e32, m8, ta, ma
760 ; ZVFHMIN-NEXT: vfadd.vv v24, v24, v16, v0.t
761 ; ZVFHMIN-NEXT: vsetvli a2, zero, e16, m4, ta, ma
762 ; ZVFHMIN-NEXT: vfncvt.f.f.w v12, v24
763 ; ZVFHMIN-NEXT: bltu a0, a1, .LBB25_2
764 ; ZVFHMIN-NEXT: # %bb.1:
765 ; ZVFHMIN-NEXT: mv a0, a1
766 ; ZVFHMIN-NEXT: .LBB25_2:
767 ; ZVFHMIN-NEXT: vfwcvt.f.f.v v24, v8
768 ; ZVFHMIN-NEXT: vsetvli zero, a0, e32, m8, ta, ma
769 ; ZVFHMIN-NEXT: vfadd.vv v16, v24, v16
770 ; ZVFHMIN-NEXT: vsetvli a0, zero, e16, m4, ta, ma
771 ; ZVFHMIN-NEXT: vfncvt.f.f.w v8, v16
773 %elt.head = insertelement <vscale x 32 x half> poison, half %b, i32 0
774 %vb = shufflevector <vscale x 32 x half> %elt.head, <vscale x 32 x half> poison, <vscale x 32 x i32> zeroinitializer
775 %v = call <vscale x 32 x half> @llvm.vp.fadd.nxv32f16(<vscale x 32 x half> %va, <vscale x 32 x half> %vb, <vscale x 32 x i1> splat (i1 true), i32 %evl)
776 ret <vscale x 32 x half> %v
779 declare <vscale x 1 x float> @llvm.vp.fadd.nxv1f32(<vscale x 1 x float>, <vscale x 1 x float>, <vscale x 1 x i1>, i32)
781 define <vscale x 1 x float> @vfadd_vv_nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
782 ; CHECK-LABEL: vfadd_vv_nxv1f32:
784 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
785 ; CHECK-NEXT: vfadd.vv v8, v8, v9, v0.t
787 %v = call <vscale x 1 x float> @llvm.vp.fadd.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> %m, i32 %evl)
788 ret <vscale x 1 x float> %v
791 define <vscale x 1 x float> @vfadd_vv_nxv1f32_unmasked(<vscale x 1 x float> %va, <vscale x 1 x float> %b, i32 zeroext %evl) {
792 ; CHECK-LABEL: vfadd_vv_nxv1f32_unmasked:
794 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
795 ; CHECK-NEXT: vfadd.vv v8, v8, v9
797 %v = call <vscale x 1 x float> @llvm.vp.fadd.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
798 ret <vscale x 1 x float> %v
801 define <vscale x 1 x float> @vfadd_vf_nxv1f32(<vscale x 1 x float> %va, float %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
802 ; CHECK-LABEL: vfadd_vf_nxv1f32:
804 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
805 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
807 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
808 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
809 %v = call <vscale x 1 x float> @llvm.vp.fadd.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> %m, i32 %evl)
810 ret <vscale x 1 x float> %v
813 define <vscale x 1 x float> @vfadd_vf_nxv1f32_unmasked(<vscale x 1 x float> %va, float %b, i32 zeroext %evl) {
814 ; CHECK-LABEL: vfadd_vf_nxv1f32_unmasked:
816 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
817 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
819 %elt.head = insertelement <vscale x 1 x float> poison, float %b, i32 0
820 %vb = shufflevector <vscale x 1 x float> %elt.head, <vscale x 1 x float> poison, <vscale x 1 x i32> zeroinitializer
821 %v = call <vscale x 1 x float> @llvm.vp.fadd.nxv1f32(<vscale x 1 x float> %va, <vscale x 1 x float> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
822 ret <vscale x 1 x float> %v
825 declare <vscale x 2 x float> @llvm.vp.fadd.nxv2f32(<vscale x 2 x float>, <vscale x 2 x float>, <vscale x 2 x i1>, i32)
827 define <vscale x 2 x float> @vfadd_vv_nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
828 ; CHECK-LABEL: vfadd_vv_nxv2f32:
830 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
831 ; CHECK-NEXT: vfadd.vv v8, v8, v9, v0.t
833 %v = call <vscale x 2 x float> @llvm.vp.fadd.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> %m, i32 %evl)
834 ret <vscale x 2 x float> %v
837 define <vscale x 2 x float> @vfadd_vv_nxv2f32_unmasked(<vscale x 2 x float> %va, <vscale x 2 x float> %b, i32 zeroext %evl) {
838 ; CHECK-LABEL: vfadd_vv_nxv2f32_unmasked:
840 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
841 ; CHECK-NEXT: vfadd.vv v8, v8, v9
843 %v = call <vscale x 2 x float> @llvm.vp.fadd.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
844 ret <vscale x 2 x float> %v
847 define <vscale x 2 x float> @vfadd_vf_nxv2f32(<vscale x 2 x float> %va, float %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
848 ; CHECK-LABEL: vfadd_vf_nxv2f32:
850 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
851 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
853 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
854 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
855 %v = call <vscale x 2 x float> @llvm.vp.fadd.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> %m, i32 %evl)
856 ret <vscale x 2 x float> %v
859 define <vscale x 2 x float> @vfadd_vf_nxv2f32_unmasked(<vscale x 2 x float> %va, float %b, i32 zeroext %evl) {
860 ; CHECK-LABEL: vfadd_vf_nxv2f32_unmasked:
862 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
863 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
865 %elt.head = insertelement <vscale x 2 x float> poison, float %b, i32 0
866 %vb = shufflevector <vscale x 2 x float> %elt.head, <vscale x 2 x float> poison, <vscale x 2 x i32> zeroinitializer
867 %v = call <vscale x 2 x float> @llvm.vp.fadd.nxv2f32(<vscale x 2 x float> %va, <vscale x 2 x float> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
868 ret <vscale x 2 x float> %v
871 declare <vscale x 4 x float> @llvm.vp.fadd.nxv4f32(<vscale x 4 x float>, <vscale x 4 x float>, <vscale x 4 x i1>, i32)
873 define <vscale x 4 x float> @vfadd_vv_nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
874 ; CHECK-LABEL: vfadd_vv_nxv4f32:
876 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
877 ; CHECK-NEXT: vfadd.vv v8, v8, v10, v0.t
879 %v = call <vscale x 4 x float> @llvm.vp.fadd.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> %m, i32 %evl)
880 ret <vscale x 4 x float> %v
883 define <vscale x 4 x float> @vfadd_vv_nxv4f32_unmasked(<vscale x 4 x float> %va, <vscale x 4 x float> %b, i32 zeroext %evl) {
884 ; CHECK-LABEL: vfadd_vv_nxv4f32_unmasked:
886 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
887 ; CHECK-NEXT: vfadd.vv v8, v8, v10
889 %v = call <vscale x 4 x float> @llvm.vp.fadd.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
890 ret <vscale x 4 x float> %v
893 define <vscale x 4 x float> @vfadd_vf_nxv4f32(<vscale x 4 x float> %va, float %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
894 ; CHECK-LABEL: vfadd_vf_nxv4f32:
896 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
897 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
899 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
900 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
901 %v = call <vscale x 4 x float> @llvm.vp.fadd.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> %m, i32 %evl)
902 ret <vscale x 4 x float> %v
905 define <vscale x 4 x float> @vfadd_vf_nxv4f32_unmasked(<vscale x 4 x float> %va, float %b, i32 zeroext %evl) {
906 ; CHECK-LABEL: vfadd_vf_nxv4f32_unmasked:
908 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
909 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
911 %elt.head = insertelement <vscale x 4 x float> poison, float %b, i32 0
912 %vb = shufflevector <vscale x 4 x float> %elt.head, <vscale x 4 x float> poison, <vscale x 4 x i32> zeroinitializer
913 %v = call <vscale x 4 x float> @llvm.vp.fadd.nxv4f32(<vscale x 4 x float> %va, <vscale x 4 x float> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
914 ret <vscale x 4 x float> %v
917 declare <vscale x 8 x float> @llvm.vp.fadd.nxv8f32(<vscale x 8 x float>, <vscale x 8 x float>, <vscale x 8 x i1>, i32)
919 define <vscale x 8 x float> @vfadd_vv_nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
920 ; CHECK-LABEL: vfadd_vv_nxv8f32:
922 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
923 ; CHECK-NEXT: vfadd.vv v8, v8, v12, v0.t
925 %v = call <vscale x 8 x float> @llvm.vp.fadd.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> %m, i32 %evl)
926 ret <vscale x 8 x float> %v
929 define <vscale x 8 x float> @vfadd_vv_nxv8f32_unmasked(<vscale x 8 x float> %va, <vscale x 8 x float> %b, i32 zeroext %evl) {
930 ; CHECK-LABEL: vfadd_vv_nxv8f32_unmasked:
932 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
933 ; CHECK-NEXT: vfadd.vv v8, v8, v12
935 %v = call <vscale x 8 x float> @llvm.vp.fadd.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
936 ret <vscale x 8 x float> %v
939 define <vscale x 8 x float> @vfadd_vf_nxv8f32(<vscale x 8 x float> %va, float %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
940 ; CHECK-LABEL: vfadd_vf_nxv8f32:
942 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
943 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
945 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
946 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
947 %v = call <vscale x 8 x float> @llvm.vp.fadd.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> %m, i32 %evl)
948 ret <vscale x 8 x float> %v
951 define <vscale x 8 x float> @vfadd_vf_nxv8f32_unmasked(<vscale x 8 x float> %va, float %b, i32 zeroext %evl) {
952 ; CHECK-LABEL: vfadd_vf_nxv8f32_unmasked:
954 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
955 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
957 %elt.head = insertelement <vscale x 8 x float> poison, float %b, i32 0
958 %vb = shufflevector <vscale x 8 x float> %elt.head, <vscale x 8 x float> poison, <vscale x 8 x i32> zeroinitializer
959 %v = call <vscale x 8 x float> @llvm.vp.fadd.nxv8f32(<vscale x 8 x float> %va, <vscale x 8 x float> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
960 ret <vscale x 8 x float> %v
963 declare <vscale x 16 x float> @llvm.vp.fadd.nxv16f32(<vscale x 16 x float>, <vscale x 16 x float>, <vscale x 16 x i1>, i32)
965 define <vscale x 16 x float> @vfadd_vv_nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
966 ; CHECK-LABEL: vfadd_vv_nxv16f32:
968 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
969 ; CHECK-NEXT: vfadd.vv v8, v8, v16, v0.t
971 %v = call <vscale x 16 x float> @llvm.vp.fadd.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> %m, i32 %evl)
972 ret <vscale x 16 x float> %v
975 define <vscale x 16 x float> @vfadd_vv_nxv16f32_unmasked(<vscale x 16 x float> %va, <vscale x 16 x float> %b, i32 zeroext %evl) {
976 ; CHECK-LABEL: vfadd_vv_nxv16f32_unmasked:
978 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
979 ; CHECK-NEXT: vfadd.vv v8, v8, v16
981 %v = call <vscale x 16 x float> @llvm.vp.fadd.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %b, <vscale x 16 x i1> splat (i1 true), i32 %evl)
982 ret <vscale x 16 x float> %v
985 define <vscale x 16 x float> @vfadd_vf_nxv16f32(<vscale x 16 x float> %va, float %b, <vscale x 16 x i1> %m, i32 zeroext %evl) {
986 ; CHECK-LABEL: vfadd_vf_nxv16f32:
988 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
989 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
991 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
992 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
993 %v = call <vscale x 16 x float> @llvm.vp.fadd.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> %m, i32 %evl)
994 ret <vscale x 16 x float> %v
997 define <vscale x 16 x float> @vfadd_vf_nxv16f32_unmasked(<vscale x 16 x float> %va, float %b, i32 zeroext %evl) {
998 ; CHECK-LABEL: vfadd_vf_nxv16f32_unmasked:
1000 ; CHECK-NEXT: vsetvli zero, a0, e32, m8, ta, ma
1001 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
1003 %elt.head = insertelement <vscale x 16 x float> poison, float %b, i32 0
1004 %vb = shufflevector <vscale x 16 x float> %elt.head, <vscale x 16 x float> poison, <vscale x 16 x i32> zeroinitializer
1005 %v = call <vscale x 16 x float> @llvm.vp.fadd.nxv16f32(<vscale x 16 x float> %va, <vscale x 16 x float> %vb, <vscale x 16 x i1> splat (i1 true), i32 %evl)
1006 ret <vscale x 16 x float> %v
1009 declare <vscale x 1 x double> @llvm.vp.fadd.nxv1f64(<vscale x 1 x double>, <vscale x 1 x double>, <vscale x 1 x i1>, i32)
1011 define <vscale x 1 x double> @vfadd_vv_nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1012 ; CHECK-LABEL: vfadd_vv_nxv1f64:
1014 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1015 ; CHECK-NEXT: vfadd.vv v8, v8, v9, v0.t
1017 %v = call <vscale x 1 x double> @llvm.vp.fadd.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> %m, i32 %evl)
1018 ret <vscale x 1 x double> %v
1021 define <vscale x 1 x double> @vfadd_vv_nxv1f64_unmasked(<vscale x 1 x double> %va, <vscale x 1 x double> %b, i32 zeroext %evl) {
1022 ; CHECK-LABEL: vfadd_vv_nxv1f64_unmasked:
1024 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1025 ; CHECK-NEXT: vfadd.vv v8, v8, v9
1027 %v = call <vscale x 1 x double> @llvm.vp.fadd.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %b, <vscale x 1 x i1> splat (i1 true), i32 %evl)
1028 ret <vscale x 1 x double> %v
1031 define <vscale x 1 x double> @vfadd_vf_nxv1f64(<vscale x 1 x double> %va, double %b, <vscale x 1 x i1> %m, i32 zeroext %evl) {
1032 ; CHECK-LABEL: vfadd_vf_nxv1f64:
1034 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1035 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
1037 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1038 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1039 %v = call <vscale x 1 x double> @llvm.vp.fadd.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> %m, i32 %evl)
1040 ret <vscale x 1 x double> %v
1043 define <vscale x 1 x double> @vfadd_vf_nxv1f64_unmasked(<vscale x 1 x double> %va, double %b, i32 zeroext %evl) {
1044 ; CHECK-LABEL: vfadd_vf_nxv1f64_unmasked:
1046 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
1047 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
1049 %elt.head = insertelement <vscale x 1 x double> poison, double %b, i32 0
1050 %vb = shufflevector <vscale x 1 x double> %elt.head, <vscale x 1 x double> poison, <vscale x 1 x i32> zeroinitializer
1051 %v = call <vscale x 1 x double> @llvm.vp.fadd.nxv1f64(<vscale x 1 x double> %va, <vscale x 1 x double> %vb, <vscale x 1 x i1> splat (i1 true), i32 %evl)
1052 ret <vscale x 1 x double> %v
1055 declare <vscale x 2 x double> @llvm.vp.fadd.nxv2f64(<vscale x 2 x double>, <vscale x 2 x double>, <vscale x 2 x i1>, i32)
1057 define <vscale x 2 x double> @vfadd_vv_nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1058 ; CHECK-LABEL: vfadd_vv_nxv2f64:
1060 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1061 ; CHECK-NEXT: vfadd.vv v8, v8, v10, v0.t
1063 %v = call <vscale x 2 x double> @llvm.vp.fadd.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> %m, i32 %evl)
1064 ret <vscale x 2 x double> %v
1067 define <vscale x 2 x double> @vfadd_vv_nxv2f64_unmasked(<vscale x 2 x double> %va, <vscale x 2 x double> %b, i32 zeroext %evl) {
1068 ; CHECK-LABEL: vfadd_vv_nxv2f64_unmasked:
1070 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1071 ; CHECK-NEXT: vfadd.vv v8, v8, v10
1073 %v = call <vscale x 2 x double> @llvm.vp.fadd.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %b, <vscale x 2 x i1> splat (i1 true), i32 %evl)
1074 ret <vscale x 2 x double> %v
1077 define <vscale x 2 x double> @vfadd_vf_nxv2f64(<vscale x 2 x double> %va, double %b, <vscale x 2 x i1> %m, i32 zeroext %evl) {
1078 ; CHECK-LABEL: vfadd_vf_nxv2f64:
1080 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1081 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
1083 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1084 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1085 %v = call <vscale x 2 x double> @llvm.vp.fadd.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> %m, i32 %evl)
1086 ret <vscale x 2 x double> %v
1089 define <vscale x 2 x double> @vfadd_vf_nxv2f64_unmasked(<vscale x 2 x double> %va, double %b, i32 zeroext %evl) {
1090 ; CHECK-LABEL: vfadd_vf_nxv2f64_unmasked:
1092 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
1093 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
1095 %elt.head = insertelement <vscale x 2 x double> poison, double %b, i32 0
1096 %vb = shufflevector <vscale x 2 x double> %elt.head, <vscale x 2 x double> poison, <vscale x 2 x i32> zeroinitializer
1097 %v = call <vscale x 2 x double> @llvm.vp.fadd.nxv2f64(<vscale x 2 x double> %va, <vscale x 2 x double> %vb, <vscale x 2 x i1> splat (i1 true), i32 %evl)
1098 ret <vscale x 2 x double> %v
1101 declare <vscale x 4 x double> @llvm.vp.fadd.nxv4f64(<vscale x 4 x double>, <vscale x 4 x double>, <vscale x 4 x i1>, i32)
1103 define <vscale x 4 x double> @vfadd_vv_nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1104 ; CHECK-LABEL: vfadd_vv_nxv4f64:
1106 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1107 ; CHECK-NEXT: vfadd.vv v8, v8, v12, v0.t
1109 %v = call <vscale x 4 x double> @llvm.vp.fadd.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> %m, i32 %evl)
1110 ret <vscale x 4 x double> %v
1113 define <vscale x 4 x double> @vfadd_vv_nxv4f64_unmasked(<vscale x 4 x double> %va, <vscale x 4 x double> %b, i32 zeroext %evl) {
1114 ; CHECK-LABEL: vfadd_vv_nxv4f64_unmasked:
1116 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1117 ; CHECK-NEXT: vfadd.vv v8, v8, v12
1119 %v = call <vscale x 4 x double> @llvm.vp.fadd.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %b, <vscale x 4 x i1> splat (i1 true), i32 %evl)
1120 ret <vscale x 4 x double> %v
1123 define <vscale x 4 x double> @vfadd_vf_nxv4f64(<vscale x 4 x double> %va, double %b, <vscale x 4 x i1> %m, i32 zeroext %evl) {
1124 ; CHECK-LABEL: vfadd_vf_nxv4f64:
1126 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1127 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
1129 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1130 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1131 %v = call <vscale x 4 x double> @llvm.vp.fadd.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> %m, i32 %evl)
1132 ret <vscale x 4 x double> %v
1135 define <vscale x 4 x double> @vfadd_vf_nxv4f64_unmasked(<vscale x 4 x double> %va, double %b, i32 zeroext %evl) {
1136 ; CHECK-LABEL: vfadd_vf_nxv4f64_unmasked:
1138 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1139 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
1141 %elt.head = insertelement <vscale x 4 x double> poison, double %b, i32 0
1142 %vb = shufflevector <vscale x 4 x double> %elt.head, <vscale x 4 x double> poison, <vscale x 4 x i32> zeroinitializer
1143 %v = call <vscale x 4 x double> @llvm.vp.fadd.nxv4f64(<vscale x 4 x double> %va, <vscale x 4 x double> %vb, <vscale x 4 x i1> splat (i1 true), i32 %evl)
1144 ret <vscale x 4 x double> %v
1147 declare <vscale x 7 x double> @llvm.vp.fadd.nxv7f64(<vscale x 7 x double>, <vscale x 7 x double>, <vscale x 7 x i1>, i32)
1149 define <vscale x 7 x double> @vfadd_vv_nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x double> %b, <vscale x 7 x i1> %m, i32 zeroext %evl) {
1150 ; CHECK-LABEL: vfadd_vv_nxv7f64:
1152 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1153 ; CHECK-NEXT: vfadd.vv v8, v8, v16, v0.t
1155 %v = call <vscale x 7 x double> @llvm.vp.fadd.nxv7f64(<vscale x 7 x double> %va, <vscale x 7 x double> %b, <vscale x 7 x i1> %m, i32 %evl)
1156 ret <vscale x 7 x double> %v
1159 declare <vscale x 8 x double> @llvm.vp.fadd.nxv8f64(<vscale x 8 x double>, <vscale x 8 x double>, <vscale x 8 x i1>, i32)
1161 define <vscale x 8 x double> @vfadd_vv_nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1162 ; CHECK-LABEL: vfadd_vv_nxv8f64:
1164 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1165 ; CHECK-NEXT: vfadd.vv v8, v8, v16, v0.t
1167 %v = call <vscale x 8 x double> @llvm.vp.fadd.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> %m, i32 %evl)
1168 ret <vscale x 8 x double> %v
1171 define <vscale x 8 x double> @vfadd_vv_nxv8f64_unmasked(<vscale x 8 x double> %va, <vscale x 8 x double> %b, i32 zeroext %evl) {
1172 ; CHECK-LABEL: vfadd_vv_nxv8f64_unmasked:
1174 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1175 ; CHECK-NEXT: vfadd.vv v8, v8, v16
1177 %v = call <vscale x 8 x double> @llvm.vp.fadd.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %b, <vscale x 8 x i1> splat (i1 true), i32 %evl)
1178 ret <vscale x 8 x double> %v
1181 define <vscale x 8 x double> @vfadd_vf_nxv8f64(<vscale x 8 x double> %va, double %b, <vscale x 8 x i1> %m, i32 zeroext %evl) {
1182 ; CHECK-LABEL: vfadd_vf_nxv8f64:
1184 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1185 ; CHECK-NEXT: vfadd.vf v8, v8, fa0, v0.t
1187 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1188 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1189 %v = call <vscale x 8 x double> @llvm.vp.fadd.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> %m, i32 %evl)
1190 ret <vscale x 8 x double> %v
1193 define <vscale x 8 x double> @vfadd_vf_nxv8f64_unmasked(<vscale x 8 x double> %va, double %b, i32 zeroext %evl) {
1194 ; CHECK-LABEL: vfadd_vf_nxv8f64_unmasked:
1196 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1197 ; CHECK-NEXT: vfadd.vf v8, v8, fa0
1199 %elt.head = insertelement <vscale x 8 x double> poison, double %b, i32 0
1200 %vb = shufflevector <vscale x 8 x double> %elt.head, <vscale x 8 x double> poison, <vscale x 8 x i32> zeroinitializer
1201 %v = call <vscale x 8 x double> @llvm.vp.fadd.nxv8f64(<vscale x 8 x double> %va, <vscale x 8 x double> %vb, <vscale x 8 x i1> splat (i1 true), i32 %evl)
1202 ret <vscale x 8 x double> %v