1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -target-abi=ilp32 \
3 ; RUN: -verify-machineinstrs < %s | FileCheck %s
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -target-abi=lp64 \
5 ; RUN: -verify-machineinstrs < %s | FileCheck %s
7 define <vscale x 1 x i64> @vwmacc_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i64> %vc) {
8 ; CHECK-LABEL: vwmacc_vv_nxv1i32:
10 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
11 ; CHECK-NEXT: vwmacc.vv v10, v8, v9
12 ; CHECK-NEXT: vmv1r.v v8, v10
14 %vd = sext <vscale x 1 x i32> %va to <vscale x 1 x i64>
15 %ve = sext <vscale x 1 x i32> %vb to <vscale x 1 x i64>
17 %x = mul <vscale x 1 x i64> %vd, %ve
18 %y = add <vscale x 1 x i64> %x, %vc
19 ret <vscale x 1 x i64> %y
22 define <vscale x 1 x i64> @vwmacc_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i64> %vc) {
23 ; CHECK-LABEL: vwmacc_vx_nxv1i32:
25 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
26 ; CHECK-NEXT: vwmacc.vx v9, a0, v8
27 ; CHECK-NEXT: vmv1r.v v8, v9
29 %head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
30 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
31 %vd = sext <vscale x 1 x i32> %va to <vscale x 1 x i64>
32 %ve = sext <vscale x 1 x i32> %splat to <vscale x 1 x i64>
34 %x = mul <vscale x 1 x i64> %vd, %ve
35 %y = add <vscale x 1 x i64> %x, %vc
36 ret <vscale x 1 x i64> %y
39 define <vscale x 1 x i64> @vwmaccu_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i64> %vc) {
40 ; CHECK-LABEL: vwmaccu_vv_nxv1i32:
42 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
43 ; CHECK-NEXT: vwmaccu.vv v10, v8, v9
44 ; CHECK-NEXT: vmv1r.v v8, v10
46 %vd = zext <vscale x 1 x i32> %va to <vscale x 1 x i64>
47 %ve = zext <vscale x 1 x i32> %vb to <vscale x 1 x i64>
49 %x = mul <vscale x 1 x i64> %vd, %ve
50 %y = add <vscale x 1 x i64> %x, %vc
51 ret <vscale x 1 x i64> %y
54 define <vscale x 1 x i64> @vwmaccu_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i64> %vc) {
55 ; CHECK-LABEL: vwmaccu_vx_nxv1i32:
57 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
58 ; CHECK-NEXT: vwmaccu.vx v9, a0, v8
59 ; CHECK-NEXT: vmv1r.v v8, v9
61 %head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
62 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
63 %vd = zext <vscale x 1 x i32> %va to <vscale x 1 x i64>
64 %ve = zext <vscale x 1 x i32> %splat to <vscale x 1 x i64>
66 %x = mul <vscale x 1 x i64> %vd, %ve
67 %y = add <vscale x 1 x i64> %x, %vc
68 ret <vscale x 1 x i64> %y
71 define <vscale x 1 x i64> @vwmaccsu_vv_nxv1i32(<vscale x 1 x i32> %va, <vscale x 1 x i32> %vb, <vscale x 1 x i64> %vc) {
72 ; CHECK-LABEL: vwmaccsu_vv_nxv1i32:
74 ; CHECK-NEXT: vsetvli a0, zero, e32, mf2, ta, ma
75 ; CHECK-NEXT: vwmaccsu.vv v10, v9, v8
76 ; CHECK-NEXT: vmv1r.v v8, v10
78 %vd = zext <vscale x 1 x i32> %va to <vscale x 1 x i64>
79 %ve = sext <vscale x 1 x i32> %vb to <vscale x 1 x i64>
81 %x = mul <vscale x 1 x i64> %vd, %ve
82 %y = add <vscale x 1 x i64> %x, %vc
83 ret <vscale x 1 x i64> %y
86 define <vscale x 1 x i64> @vwmaccsu_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i64> %vc) {
87 ; CHECK-LABEL: vwmaccsu_vx_nxv1i32:
89 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
90 ; CHECK-NEXT: vwmaccsu.vx v9, a0, v8
91 ; CHECK-NEXT: vmv1r.v v8, v9
93 %head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
94 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
95 %vd = zext <vscale x 1 x i32> %va to <vscale x 1 x i64>
96 %ve = sext <vscale x 1 x i32> %splat to <vscale x 1 x i64>
98 %x = mul <vscale x 1 x i64> %vd, %ve
99 %y = add <vscale x 1 x i64> %x, %vc
100 ret <vscale x 1 x i64> %y
103 define <vscale x 1 x i64> @vwmaccus_vx_nxv1i32(<vscale x 1 x i32> %va, i32 %b, <vscale x 1 x i64> %vc) {
104 ; CHECK-LABEL: vwmaccus_vx_nxv1i32:
106 ; CHECK-NEXT: vsetvli a1, zero, e32, mf2, ta, ma
107 ; CHECK-NEXT: vwmaccus.vx v9, a0, v8
108 ; CHECK-NEXT: vmv1r.v v8, v9
110 %head = insertelement <vscale x 1 x i32> poison, i32 %b, i32 0
111 %splat = shufflevector <vscale x 1 x i32> %head, <vscale x 1 x i32> poison, <vscale x 1 x i32> zeroinitializer
112 %vd = sext <vscale x 1 x i32> %va to <vscale x 1 x i64>
113 %ve = zext <vscale x 1 x i32> %splat to <vscale x 1 x i64>
115 %x = mul <vscale x 1 x i64> %vd, %ve
116 %y = add <vscale x 1 x i64> %x, %vc
117 ret <vscale x 1 x i64> %y
120 define <vscale x 2 x i64> @vwmacc_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i64> %vc) {
121 ; CHECK-LABEL: vwmacc_vv_nxv2i32:
123 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
124 ; CHECK-NEXT: vwmacc.vv v10, v8, v9
125 ; CHECK-NEXT: vmv2r.v v8, v10
127 %vd = sext <vscale x 2 x i32> %va to <vscale x 2 x i64>
128 %ve = sext <vscale x 2 x i32> %vb to <vscale x 2 x i64>
130 %x = mul <vscale x 2 x i64> %vd, %ve
131 %y = add <vscale x 2 x i64> %x, %vc
132 ret <vscale x 2 x i64> %y
135 define <vscale x 2 x i64> @vwmacc_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i64> %vc) {
136 ; CHECK-LABEL: vwmacc_vx_nxv2i32:
138 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
139 ; CHECK-NEXT: vwmacc.vx v10, a0, v8
140 ; CHECK-NEXT: vmv2r.v v8, v10
142 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
143 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
144 %vd = sext <vscale x 2 x i32> %va to <vscale x 2 x i64>
145 %ve = sext <vscale x 2 x i32> %splat to <vscale x 2 x i64>
147 %x = mul <vscale x 2 x i64> %vd, %ve
148 %y = add <vscale x 2 x i64> %x, %vc
149 ret <vscale x 2 x i64> %y
152 define <vscale x 2 x i64> @vwmaccu_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i64> %vc) {
153 ; CHECK-LABEL: vwmaccu_vv_nxv2i32:
155 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
156 ; CHECK-NEXT: vwmaccu.vv v10, v8, v9
157 ; CHECK-NEXT: vmv2r.v v8, v10
159 %vd = zext <vscale x 2 x i32> %va to <vscale x 2 x i64>
160 %ve = zext <vscale x 2 x i32> %vb to <vscale x 2 x i64>
162 %x = mul <vscale x 2 x i64> %vd, %ve
163 %y = add <vscale x 2 x i64> %x, %vc
164 ret <vscale x 2 x i64> %y
167 define <vscale x 2 x i64> @vwmaccu_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i64> %vc) {
168 ; CHECK-LABEL: vwmaccu_vx_nxv2i32:
170 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
171 ; CHECK-NEXT: vwmaccu.vx v10, a0, v8
172 ; CHECK-NEXT: vmv2r.v v8, v10
174 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
175 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
176 %vd = zext <vscale x 2 x i32> %va to <vscale x 2 x i64>
177 %ve = zext <vscale x 2 x i32> %splat to <vscale x 2 x i64>
179 %x = mul <vscale x 2 x i64> %vd, %ve
180 %y = add <vscale x 2 x i64> %x, %vc
181 ret <vscale x 2 x i64> %y
184 define <vscale x 2 x i64> @vwmaccsu_vv_nxv2i32(<vscale x 2 x i32> %va, <vscale x 2 x i32> %vb, <vscale x 2 x i64> %vc) {
185 ; CHECK-LABEL: vwmaccsu_vv_nxv2i32:
187 ; CHECK-NEXT: vsetvli a0, zero, e32, m1, ta, ma
188 ; CHECK-NEXT: vwmaccsu.vv v10, v9, v8
189 ; CHECK-NEXT: vmv2r.v v8, v10
191 %vd = zext <vscale x 2 x i32> %va to <vscale x 2 x i64>
192 %ve = sext <vscale x 2 x i32> %vb to <vscale x 2 x i64>
194 %x = mul <vscale x 2 x i64> %vd, %ve
195 %y = add <vscale x 2 x i64> %x, %vc
196 ret <vscale x 2 x i64> %y
199 define <vscale x 2 x i64> @vwmaccsu_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i64> %vc) {
200 ; CHECK-LABEL: vwmaccsu_vx_nxv2i32:
202 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
203 ; CHECK-NEXT: vwmaccsu.vx v10, a0, v8
204 ; CHECK-NEXT: vmv2r.v v8, v10
206 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
207 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
208 %vd = zext <vscale x 2 x i32> %va to <vscale x 2 x i64>
209 %ve = sext <vscale x 2 x i32> %splat to <vscale x 2 x i64>
211 %x = mul <vscale x 2 x i64> %vd, %ve
212 %y = add <vscale x 2 x i64> %x, %vc
213 ret <vscale x 2 x i64> %y
216 define <vscale x 2 x i64> @vwmaccus_vx_nxv2i32(<vscale x 2 x i32> %va, i32 %b, <vscale x 2 x i64> %vc) {
217 ; CHECK-LABEL: vwmaccus_vx_nxv2i32:
219 ; CHECK-NEXT: vsetvli a1, zero, e32, m1, ta, ma
220 ; CHECK-NEXT: vwmaccus.vx v10, a0, v8
221 ; CHECK-NEXT: vmv2r.v v8, v10
223 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
224 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
225 %vd = sext <vscale x 2 x i32> %va to <vscale x 2 x i64>
226 %ve = zext <vscale x 2 x i32> %splat to <vscale x 2 x i64>
228 %x = mul <vscale x 2 x i64> %vd, %ve
229 %y = add <vscale x 2 x i64> %x, %vc
230 ret <vscale x 2 x i64> %y
233 define <vscale x 4 x i64> @vwmacc_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i64> %vc) {
234 ; CHECK-LABEL: vwmacc_vv_nxv4i32:
236 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
237 ; CHECK-NEXT: vwmacc.vv v12, v8, v10
238 ; CHECK-NEXT: vmv4r.v v8, v12
240 %vd = sext <vscale x 4 x i32> %va to <vscale x 4 x i64>
241 %ve = sext <vscale x 4 x i32> %vb to <vscale x 4 x i64>
243 %x = mul <vscale x 4 x i64> %vd, %ve
244 %y = add <vscale x 4 x i64> %x, %vc
245 ret <vscale x 4 x i64> %y
248 define <vscale x 4 x i64> @vwmacc_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i64> %vc) {
249 ; CHECK-LABEL: vwmacc_vx_nxv4i32:
251 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
252 ; CHECK-NEXT: vwmacc.vx v12, a0, v8
253 ; CHECK-NEXT: vmv4r.v v8, v12
255 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
256 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
257 %vd = sext <vscale x 4 x i32> %va to <vscale x 4 x i64>
258 %ve = sext <vscale x 4 x i32> %splat to <vscale x 4 x i64>
260 %x = mul <vscale x 4 x i64> %vd, %ve
261 %y = add <vscale x 4 x i64> %x, %vc
262 ret <vscale x 4 x i64> %y
265 define <vscale x 4 x i64> @vwmaccu_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i64> %vc) {
266 ; CHECK-LABEL: vwmaccu_vv_nxv4i32:
268 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
269 ; CHECK-NEXT: vwmaccu.vv v12, v8, v10
270 ; CHECK-NEXT: vmv4r.v v8, v12
272 %vd = zext <vscale x 4 x i32> %va to <vscale x 4 x i64>
273 %ve = zext <vscale x 4 x i32> %vb to <vscale x 4 x i64>
275 %x = mul <vscale x 4 x i64> %vd, %ve
276 %y = add <vscale x 4 x i64> %x, %vc
277 ret <vscale x 4 x i64> %y
280 define <vscale x 4 x i64> @vwmaccu_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i64> %vc) {
281 ; CHECK-LABEL: vwmaccu_vx_nxv4i32:
283 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
284 ; CHECK-NEXT: vwmaccu.vx v12, a0, v8
285 ; CHECK-NEXT: vmv4r.v v8, v12
287 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
288 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
289 %vd = zext <vscale x 4 x i32> %va to <vscale x 4 x i64>
290 %ve = zext <vscale x 4 x i32> %splat to <vscale x 4 x i64>
292 %x = mul <vscale x 4 x i64> %vd, %ve
293 %y = add <vscale x 4 x i64> %x, %vc
294 ret <vscale x 4 x i64> %y
297 define <vscale x 4 x i64> @vwmaccsu_vv_nxv4i32(<vscale x 4 x i32> %va, <vscale x 4 x i32> %vb, <vscale x 4 x i64> %vc) {
298 ; CHECK-LABEL: vwmaccsu_vv_nxv4i32:
300 ; CHECK-NEXT: vsetvli a0, zero, e32, m2, ta, ma
301 ; CHECK-NEXT: vwmaccsu.vv v12, v10, v8
302 ; CHECK-NEXT: vmv4r.v v8, v12
304 %vd = zext <vscale x 4 x i32> %va to <vscale x 4 x i64>
305 %ve = sext <vscale x 4 x i32> %vb to <vscale x 4 x i64>
307 %x = mul <vscale x 4 x i64> %vd, %ve
308 %y = add <vscale x 4 x i64> %x, %vc
309 ret <vscale x 4 x i64> %y
312 define <vscale x 4 x i64> @vwmaccsu_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i64> %vc) {
313 ; CHECK-LABEL: vwmaccsu_vx_nxv4i32:
315 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
316 ; CHECK-NEXT: vwmaccsu.vx v12, a0, v8
317 ; CHECK-NEXT: vmv4r.v v8, v12
319 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
320 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
321 %vd = zext <vscale x 4 x i32> %va to <vscale x 4 x i64>
322 %ve = sext <vscale x 4 x i32> %splat to <vscale x 4 x i64>
324 %x = mul <vscale x 4 x i64> %vd, %ve
325 %y = add <vscale x 4 x i64> %x, %vc
326 ret <vscale x 4 x i64> %y
329 define <vscale x 4 x i64> @vwmaccus_vx_nxv4i32(<vscale x 4 x i32> %va, i32 %b, <vscale x 4 x i64> %vc) {
330 ; CHECK-LABEL: vwmaccus_vx_nxv4i32:
332 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
333 ; CHECK-NEXT: vwmaccus.vx v12, a0, v8
334 ; CHECK-NEXT: vmv4r.v v8, v12
336 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
337 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
338 %vd = sext <vscale x 4 x i32> %va to <vscale x 4 x i64>
339 %ve = zext <vscale x 4 x i32> %splat to <vscale x 4 x i64>
341 %x = mul <vscale x 4 x i64> %vd, %ve
342 %y = add <vscale x 4 x i64> %x, %vc
343 ret <vscale x 4 x i64> %y
346 define <vscale x 8 x i64> @vwmacc_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i64> %vc) {
347 ; CHECK-LABEL: vwmacc_vv_nxv8i32:
349 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
350 ; CHECK-NEXT: vwmacc.vv v16, v8, v12
351 ; CHECK-NEXT: vmv8r.v v8, v16
353 %vd = sext <vscale x 8 x i32> %va to <vscale x 8 x i64>
354 %ve = sext <vscale x 8 x i32> %vb to <vscale x 8 x i64>
356 %x = mul <vscale x 8 x i64> %vd, %ve
357 %y = add <vscale x 8 x i64> %x, %vc
358 ret <vscale x 8 x i64> %y
361 define <vscale x 8 x i64> @vwmacc_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i64> %vc) {
362 ; CHECK-LABEL: vwmacc_vx_nxv8i32:
364 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
365 ; CHECK-NEXT: vwmacc.vx v16, a0, v8
366 ; CHECK-NEXT: vmv8r.v v8, v16
368 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
369 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
370 %vd = sext <vscale x 8 x i32> %va to <vscale x 8 x i64>
371 %ve = sext <vscale x 8 x i32> %splat to <vscale x 8 x i64>
373 %x = mul <vscale x 8 x i64> %vd, %ve
374 %y = add <vscale x 8 x i64> %x, %vc
375 ret <vscale x 8 x i64> %y
378 define <vscale x 8 x i64> @vwmaccu_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i64> %vc) {
379 ; CHECK-LABEL: vwmaccu_vv_nxv8i32:
381 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
382 ; CHECK-NEXT: vwmaccu.vv v16, v8, v12
383 ; CHECK-NEXT: vmv8r.v v8, v16
385 %vd = zext <vscale x 8 x i32> %va to <vscale x 8 x i64>
386 %ve = zext <vscale x 8 x i32> %vb to <vscale x 8 x i64>
388 %x = mul <vscale x 8 x i64> %vd, %ve
389 %y = add <vscale x 8 x i64> %x, %vc
390 ret <vscale x 8 x i64> %y
393 define <vscale x 8 x i64> @vwmaccu_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i64> %vc) {
394 ; CHECK-LABEL: vwmaccu_vx_nxv8i32:
396 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
397 ; CHECK-NEXT: vwmaccu.vx v16, a0, v8
398 ; CHECK-NEXT: vmv8r.v v8, v16
400 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
401 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
402 %vd = zext <vscale x 8 x i32> %va to <vscale x 8 x i64>
403 %ve = zext <vscale x 8 x i32> %splat to <vscale x 8 x i64>
405 %x = mul <vscale x 8 x i64> %vd, %ve
406 %y = add <vscale x 8 x i64> %x, %vc
407 ret <vscale x 8 x i64> %y
410 define <vscale x 8 x i64> @vwmaccsu_vv_nxv8i32(<vscale x 8 x i32> %va, <vscale x 8 x i32> %vb, <vscale x 8 x i64> %vc) {
411 ; CHECK-LABEL: vwmaccsu_vv_nxv8i32:
413 ; CHECK-NEXT: vsetvli a0, zero, e32, m4, ta, ma
414 ; CHECK-NEXT: vwmaccsu.vv v16, v12, v8
415 ; CHECK-NEXT: vmv8r.v v8, v16
417 %vd = zext <vscale x 8 x i32> %va to <vscale x 8 x i64>
418 %ve = sext <vscale x 8 x i32> %vb to <vscale x 8 x i64>
420 %x = mul <vscale x 8 x i64> %vd, %ve
421 %y = add <vscale x 8 x i64> %x, %vc
422 ret <vscale x 8 x i64> %y
425 define <vscale x 8 x i64> @vwmaccsu_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i64> %vc) {
426 ; CHECK-LABEL: vwmaccsu_vx_nxv8i32:
428 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
429 ; CHECK-NEXT: vwmaccsu.vx v16, a0, v8
430 ; CHECK-NEXT: vmv8r.v v8, v16
432 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
433 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
434 %vd = zext <vscale x 8 x i32> %va to <vscale x 8 x i64>
435 %ve = sext <vscale x 8 x i32> %splat to <vscale x 8 x i64>
437 %x = mul <vscale x 8 x i64> %vd, %ve
438 %y = add <vscale x 8 x i64> %x, %vc
439 ret <vscale x 8 x i64> %y
442 define <vscale x 8 x i64> @vwmaccus_vx_nxv8i32(<vscale x 8 x i32> %va, i32 %b, <vscale x 8 x i64> %vc) {
443 ; CHECK-LABEL: vwmaccus_vx_nxv8i32:
445 ; CHECK-NEXT: vsetvli a1, zero, e32, m4, ta, ma
446 ; CHECK-NEXT: vwmaccus.vx v16, a0, v8
447 ; CHECK-NEXT: vmv8r.v v8, v16
449 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
450 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
451 %vd = sext <vscale x 8 x i32> %va to <vscale x 8 x i64>
452 %ve = zext <vscale x 8 x i32> %splat to <vscale x 8 x i64>
454 %x = mul <vscale x 8 x i64> %vd, %ve
455 %y = add <vscale x 8 x i64> %x, %vc
456 ret <vscale x 8 x i64> %y