1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 declare <2 x half> @llvm.vp.fmuladd.v2f16(<2 x half>, <2 x half>, <2 x half>, <2 x i1>, i32)
9 define <2 x half> @vfma_vv_v2f16(<2 x half> %va, <2 x half> %b, <2 x half> %c, <2 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vfma_vv_v2f16:
12 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
13 ; CHECK-NEXT: vfmadd.vv v9, v8, v10, v0.t
14 ; CHECK-NEXT: vmv1r.v v8, v9
16 %v = call <2 x half> @llvm.vp.fmuladd.v2f16(<2 x half> %va, <2 x half> %b, <2 x half> %c, <2 x i1> %m, i32 %evl)
20 define <2 x half> @vfma_vv_v2f16_unmasked(<2 x half> %va, <2 x half> %b, <2 x half> %c, i32 zeroext %evl) {
21 ; CHECK-LABEL: vfma_vv_v2f16_unmasked:
23 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
24 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
26 %head = insertelement <2 x i1> poison, i1 true, i32 0
27 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
28 %v = call <2 x half> @llvm.vp.fmuladd.v2f16(<2 x half> %va, <2 x half> %b, <2 x half> %c, <2 x i1> %m, i32 %evl)
32 define <2 x half> @vfma_vf_v2f16(<2 x half> %va, half %b, <2 x half> %vc, <2 x i1> %m, i32 zeroext %evl) {
33 ; CHECK-LABEL: vfma_vf_v2f16:
35 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
36 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9, v0.t
38 %elt.head = insertelement <2 x half> poison, half %b, i32 0
39 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
40 %v = call <2 x half> @llvm.vp.fmuladd.v2f16(<2 x half> %va, <2 x half> %vb, <2 x half> %vc, <2 x i1> %m, i32 %evl)
44 define <2 x half> @vfma_vf_v2f16_unmasked(<2 x half> %va, half %b, <2 x half> %vc, i32 zeroext %evl) {
45 ; CHECK-LABEL: vfma_vf_v2f16_unmasked:
47 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
48 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
50 %elt.head = insertelement <2 x half> poison, half %b, i32 0
51 %vb = shufflevector <2 x half> %elt.head, <2 x half> poison, <2 x i32> zeroinitializer
52 %head = insertelement <2 x i1> poison, i1 true, i32 0
53 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
54 %v = call <2 x half> @llvm.vp.fmuladd.v2f16(<2 x half> %va, <2 x half> %vb, <2 x half> %vc, <2 x i1> %m, i32 %evl)
58 declare <4 x half> @llvm.vp.fmuladd.v4f16(<4 x half>, <4 x half>, <4 x half>, <4 x i1>, i32)
60 define <4 x half> @vfma_vv_v4f16(<4 x half> %va, <4 x half> %b, <4 x half> %c, <4 x i1> %m, i32 zeroext %evl) {
61 ; CHECK-LABEL: vfma_vv_v4f16:
63 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
64 ; CHECK-NEXT: vfmadd.vv v9, v8, v10, v0.t
65 ; CHECK-NEXT: vmv1r.v v8, v9
67 %v = call <4 x half> @llvm.vp.fmuladd.v4f16(<4 x half> %va, <4 x half> %b, <4 x half> %c, <4 x i1> %m, i32 %evl)
71 define <4 x half> @vfma_vv_v4f16_unmasked(<4 x half> %va, <4 x half> %b, <4 x half> %c, i32 zeroext %evl) {
72 ; CHECK-LABEL: vfma_vv_v4f16_unmasked:
74 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
75 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
77 %head = insertelement <4 x i1> poison, i1 true, i32 0
78 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
79 %v = call <4 x half> @llvm.vp.fmuladd.v4f16(<4 x half> %va, <4 x half> %b, <4 x half> %c, <4 x i1> %m, i32 %evl)
83 define <4 x half> @vfma_vf_v4f16(<4 x half> %va, half %b, <4 x half> %vc, <4 x i1> %m, i32 zeroext %evl) {
84 ; CHECK-LABEL: vfma_vf_v4f16:
86 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
87 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9, v0.t
89 %elt.head = insertelement <4 x half> poison, half %b, i32 0
90 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
91 %v = call <4 x half> @llvm.vp.fmuladd.v4f16(<4 x half> %va, <4 x half> %vb, <4 x half> %vc, <4 x i1> %m, i32 %evl)
95 define <4 x half> @vfma_vf_v4f16_unmasked(<4 x half> %va, half %b, <4 x half> %vc, i32 zeroext %evl) {
96 ; CHECK-LABEL: vfma_vf_v4f16_unmasked:
98 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
99 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
101 %elt.head = insertelement <4 x half> poison, half %b, i32 0
102 %vb = shufflevector <4 x half> %elt.head, <4 x half> poison, <4 x i32> zeroinitializer
103 %head = insertelement <4 x i1> poison, i1 true, i32 0
104 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
105 %v = call <4 x half> @llvm.vp.fmuladd.v4f16(<4 x half> %va, <4 x half> %vb, <4 x half> %vc, <4 x i1> %m, i32 %evl)
109 declare <8 x half> @llvm.vp.fmuladd.v8f16(<8 x half>, <8 x half>, <8 x half>, <8 x i1>, i32)
111 define <8 x half> @vfma_vv_v8f16(<8 x half> %va, <8 x half> %b, <8 x half> %c, <8 x i1> %m, i32 zeroext %evl) {
112 ; CHECK-LABEL: vfma_vv_v8f16:
114 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
115 ; CHECK-NEXT: vfmadd.vv v9, v8, v10, v0.t
116 ; CHECK-NEXT: vmv.v.v v8, v9
118 %v = call <8 x half> @llvm.vp.fmuladd.v8f16(<8 x half> %va, <8 x half> %b, <8 x half> %c, <8 x i1> %m, i32 %evl)
122 define <8 x half> @vfma_vv_v8f16_unmasked(<8 x half> %va, <8 x half> %b, <8 x half> %c, i32 zeroext %evl) {
123 ; CHECK-LABEL: vfma_vv_v8f16_unmasked:
125 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
126 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
128 %head = insertelement <8 x i1> poison, i1 true, i32 0
129 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
130 %v = call <8 x half> @llvm.vp.fmuladd.v8f16(<8 x half> %va, <8 x half> %b, <8 x half> %c, <8 x i1> %m, i32 %evl)
134 define <8 x half> @vfma_vf_v8f16(<8 x half> %va, half %b, <8 x half> %vc, <8 x i1> %m, i32 zeroext %evl) {
135 ; CHECK-LABEL: vfma_vf_v8f16:
137 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
138 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9, v0.t
140 %elt.head = insertelement <8 x half> poison, half %b, i32 0
141 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
142 %v = call <8 x half> @llvm.vp.fmuladd.v8f16(<8 x half> %va, <8 x half> %vb, <8 x half> %vc, <8 x i1> %m, i32 %evl)
146 define <8 x half> @vfma_vf_v8f16_unmasked(<8 x half> %va, half %b, <8 x half> %vc, i32 zeroext %evl) {
147 ; CHECK-LABEL: vfma_vf_v8f16_unmasked:
149 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
150 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
152 %elt.head = insertelement <8 x half> poison, half %b, i32 0
153 %vb = shufflevector <8 x half> %elt.head, <8 x half> poison, <8 x i32> zeroinitializer
154 %head = insertelement <8 x i1> poison, i1 true, i32 0
155 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
156 %v = call <8 x half> @llvm.vp.fmuladd.v8f16(<8 x half> %va, <8 x half> %vb, <8 x half> %vc, <8 x i1> %m, i32 %evl)
160 declare <16 x half> @llvm.vp.fmuladd.v16f16(<16 x half>, <16 x half>, <16 x half>, <16 x i1>, i32)
162 define <16 x half> @vfma_vv_v16f16(<16 x half> %va, <16 x half> %b, <16 x half> %c, <16 x i1> %m, i32 zeroext %evl) {
163 ; CHECK-LABEL: vfma_vv_v16f16:
165 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
166 ; CHECK-NEXT: vfmadd.vv v10, v8, v12, v0.t
167 ; CHECK-NEXT: vmv.v.v v8, v10
169 %v = call <16 x half> @llvm.vp.fmuladd.v16f16(<16 x half> %va, <16 x half> %b, <16 x half> %c, <16 x i1> %m, i32 %evl)
173 define <16 x half> @vfma_vv_v16f16_unmasked(<16 x half> %va, <16 x half> %b, <16 x half> %c, i32 zeroext %evl) {
174 ; CHECK-LABEL: vfma_vv_v16f16_unmasked:
176 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
177 ; CHECK-NEXT: vfmadd.vv v8, v10, v12
179 %head = insertelement <16 x i1> poison, i1 true, i32 0
180 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
181 %v = call <16 x half> @llvm.vp.fmuladd.v16f16(<16 x half> %va, <16 x half> %b, <16 x half> %c, <16 x i1> %m, i32 %evl)
185 define <16 x half> @vfma_vf_v16f16(<16 x half> %va, half %b, <16 x half> %vc, <16 x i1> %m, i32 zeroext %evl) {
186 ; CHECK-LABEL: vfma_vf_v16f16:
188 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
189 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10, v0.t
191 %elt.head = insertelement <16 x half> poison, half %b, i32 0
192 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
193 %v = call <16 x half> @llvm.vp.fmuladd.v16f16(<16 x half> %va, <16 x half> %vb, <16 x half> %vc, <16 x i1> %m, i32 %evl)
197 define <16 x half> @vfma_vf_v16f16_unmasked(<16 x half> %va, half %b, <16 x half> %vc, i32 zeroext %evl) {
198 ; CHECK-LABEL: vfma_vf_v16f16_unmasked:
200 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
201 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10
203 %elt.head = insertelement <16 x half> poison, half %b, i32 0
204 %vb = shufflevector <16 x half> %elt.head, <16 x half> poison, <16 x i32> zeroinitializer
205 %head = insertelement <16 x i1> poison, i1 true, i32 0
206 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
207 %v = call <16 x half> @llvm.vp.fmuladd.v16f16(<16 x half> %va, <16 x half> %vb, <16 x half> %vc, <16 x i1> %m, i32 %evl)
211 declare <2 x float> @llvm.vp.fmuladd.v2f32(<2 x float>, <2 x float>, <2 x float>, <2 x i1>, i32)
213 define <2 x float> @vfma_vv_v2f32(<2 x float> %va, <2 x float> %b, <2 x float> %c, <2 x i1> %m, i32 zeroext %evl) {
214 ; CHECK-LABEL: vfma_vv_v2f32:
216 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
217 ; CHECK-NEXT: vfmadd.vv v9, v8, v10, v0.t
218 ; CHECK-NEXT: vmv1r.v v8, v9
220 %v = call <2 x float> @llvm.vp.fmuladd.v2f32(<2 x float> %va, <2 x float> %b, <2 x float> %c, <2 x i1> %m, i32 %evl)
224 define <2 x float> @vfma_vv_v2f32_unmasked(<2 x float> %va, <2 x float> %b, <2 x float> %c, i32 zeroext %evl) {
225 ; CHECK-LABEL: vfma_vv_v2f32_unmasked:
227 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
228 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
230 %head = insertelement <2 x i1> poison, i1 true, i32 0
231 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
232 %v = call <2 x float> @llvm.vp.fmuladd.v2f32(<2 x float> %va, <2 x float> %b, <2 x float> %c, <2 x i1> %m, i32 %evl)
236 define <2 x float> @vfma_vf_v2f32(<2 x float> %va, float %b, <2 x float> %vc, <2 x i1> %m, i32 zeroext %evl) {
237 ; CHECK-LABEL: vfma_vf_v2f32:
239 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
240 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9, v0.t
242 %elt.head = insertelement <2 x float> poison, float %b, i32 0
243 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
244 %v = call <2 x float> @llvm.vp.fmuladd.v2f32(<2 x float> %va, <2 x float> %vb, <2 x float> %vc, <2 x i1> %m, i32 %evl)
248 define <2 x float> @vfma_vf_v2f32_unmasked(<2 x float> %va, float %b, <2 x float> %vc, i32 zeroext %evl) {
249 ; CHECK-LABEL: vfma_vf_v2f32_unmasked:
251 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
252 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
254 %elt.head = insertelement <2 x float> poison, float %b, i32 0
255 %vb = shufflevector <2 x float> %elt.head, <2 x float> poison, <2 x i32> zeroinitializer
256 %head = insertelement <2 x i1> poison, i1 true, i32 0
257 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
258 %v = call <2 x float> @llvm.vp.fmuladd.v2f32(<2 x float> %va, <2 x float> %vb, <2 x float> %vc, <2 x i1> %m, i32 %evl)
262 declare <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float>, <4 x float>, <4 x float>, <4 x i1>, i32)
264 define <4 x float> @vfma_vv_v4f32(<4 x float> %va, <4 x float> %b, <4 x float> %c, <4 x i1> %m, i32 zeroext %evl) {
265 ; CHECK-LABEL: vfma_vv_v4f32:
267 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
268 ; CHECK-NEXT: vfmadd.vv v9, v8, v10, v0.t
269 ; CHECK-NEXT: vmv.v.v v8, v9
271 %v = call <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float> %va, <4 x float> %b, <4 x float> %c, <4 x i1> %m, i32 %evl)
275 define <4 x float> @vfma_vv_v4f32_unmasked(<4 x float> %va, <4 x float> %b, <4 x float> %c, i32 zeroext %evl) {
276 ; CHECK-LABEL: vfma_vv_v4f32_unmasked:
278 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
279 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
281 %head = insertelement <4 x i1> poison, i1 true, i32 0
282 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
283 %v = call <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float> %va, <4 x float> %b, <4 x float> %c, <4 x i1> %m, i32 %evl)
287 define <4 x float> @vfma_vf_v4f32(<4 x float> %va, float %b, <4 x float> %vc, <4 x i1> %m, i32 zeroext %evl) {
288 ; CHECK-LABEL: vfma_vf_v4f32:
290 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
291 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9, v0.t
293 %elt.head = insertelement <4 x float> poison, float %b, i32 0
294 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
295 %v = call <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float> %va, <4 x float> %vb, <4 x float> %vc, <4 x i1> %m, i32 %evl)
299 define <4 x float> @vfma_vf_v4f32_unmasked(<4 x float> %va, float %b, <4 x float> %vc, i32 zeroext %evl) {
300 ; CHECK-LABEL: vfma_vf_v4f32_unmasked:
302 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
303 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
305 %elt.head = insertelement <4 x float> poison, float %b, i32 0
306 %vb = shufflevector <4 x float> %elt.head, <4 x float> poison, <4 x i32> zeroinitializer
307 %head = insertelement <4 x i1> poison, i1 true, i32 0
308 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
309 %v = call <4 x float> @llvm.vp.fmuladd.v4f32(<4 x float> %va, <4 x float> %vb, <4 x float> %vc, <4 x i1> %m, i32 %evl)
313 declare <8 x float> @llvm.vp.fmuladd.v8f32(<8 x float>, <8 x float>, <8 x float>, <8 x i1>, i32)
315 define <8 x float> @vfma_vv_v8f32(<8 x float> %va, <8 x float> %b, <8 x float> %c, <8 x i1> %m, i32 zeroext %evl) {
316 ; CHECK-LABEL: vfma_vv_v8f32:
318 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
319 ; CHECK-NEXT: vfmadd.vv v10, v8, v12, v0.t
320 ; CHECK-NEXT: vmv.v.v v8, v10
322 %v = call <8 x float> @llvm.vp.fmuladd.v8f32(<8 x float> %va, <8 x float> %b, <8 x float> %c, <8 x i1> %m, i32 %evl)
326 define <8 x float> @vfma_vv_v8f32_unmasked(<8 x float> %va, <8 x float> %b, <8 x float> %c, i32 zeroext %evl) {
327 ; CHECK-LABEL: vfma_vv_v8f32_unmasked:
329 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
330 ; CHECK-NEXT: vfmadd.vv v8, v10, v12
332 %head = insertelement <8 x i1> poison, i1 true, i32 0
333 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
334 %v = call <8 x float> @llvm.vp.fmuladd.v8f32(<8 x float> %va, <8 x float> %b, <8 x float> %c, <8 x i1> %m, i32 %evl)
338 define <8 x float> @vfma_vf_v8f32(<8 x float> %va, float %b, <8 x float> %vc, <8 x i1> %m, i32 zeroext %evl) {
339 ; CHECK-LABEL: vfma_vf_v8f32:
341 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
342 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10, v0.t
344 %elt.head = insertelement <8 x float> poison, float %b, i32 0
345 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
346 %v = call <8 x float> @llvm.vp.fmuladd.v8f32(<8 x float> %va, <8 x float> %vb, <8 x float> %vc, <8 x i1> %m, i32 %evl)
350 define <8 x float> @vfma_vf_v8f32_unmasked(<8 x float> %va, float %b, <8 x float> %vc, i32 zeroext %evl) {
351 ; CHECK-LABEL: vfma_vf_v8f32_unmasked:
353 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
354 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10
356 %elt.head = insertelement <8 x float> poison, float %b, i32 0
357 %vb = shufflevector <8 x float> %elt.head, <8 x float> poison, <8 x i32> zeroinitializer
358 %head = insertelement <8 x i1> poison, i1 true, i32 0
359 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
360 %v = call <8 x float> @llvm.vp.fmuladd.v8f32(<8 x float> %va, <8 x float> %vb, <8 x float> %vc, <8 x i1> %m, i32 %evl)
364 declare <16 x float> @llvm.vp.fmuladd.v16f32(<16 x float>, <16 x float>, <16 x float>, <16 x i1>, i32)
366 define <16 x float> @vfma_vv_v16f32(<16 x float> %va, <16 x float> %b, <16 x float> %c, <16 x i1> %m, i32 zeroext %evl) {
367 ; CHECK-LABEL: vfma_vv_v16f32:
369 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
370 ; CHECK-NEXT: vfmadd.vv v12, v8, v16, v0.t
371 ; CHECK-NEXT: vmv.v.v v8, v12
373 %v = call <16 x float> @llvm.vp.fmuladd.v16f32(<16 x float> %va, <16 x float> %b, <16 x float> %c, <16 x i1> %m, i32 %evl)
377 define <16 x float> @vfma_vv_v16f32_unmasked(<16 x float> %va, <16 x float> %b, <16 x float> %c, i32 zeroext %evl) {
378 ; CHECK-LABEL: vfma_vv_v16f32_unmasked:
380 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
381 ; CHECK-NEXT: vfmadd.vv v8, v12, v16
383 %head = insertelement <16 x i1> poison, i1 true, i32 0
384 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
385 %v = call <16 x float> @llvm.vp.fmuladd.v16f32(<16 x float> %va, <16 x float> %b, <16 x float> %c, <16 x i1> %m, i32 %evl)
389 define <16 x float> @vfma_vf_v16f32(<16 x float> %va, float %b, <16 x float> %vc, <16 x i1> %m, i32 zeroext %evl) {
390 ; CHECK-LABEL: vfma_vf_v16f32:
392 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
393 ; CHECK-NEXT: vfmadd.vf v8, fa0, v12, v0.t
395 %elt.head = insertelement <16 x float> poison, float %b, i32 0
396 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
397 %v = call <16 x float> @llvm.vp.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc, <16 x i1> %m, i32 %evl)
401 define <16 x float> @vfma_vf_v16f32_unmasked(<16 x float> %va, float %b, <16 x float> %vc, i32 zeroext %evl) {
402 ; CHECK-LABEL: vfma_vf_v16f32_unmasked:
404 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
405 ; CHECK-NEXT: vfmadd.vf v8, fa0, v12
407 %elt.head = insertelement <16 x float> poison, float %b, i32 0
408 %vb = shufflevector <16 x float> %elt.head, <16 x float> poison, <16 x i32> zeroinitializer
409 %head = insertelement <16 x i1> poison, i1 true, i32 0
410 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
411 %v = call <16 x float> @llvm.vp.fmuladd.v16f32(<16 x float> %va, <16 x float> %vb, <16 x float> %vc, <16 x i1> %m, i32 %evl)
415 declare <2 x double> @llvm.vp.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>, <2 x i1>, i32)
417 define <2 x double> @vfma_vv_v2f64(<2 x double> %va, <2 x double> %b, <2 x double> %c, <2 x i1> %m, i32 zeroext %evl) {
418 ; CHECK-LABEL: vfma_vv_v2f64:
420 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
421 ; CHECK-NEXT: vfmadd.vv v9, v8, v10, v0.t
422 ; CHECK-NEXT: vmv.v.v v8, v9
424 %v = call <2 x double> @llvm.vp.fmuladd.v2f64(<2 x double> %va, <2 x double> %b, <2 x double> %c, <2 x i1> %m, i32 %evl)
428 define <2 x double> @vfma_vv_v2f64_unmasked(<2 x double> %va, <2 x double> %b, <2 x double> %c, i32 zeroext %evl) {
429 ; CHECK-LABEL: vfma_vv_v2f64_unmasked:
431 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
432 ; CHECK-NEXT: vfmadd.vv v8, v9, v10
434 %head = insertelement <2 x i1> poison, i1 true, i32 0
435 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
436 %v = call <2 x double> @llvm.vp.fmuladd.v2f64(<2 x double> %va, <2 x double> %b, <2 x double> %c, <2 x i1> %m, i32 %evl)
440 define <2 x double> @vfma_vf_v2f64(<2 x double> %va, double %b, <2 x double> %vc, <2 x i1> %m, i32 zeroext %evl) {
441 ; CHECK-LABEL: vfma_vf_v2f64:
443 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
444 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9, v0.t
446 %elt.head = insertelement <2 x double> poison, double %b, i32 0
447 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
448 %v = call <2 x double> @llvm.vp.fmuladd.v2f64(<2 x double> %va, <2 x double> %vb, <2 x double> %vc, <2 x i1> %m, i32 %evl)
452 define <2 x double> @vfma_vf_v2f64_unmasked(<2 x double> %va, double %b, <2 x double> %vc, i32 zeroext %evl) {
453 ; CHECK-LABEL: vfma_vf_v2f64_unmasked:
455 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
456 ; CHECK-NEXT: vfmadd.vf v8, fa0, v9
458 %elt.head = insertelement <2 x double> poison, double %b, i32 0
459 %vb = shufflevector <2 x double> %elt.head, <2 x double> poison, <2 x i32> zeroinitializer
460 %head = insertelement <2 x i1> poison, i1 true, i32 0
461 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
462 %v = call <2 x double> @llvm.vp.fmuladd.v2f64(<2 x double> %va, <2 x double> %vb, <2 x double> %vc, <2 x i1> %m, i32 %evl)
466 declare <4 x double> @llvm.vp.fmuladd.v4f64(<4 x double>, <4 x double>, <4 x double>, <4 x i1>, i32)
468 define <4 x double> @vfma_vv_v4f64(<4 x double> %va, <4 x double> %b, <4 x double> %c, <4 x i1> %m, i32 zeroext %evl) {
469 ; CHECK-LABEL: vfma_vv_v4f64:
471 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
472 ; CHECK-NEXT: vfmadd.vv v10, v8, v12, v0.t
473 ; CHECK-NEXT: vmv.v.v v8, v10
475 %v = call <4 x double> @llvm.vp.fmuladd.v4f64(<4 x double> %va, <4 x double> %b, <4 x double> %c, <4 x i1> %m, i32 %evl)
479 define <4 x double> @vfma_vv_v4f64_unmasked(<4 x double> %va, <4 x double> %b, <4 x double> %c, i32 zeroext %evl) {
480 ; CHECK-LABEL: vfma_vv_v4f64_unmasked:
482 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
483 ; CHECK-NEXT: vfmadd.vv v8, v10, v12
485 %head = insertelement <4 x i1> poison, i1 true, i32 0
486 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
487 %v = call <4 x double> @llvm.vp.fmuladd.v4f64(<4 x double> %va, <4 x double> %b, <4 x double> %c, <4 x i1> %m, i32 %evl)
491 define <4 x double> @vfma_vf_v4f64(<4 x double> %va, double %b, <4 x double> %vc, <4 x i1> %m, i32 zeroext %evl) {
492 ; CHECK-LABEL: vfma_vf_v4f64:
494 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
495 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10, v0.t
497 %elt.head = insertelement <4 x double> poison, double %b, i32 0
498 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
499 %v = call <4 x double> @llvm.vp.fmuladd.v4f64(<4 x double> %va, <4 x double> %vb, <4 x double> %vc, <4 x i1> %m, i32 %evl)
503 define <4 x double> @vfma_vf_v4f64_unmasked(<4 x double> %va, double %b, <4 x double> %vc, i32 zeroext %evl) {
504 ; CHECK-LABEL: vfma_vf_v4f64_unmasked:
506 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
507 ; CHECK-NEXT: vfmadd.vf v8, fa0, v10
509 %elt.head = insertelement <4 x double> poison, double %b, i32 0
510 %vb = shufflevector <4 x double> %elt.head, <4 x double> poison, <4 x i32> zeroinitializer
511 %head = insertelement <4 x i1> poison, i1 true, i32 0
512 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
513 %v = call <4 x double> @llvm.vp.fmuladd.v4f64(<4 x double> %va, <4 x double> %vb, <4 x double> %vc, <4 x i1> %m, i32 %evl)
517 declare <8 x double> @llvm.vp.fmuladd.v8f64(<8 x double>, <8 x double>, <8 x double>, <8 x i1>, i32)
519 define <8 x double> @vfma_vv_v8f64(<8 x double> %va, <8 x double> %b, <8 x double> %c, <8 x i1> %m, i32 zeroext %evl) {
520 ; CHECK-LABEL: vfma_vv_v8f64:
522 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
523 ; CHECK-NEXT: vfmadd.vv v12, v8, v16, v0.t
524 ; CHECK-NEXT: vmv.v.v v8, v12
526 %v = call <8 x double> @llvm.vp.fmuladd.v8f64(<8 x double> %va, <8 x double> %b, <8 x double> %c, <8 x i1> %m, i32 %evl)
530 define <8 x double> @vfma_vv_v8f64_unmasked(<8 x double> %va, <8 x double> %b, <8 x double> %c, i32 zeroext %evl) {
531 ; CHECK-LABEL: vfma_vv_v8f64_unmasked:
533 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
534 ; CHECK-NEXT: vfmadd.vv v8, v12, v16
536 %head = insertelement <8 x i1> poison, i1 true, i32 0
537 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
538 %v = call <8 x double> @llvm.vp.fmuladd.v8f64(<8 x double> %va, <8 x double> %b, <8 x double> %c, <8 x i1> %m, i32 %evl)
542 define <8 x double> @vfma_vf_v8f64(<8 x double> %va, double %b, <8 x double> %vc, <8 x i1> %m, i32 zeroext %evl) {
543 ; CHECK-LABEL: vfma_vf_v8f64:
545 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
546 ; CHECK-NEXT: vfmadd.vf v8, fa0, v12, v0.t
548 %elt.head = insertelement <8 x double> poison, double %b, i32 0
549 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
550 %v = call <8 x double> @llvm.vp.fmuladd.v8f64(<8 x double> %va, <8 x double> %vb, <8 x double> %vc, <8 x i1> %m, i32 %evl)
554 define <8 x double> @vfma_vf_v8f64_unmasked(<8 x double> %va, double %b, <8 x double> %vc, i32 zeroext %evl) {
555 ; CHECK-LABEL: vfma_vf_v8f64_unmasked:
557 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
558 ; CHECK-NEXT: vfmadd.vf v8, fa0, v12
560 %elt.head = insertelement <8 x double> poison, double %b, i32 0
561 %vb = shufflevector <8 x double> %elt.head, <8 x double> poison, <8 x i32> zeroinitializer
562 %head = insertelement <8 x i1> poison, i1 true, i32 0
563 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
564 %v = call <8 x double> @llvm.vp.fmuladd.v8f64(<8 x double> %va, <8 x double> %vb, <8 x double> %vc, <8 x i1> %m, i32 %evl)
568 declare <15 x double> @llvm.vp.fmuladd.v15f64(<15 x double>, <15 x double>, <15 x double>, <15 x i1>, i32)
570 define <15 x double> @vfma_vv_v15f64(<15 x double> %va, <15 x double> %b, <15 x double> %c, <15 x i1> %m, i32 zeroext %evl) {
571 ; CHECK-LABEL: vfma_vv_v15f64:
573 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
574 ; CHECK-NEXT: vle64.v v24, (a0)
575 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
576 ; CHECK-NEXT: vfmadd.vv v16, v8, v24, v0.t
577 ; CHECK-NEXT: vmv.v.v v8, v16
579 %v = call <15 x double> @llvm.vp.fmuladd.v15f64(<15 x double> %va, <15 x double> %b, <15 x double> %c, <15 x i1> %m, i32 %evl)
583 define <15 x double> @vfma_vv_v15f64_unmasked(<15 x double> %va, <15 x double> %b, <15 x double> %c, i32 zeroext %evl) {
584 ; CHECK-LABEL: vfma_vv_v15f64_unmasked:
586 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
587 ; CHECK-NEXT: vle64.v v24, (a0)
588 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
589 ; CHECK-NEXT: vfmadd.vv v8, v16, v24
591 %head = insertelement <15 x i1> poison, i1 true, i32 0
592 %m = shufflevector <15 x i1> %head, <15 x i1> poison, <15 x i32> zeroinitializer
593 %v = call <15 x double> @llvm.vp.fmuladd.v15f64(<15 x double> %va, <15 x double> %b, <15 x double> %c, <15 x i1> %m, i32 %evl)
597 declare <16 x double> @llvm.vp.fmuladd.v16f64(<16 x double>, <16 x double>, <16 x double>, <16 x i1>, i32)
599 define <16 x double> @vfma_vv_v16f64(<16 x double> %va, <16 x double> %b, <16 x double> %c, <16 x i1> %m, i32 zeroext %evl) {
600 ; CHECK-LABEL: vfma_vv_v16f64:
602 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
603 ; CHECK-NEXT: vle64.v v24, (a0)
604 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
605 ; CHECK-NEXT: vfmadd.vv v16, v8, v24, v0.t
606 ; CHECK-NEXT: vmv.v.v v8, v16
608 %v = call <16 x double> @llvm.vp.fmuladd.v16f64(<16 x double> %va, <16 x double> %b, <16 x double> %c, <16 x i1> %m, i32 %evl)
612 define <16 x double> @vfma_vv_v16f64_unmasked(<16 x double> %va, <16 x double> %b, <16 x double> %c, i32 zeroext %evl) {
613 ; CHECK-LABEL: vfma_vv_v16f64_unmasked:
615 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
616 ; CHECK-NEXT: vle64.v v24, (a0)
617 ; CHECK-NEXT: vsetvli zero, a1, e64, m8, ta, ma
618 ; CHECK-NEXT: vfmadd.vv v8, v16, v24
620 %head = insertelement <16 x i1> poison, i1 true, i32 0
621 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
622 %v = call <16 x double> @llvm.vp.fmuladd.v16f64(<16 x double> %va, <16 x double> %b, <16 x double> %c, <16 x i1> %m, i32 %evl)
626 define <16 x double> @vfma_vf_v16f64(<16 x double> %va, double %b, <16 x double> %vc, <16 x i1> %m, i32 zeroext %evl) {
627 ; CHECK-LABEL: vfma_vf_v16f64:
629 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
630 ; CHECK-NEXT: vfmadd.vf v8, fa0, v16, v0.t
632 %elt.head = insertelement <16 x double> poison, double %b, i32 0
633 %vb = shufflevector <16 x double> %elt.head, <16 x double> poison, <16 x i32> zeroinitializer
634 %v = call <16 x double> @llvm.vp.fmuladd.v16f64(<16 x double> %va, <16 x double> %vb, <16 x double> %vc, <16 x i1> %m, i32 %evl)
638 define <16 x double> @vfma_vf_v16f64_unmasked(<16 x double> %va, double %b, <16 x double> %vc, i32 zeroext %evl) {
639 ; CHECK-LABEL: vfma_vf_v16f64_unmasked:
641 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
642 ; CHECK-NEXT: vfmadd.vf v8, fa0, v16
644 %elt.head = insertelement <16 x double> poison, double %b, i32 0
645 %vb = shufflevector <16 x double> %elt.head, <16 x double> poison, <16 x i32> zeroinitializer
646 %head = insertelement <16 x i1> poison, i1 true, i32 0
647 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
648 %v = call <16 x double> @llvm.vp.fmuladd.v16f64(<16 x double> %va, <16 x double> %vb, <16 x double> %vc, <16 x i1> %m, i32 %evl)
652 declare <32 x double> @llvm.vp.fmuladd.v32f64(<32 x double>, <32 x double>, <32 x double>, <32 x i1>, i32)
654 define <32 x double> @vfma_vv_v32f64(<32 x double> %va, <32 x double> %b, <32 x double> %c, <32 x i1> %m, i32 zeroext %evl) {
655 ; CHECK-LABEL: vfma_vv_v32f64:
657 ; CHECK-NEXT: addi sp, sp, -16
658 ; CHECK-NEXT: .cfi_def_cfa_offset 16
659 ; CHECK-NEXT: csrr a1, vlenb
660 ; CHECK-NEXT: slli a1, a1, 5
661 ; CHECK-NEXT: sub sp, sp, a1
662 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x20, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 32 * vlenb
663 ; CHECK-NEXT: addi a1, a2, 128
664 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
665 ; CHECK-NEXT: vle64.v v24, (a1)
666 ; CHECK-NEXT: csrr a1, vlenb
667 ; CHECK-NEXT: li a3, 24
668 ; CHECK-NEXT: mul a1, a1, a3
669 ; CHECK-NEXT: add a1, sp, a1
670 ; CHECK-NEXT: addi a1, a1, 16
671 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
672 ; CHECK-NEXT: addi a1, a0, 128
673 ; CHECK-NEXT: vle64.v v24, (a1)
674 ; CHECK-NEXT: csrr a1, vlenb
675 ; CHECK-NEXT: slli a1, a1, 4
676 ; CHECK-NEXT: add a1, sp, a1
677 ; CHECK-NEXT: addi a1, a1, 16
678 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
679 ; CHECK-NEXT: vsetivli zero, 2, e8, mf4, ta, ma
680 ; CHECK-NEXT: vslidedown.vi v1, v0, 2
681 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
682 ; CHECK-NEXT: vle64.v v24, (a2)
683 ; CHECK-NEXT: addi a1, sp, 16
684 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
685 ; CHECK-NEXT: vle64.v v24, (a0)
686 ; CHECK-NEXT: li a1, 16
687 ; CHECK-NEXT: csrr a0, vlenb
688 ; CHECK-NEXT: slli a0, a0, 3
689 ; CHECK-NEXT: add a0, sp, a0
690 ; CHECK-NEXT: addi a0, a0, 16
691 ; CHECK-NEXT: vs8r.v v16, (a0) # Unknown-size Folded Spill
692 ; CHECK-NEXT: mv a0, a4
693 ; CHECK-NEXT: bltu a4, a1, .LBB50_2
694 ; CHECK-NEXT: # %bb.1:
695 ; CHECK-NEXT: li a0, 16
696 ; CHECK-NEXT: .LBB50_2:
697 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
698 ; CHECK-NEXT: addi a0, sp, 16
699 ; CHECK-NEXT: vl8r.v v16, (a0) # Unknown-size Folded Reload
700 ; CHECK-NEXT: vfmadd.vv v24, v8, v16, v0.t
701 ; CHECK-NEXT: vs8r.v v24, (a0) # Unknown-size Folded Spill
702 ; CHECK-NEXT: addi a0, a4, -16
703 ; CHECK-NEXT: sltu a1, a4, a0
704 ; CHECK-NEXT: addi a1, a1, -1
705 ; CHECK-NEXT: and a0, a1, a0
706 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
707 ; CHECK-NEXT: vmv1r.v v0, v1
708 ; CHECK-NEXT: csrr a0, vlenb
709 ; CHECK-NEXT: li a1, 24
710 ; CHECK-NEXT: mul a0, a0, a1
711 ; CHECK-NEXT: add a0, sp, a0
712 ; CHECK-NEXT: addi a0, a0, 16
713 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
714 ; CHECK-NEXT: csrr a0, vlenb
715 ; CHECK-NEXT: slli a0, a0, 4
716 ; CHECK-NEXT: add a0, sp, a0
717 ; CHECK-NEXT: addi a0, a0, 16
718 ; CHECK-NEXT: vl8r.v v16, (a0) # Unknown-size Folded Reload
719 ; CHECK-NEXT: csrr a0, vlenb
720 ; CHECK-NEXT: slli a0, a0, 3
721 ; CHECK-NEXT: add a0, sp, a0
722 ; CHECK-NEXT: addi a0, a0, 16
723 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
724 ; CHECK-NEXT: vfmadd.vv v16, v24, v8, v0.t
725 ; CHECK-NEXT: addi a0, sp, 16
726 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
727 ; CHECK-NEXT: csrr a0, vlenb
728 ; CHECK-NEXT: slli a0, a0, 5
729 ; CHECK-NEXT: add sp, sp, a0
730 ; CHECK-NEXT: addi sp, sp, 16
732 %v = call <32 x double> @llvm.vp.fmuladd.v32f64(<32 x double> %va, <32 x double> %b, <32 x double> %c, <32 x i1> %m, i32 %evl)
736 define <32 x double> @vfma_vv_v32f64_unmasked(<32 x double> %va, <32 x double> %b, <32 x double> %c, i32 zeroext %evl) {
737 ; CHECK-LABEL: vfma_vv_v32f64_unmasked:
739 ; CHECK-NEXT: addi sp, sp, -16
740 ; CHECK-NEXT: .cfi_def_cfa_offset 16
741 ; CHECK-NEXT: csrr a1, vlenb
742 ; CHECK-NEXT: li a3, 24
743 ; CHECK-NEXT: mul a1, a1, a3
744 ; CHECK-NEXT: sub sp, sp, a1
745 ; CHECK-NEXT: .cfi_escape 0x0f, 0x0d, 0x72, 0x00, 0x11, 0x10, 0x22, 0x11, 0x18, 0x92, 0xa2, 0x38, 0x00, 0x1e, 0x22 # sp + 16 + 24 * vlenb
746 ; CHECK-NEXT: addi a1, a2, 128
747 ; CHECK-NEXT: vsetivli zero, 16, e64, m8, ta, ma
748 ; CHECK-NEXT: vle64.v v24, (a1)
749 ; CHECK-NEXT: csrr a1, vlenb
750 ; CHECK-NEXT: slli a1, a1, 4
751 ; CHECK-NEXT: add a1, sp, a1
752 ; CHECK-NEXT: addi a1, a1, 16
753 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
754 ; CHECK-NEXT: addi a1, a0, 128
755 ; CHECK-NEXT: vle64.v v24, (a1)
756 ; CHECK-NEXT: addi a1, sp, 16
757 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
758 ; CHECK-NEXT: vle64.v v24, (a2)
759 ; CHECK-NEXT: csrr a1, vlenb
760 ; CHECK-NEXT: slli a1, a1, 3
761 ; CHECK-NEXT: add a1, sp, a1
762 ; CHECK-NEXT: addi a1, a1, 16
763 ; CHECK-NEXT: vs8r.v v24, (a1) # Unknown-size Folded Spill
764 ; CHECK-NEXT: vle64.v v0, (a0)
765 ; CHECK-NEXT: li a1, 16
766 ; CHECK-NEXT: mv a0, a4
767 ; CHECK-NEXT: bltu a4, a1, .LBB51_2
768 ; CHECK-NEXT: # %bb.1:
769 ; CHECK-NEXT: li a0, 16
770 ; CHECK-NEXT: .LBB51_2:
771 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
772 ; CHECK-NEXT: csrr a0, vlenb
773 ; CHECK-NEXT: slli a0, a0, 3
774 ; CHECK-NEXT: add a0, sp, a0
775 ; CHECK-NEXT: addi a0, a0, 16
776 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
777 ; CHECK-NEXT: vfmadd.vv v0, v8, v24
778 ; CHECK-NEXT: addi a0, a4, -16
779 ; CHECK-NEXT: sltu a1, a4, a0
780 ; CHECK-NEXT: addi a1, a1, -1
781 ; CHECK-NEXT: and a0, a1, a0
782 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
783 ; CHECK-NEXT: csrr a0, vlenb
784 ; CHECK-NEXT: slli a0, a0, 4
785 ; CHECK-NEXT: add a0, sp, a0
786 ; CHECK-NEXT: addi a0, a0, 16
787 ; CHECK-NEXT: vl8r.v v8, (a0) # Unknown-size Folded Reload
788 ; CHECK-NEXT: addi a0, sp, 16
789 ; CHECK-NEXT: vl8r.v v24, (a0) # Unknown-size Folded Reload
790 ; CHECK-NEXT: vfmadd.vv v24, v16, v8
791 ; CHECK-NEXT: vmv8r.v v8, v0
792 ; CHECK-NEXT: vmv.v.v v16, v24
793 ; CHECK-NEXT: csrr a0, vlenb
794 ; CHECK-NEXT: li a1, 24
795 ; CHECK-NEXT: mul a0, a0, a1
796 ; CHECK-NEXT: add sp, sp, a0
797 ; CHECK-NEXT: addi sp, sp, 16
799 %head = insertelement <32 x i1> poison, i1 true, i32 0
800 %m = shufflevector <32 x i1> %head, <32 x i1> poison, <32 x i32> zeroinitializer
801 %v = call <32 x double> @llvm.vp.fmuladd.v32f64(<32 x double> %va, <32 x double> %b, <32 x double> %c, <32 x i1> %m, i32 %evl)