1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV32
4 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s \
5 ; RUN: | FileCheck %s --check-prefixes=CHECK,RV64
7 declare <8 x i7> @llvm.vp.mul.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vmul_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vmul_vv_v8i7:
12 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
13 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
15 %v = call <8 x i7> @llvm.vp.mul.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
19 declare <2 x i8> @llvm.vp.mul.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
21 define <2 x i8> @vmul_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
22 ; CHECK-LABEL: vmul_vv_v2i8:
24 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
25 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
27 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
31 define <2 x i8> @vmul_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
32 ; CHECK-LABEL: vmul_vv_v2i8_unmasked:
34 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
35 ; CHECK-NEXT: vmul.vv v8, v8, v9
37 %head = insertelement <2 x i1> poison, i1 true, i32 0
38 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
39 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
43 define <2 x i8> @vmul_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
44 ; CHECK-LABEL: vmul_vx_v2i8:
46 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
47 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
49 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
50 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
51 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
55 define <2 x i8> @vmul_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
56 ; CHECK-LABEL: vmul_vx_v2i8_unmasked:
58 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
59 ; CHECK-NEXT: vmul.vx v8, v8, a0
61 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
62 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
63 %head = insertelement <2 x i1> poison, i1 true, i32 0
64 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
65 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
69 declare <4 x i8> @llvm.vp.mul.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
71 define <4 x i8> @vmul_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
72 ; CHECK-LABEL: vmul_vv_v4i8:
74 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
75 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
77 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
81 define <4 x i8> @vmul_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
82 ; CHECK-LABEL: vmul_vv_v4i8_unmasked:
84 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
85 ; CHECK-NEXT: vmul.vv v8, v8, v9
87 %head = insertelement <4 x i1> poison, i1 true, i32 0
88 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
89 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
93 define <4 x i8> @vmul_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
94 ; CHECK-LABEL: vmul_vx_v4i8:
96 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
97 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
99 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
100 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
101 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
105 define <4 x i8> @vmul_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
106 ; CHECK-LABEL: vmul_vx_v4i8_unmasked:
108 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
109 ; CHECK-NEXT: vmul.vx v8, v8, a0
111 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
112 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
113 %head = insertelement <4 x i1> poison, i1 true, i32 0
114 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
115 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
119 declare <8 x i8> @llvm.vp.mul.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
121 define <8 x i8> @vmul_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
122 ; CHECK-LABEL: vmul_vv_v8i8:
124 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
125 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
127 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
131 define <8 x i8> @vmul_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
132 ; CHECK-LABEL: vmul_vv_v8i8_unmasked:
134 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
135 ; CHECK-NEXT: vmul.vv v8, v8, v9
137 %head = insertelement <8 x i1> poison, i1 true, i32 0
138 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
139 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
143 define <8 x i8> @vmul_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
144 ; CHECK-LABEL: vmul_vx_v8i8:
146 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
147 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
149 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
150 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
151 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
155 define <8 x i8> @vmul_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
156 ; CHECK-LABEL: vmul_vx_v8i8_unmasked:
158 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
159 ; CHECK-NEXT: vmul.vx v8, v8, a0
161 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
162 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
163 %head = insertelement <8 x i1> poison, i1 true, i32 0
164 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
165 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
169 declare <16 x i8> @llvm.vp.mul.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
171 define <16 x i8> @vmul_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
172 ; CHECK-LABEL: vmul_vv_v16i8:
174 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
175 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
177 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
181 define <16 x i8> @vmul_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
182 ; CHECK-LABEL: vmul_vv_v16i8_unmasked:
184 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
185 ; CHECK-NEXT: vmul.vv v8, v8, v9
187 %head = insertelement <16 x i1> poison, i1 true, i32 0
188 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
189 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
193 define <16 x i8> @vmul_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
194 ; CHECK-LABEL: vmul_vx_v16i8:
196 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
197 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
199 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
200 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
201 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
205 define <16 x i8> @vmul_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
206 ; CHECK-LABEL: vmul_vx_v16i8_unmasked:
208 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
209 ; CHECK-NEXT: vmul.vx v8, v8, a0
211 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
212 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
213 %head = insertelement <16 x i1> poison, i1 true, i32 0
214 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
215 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
219 declare <2 x i16> @llvm.vp.mul.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
221 define <2 x i16> @vmul_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
222 ; CHECK-LABEL: vmul_vv_v2i16:
224 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
225 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
227 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
231 define <2 x i16> @vmul_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
232 ; CHECK-LABEL: vmul_vv_v2i16_unmasked:
234 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
235 ; CHECK-NEXT: vmul.vv v8, v8, v9
237 %head = insertelement <2 x i1> poison, i1 true, i32 0
238 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
239 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
243 define <2 x i16> @vmul_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
244 ; CHECK-LABEL: vmul_vx_v2i16:
246 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
247 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
249 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
250 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
251 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
255 define <2 x i16> @vmul_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
256 ; CHECK-LABEL: vmul_vx_v2i16_unmasked:
258 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
259 ; CHECK-NEXT: vmul.vx v8, v8, a0
261 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
262 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
263 %head = insertelement <2 x i1> poison, i1 true, i32 0
264 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
265 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
269 declare <4 x i16> @llvm.vp.mul.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
271 define <4 x i16> @vmul_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
272 ; CHECK-LABEL: vmul_vv_v4i16:
274 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
275 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
277 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
281 define <4 x i16> @vmul_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
282 ; CHECK-LABEL: vmul_vv_v4i16_unmasked:
284 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
285 ; CHECK-NEXT: vmul.vv v8, v8, v9
287 %head = insertelement <4 x i1> poison, i1 true, i32 0
288 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
289 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
293 define <4 x i16> @vmul_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
294 ; CHECK-LABEL: vmul_vx_v4i16:
296 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
297 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
299 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
300 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
301 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
305 define <4 x i16> @vmul_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
306 ; CHECK-LABEL: vmul_vx_v4i16_unmasked:
308 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
309 ; CHECK-NEXT: vmul.vx v8, v8, a0
311 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
312 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
313 %head = insertelement <4 x i1> poison, i1 true, i32 0
314 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
315 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
319 declare <8 x i16> @llvm.vp.mul.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
321 define <8 x i16> @vmul_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
322 ; CHECK-LABEL: vmul_vv_v8i16:
324 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
325 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
327 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
331 define <8 x i16> @vmul_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
332 ; CHECK-LABEL: vmul_vv_v8i16_unmasked:
334 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
335 ; CHECK-NEXT: vmul.vv v8, v8, v9
337 %head = insertelement <8 x i1> poison, i1 true, i32 0
338 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
339 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
343 define <8 x i16> @vmul_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
344 ; CHECK-LABEL: vmul_vx_v8i16:
346 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
347 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
349 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
350 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
351 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
355 define <8 x i16> @vmul_vx_v8i16_commute(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
356 ; CHECK-LABEL: vmul_vx_v8i16_commute:
358 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
359 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
361 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
362 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
363 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %vb, <8 x i16> %va, <8 x i1> %m, i32 %evl)
367 define <8 x i16> @vmul_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
368 ; CHECK-LABEL: vmul_vx_v8i16_unmasked:
370 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
371 ; CHECK-NEXT: vmul.vx v8, v8, a0
373 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
374 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
375 %head = insertelement <8 x i1> poison, i1 true, i32 0
376 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
377 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
381 declare <12 x i16> @llvm.vp.mul.v12i16(<12 x i16>, <12 x i16>, <12 x i1>, i32)
383 define <12 x i16> @vmul_vv_v12i16(<12 x i16> %va, <12 x i16> %b, <12 x i1> %m, i32 zeroext %evl) {
384 ; CHECK-LABEL: vmul_vv_v12i16:
386 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
387 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
389 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %b, <12 x i1> %m, i32 %evl)
393 define <12 x i16> @vmul_vv_v12i16_unmasked(<12 x i16> %va, <12 x i16> %b, i32 zeroext %evl) {
394 ; CHECK-LABEL: vmul_vv_v12i16_unmasked:
396 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
397 ; CHECK-NEXT: vmul.vv v8, v8, v10
399 %head = insertelement <12 x i1> poison, i1 true, i32 0
400 %m = shufflevector <12 x i1> %head, <12 x i1> poison, <12 x i32> zeroinitializer
401 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %b, <12 x i1> %m, i32 %evl)
405 define <12 x i16> @vmul_vx_v12i16(<12 x i16> %va, i16 %b, <12 x i1> %m, i32 zeroext %evl) {
406 ; CHECK-LABEL: vmul_vx_v12i16:
408 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
409 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
411 %elt.head = insertelement <12 x i16> poison, i16 %b, i32 0
412 %vb = shufflevector <12 x i16> %elt.head, <12 x i16> poison, <12 x i32> zeroinitializer
413 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %vb, <12 x i1> %m, i32 %evl)
417 define <12 x i16> @vmul_vx_v12i16_unmasked(<12 x i16> %va, i16 %b, i32 zeroext %evl) {
418 ; CHECK-LABEL: vmul_vx_v12i16_unmasked:
420 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
421 ; CHECK-NEXT: vmul.vx v8, v8, a0
423 %elt.head = insertelement <12 x i16> poison, i16 %b, i32 0
424 %vb = shufflevector <12 x i16> %elt.head, <12 x i16> poison, <12 x i32> zeroinitializer
425 %head = insertelement <12 x i1> poison, i1 true, i32 0
426 %m = shufflevector <12 x i1> %head, <12 x i1> poison, <12 x i32> zeroinitializer
427 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %vb, <12 x i1> %m, i32 %evl)
431 declare <16 x i16> @llvm.vp.mul.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
433 define <16 x i16> @vmul_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
434 ; CHECK-LABEL: vmul_vv_v16i16:
436 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
437 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
439 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
443 define <16 x i16> @vmul_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
444 ; CHECK-LABEL: vmul_vv_v16i16_unmasked:
446 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
447 ; CHECK-NEXT: vmul.vv v8, v8, v10
449 %head = insertelement <16 x i1> poison, i1 true, i32 0
450 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
451 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
455 define <16 x i16> @vmul_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
456 ; CHECK-LABEL: vmul_vx_v16i16:
458 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
459 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
461 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
462 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
463 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
467 define <16 x i16> @vmul_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
468 ; CHECK-LABEL: vmul_vx_v16i16_unmasked:
470 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
471 ; CHECK-NEXT: vmul.vx v8, v8, a0
473 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
474 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
475 %head = insertelement <16 x i1> poison, i1 true, i32 0
476 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
477 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
481 declare <2 x i32> @llvm.vp.mul.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
483 define <2 x i32> @vmul_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
484 ; CHECK-LABEL: vmul_vv_v2i32:
486 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
487 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
489 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
493 define <2 x i32> @vmul_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
494 ; CHECK-LABEL: vmul_vv_v2i32_unmasked:
496 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
497 ; CHECK-NEXT: vmul.vv v8, v8, v9
499 %head = insertelement <2 x i1> poison, i1 true, i32 0
500 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
501 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
505 define <2 x i32> @vmul_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
506 ; CHECK-LABEL: vmul_vx_v2i32:
508 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
509 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
511 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
512 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
513 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
517 define <2 x i32> @vmul_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
518 ; CHECK-LABEL: vmul_vx_v2i32_unmasked:
520 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
521 ; CHECK-NEXT: vmul.vx v8, v8, a0
523 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
524 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
525 %head = insertelement <2 x i1> poison, i1 true, i32 0
526 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
527 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
531 declare <4 x i32> @llvm.vp.mul.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
533 define <4 x i32> @vmul_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
534 ; CHECK-LABEL: vmul_vv_v4i32:
536 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
537 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
539 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
543 define <4 x i32> @vmul_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
544 ; CHECK-LABEL: vmul_vv_v4i32_unmasked:
546 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
547 ; CHECK-NEXT: vmul.vv v8, v8, v9
549 %head = insertelement <4 x i1> poison, i1 true, i32 0
550 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
551 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
555 define <4 x i32> @vmul_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
556 ; CHECK-LABEL: vmul_vx_v4i32:
558 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
559 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
561 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
562 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
563 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
567 define <4 x i32> @vmul_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
568 ; CHECK-LABEL: vmul_vx_v4i32_unmasked:
570 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
571 ; CHECK-NEXT: vmul.vx v8, v8, a0
573 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
574 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
575 %head = insertelement <4 x i1> poison, i1 true, i32 0
576 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
577 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
581 declare <8 x i32> @llvm.vp.mul.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
583 define <8 x i32> @vmul_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
584 ; CHECK-LABEL: vmul_vv_v8i32:
586 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
587 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
589 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
593 define <8 x i32> @vmul_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
594 ; CHECK-LABEL: vmul_vv_v8i32_unmasked:
596 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
597 ; CHECK-NEXT: vmul.vv v8, v8, v10
599 %head = insertelement <8 x i1> poison, i1 true, i32 0
600 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
601 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
605 define <8 x i32> @vmul_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
606 ; CHECK-LABEL: vmul_vx_v8i32:
608 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
609 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
611 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
612 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
613 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
617 define <8 x i32> @vmul_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
618 ; CHECK-LABEL: vmul_vx_v8i32_unmasked:
620 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
621 ; CHECK-NEXT: vmul.vx v8, v8, a0
623 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
624 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
625 %head = insertelement <8 x i1> poison, i1 true, i32 0
626 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
627 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
631 declare <16 x i32> @llvm.vp.mul.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
633 define <16 x i32> @vmul_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
634 ; CHECK-LABEL: vmul_vv_v16i32:
636 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
637 ; CHECK-NEXT: vmul.vv v8, v8, v12, v0.t
639 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
643 define <16 x i32> @vmul_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
644 ; CHECK-LABEL: vmul_vv_v16i32_unmasked:
646 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
647 ; CHECK-NEXT: vmul.vv v8, v8, v12
649 %head = insertelement <16 x i1> poison, i1 true, i32 0
650 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
651 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
655 define <16 x i32> @vmul_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
656 ; CHECK-LABEL: vmul_vx_v16i32:
658 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
659 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
661 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
662 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
663 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
667 define <16 x i32> @vmul_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
668 ; CHECK-LABEL: vmul_vx_v16i32_unmasked:
670 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
671 ; CHECK-NEXT: vmul.vx v8, v8, a0
673 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
674 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
675 %head = insertelement <16 x i1> poison, i1 true, i32 0
676 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
677 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
681 declare <2 x i64> @llvm.vp.mul.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
683 define <2 x i64> @vmul_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
684 ; CHECK-LABEL: vmul_vv_v2i64:
686 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
687 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
689 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
693 define <2 x i64> @vmul_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
694 ; CHECK-LABEL: vmul_vv_v2i64_unmasked:
696 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
697 ; CHECK-NEXT: vmul.vv v8, v8, v9
699 %head = insertelement <2 x i1> poison, i1 true, i32 0
700 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
701 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
705 define <2 x i64> @vmul_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
706 ; RV32-LABEL: vmul_vx_v2i64:
708 ; RV32-NEXT: addi sp, sp, -16
709 ; RV32-NEXT: .cfi_def_cfa_offset 16
710 ; RV32-NEXT: sw a1, 12(sp)
711 ; RV32-NEXT: sw a0, 8(sp)
712 ; RV32-NEXT: addi a0, sp, 8
713 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
714 ; RV32-NEXT: vlse64.v v9, (a0), zero
715 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
716 ; RV32-NEXT: vmul.vv v8, v8, v9, v0.t
717 ; RV32-NEXT: addi sp, sp, 16
720 ; RV64-LABEL: vmul_vx_v2i64:
722 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
723 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
725 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
726 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
727 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
731 define <2 x i64> @vmul_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
732 ; RV32-LABEL: vmul_vx_v2i64_unmasked:
734 ; RV32-NEXT: addi sp, sp, -16
735 ; RV32-NEXT: .cfi_def_cfa_offset 16
736 ; RV32-NEXT: sw a1, 12(sp)
737 ; RV32-NEXT: sw a0, 8(sp)
738 ; RV32-NEXT: addi a0, sp, 8
739 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
740 ; RV32-NEXT: vlse64.v v9, (a0), zero
741 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
742 ; RV32-NEXT: vmul.vv v8, v8, v9
743 ; RV32-NEXT: addi sp, sp, 16
746 ; RV64-LABEL: vmul_vx_v2i64_unmasked:
748 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
749 ; RV64-NEXT: vmul.vx v8, v8, a0
751 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
752 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
753 %head = insertelement <2 x i1> poison, i1 true, i32 0
754 %m = shufflevector <2 x i1> %head, <2 x i1> poison, <2 x i32> zeroinitializer
755 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
759 declare <4 x i64> @llvm.vp.mul.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
761 define <4 x i64> @vmul_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
762 ; CHECK-LABEL: vmul_vv_v4i64:
764 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
765 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
767 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
771 define <4 x i64> @vmul_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
772 ; CHECK-LABEL: vmul_vv_v4i64_unmasked:
774 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
775 ; CHECK-NEXT: vmul.vv v8, v8, v10
777 %head = insertelement <4 x i1> poison, i1 true, i32 0
778 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
779 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
783 define <4 x i64> @vmul_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
784 ; RV32-LABEL: vmul_vx_v4i64:
786 ; RV32-NEXT: addi sp, sp, -16
787 ; RV32-NEXT: .cfi_def_cfa_offset 16
788 ; RV32-NEXT: sw a1, 12(sp)
789 ; RV32-NEXT: sw a0, 8(sp)
790 ; RV32-NEXT: addi a0, sp, 8
791 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
792 ; RV32-NEXT: vlse64.v v10, (a0), zero
793 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
794 ; RV32-NEXT: vmul.vv v8, v8, v10, v0.t
795 ; RV32-NEXT: addi sp, sp, 16
798 ; RV64-LABEL: vmul_vx_v4i64:
800 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
801 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
803 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
804 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
805 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
809 define <4 x i64> @vmul_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
810 ; RV32-LABEL: vmul_vx_v4i64_unmasked:
812 ; RV32-NEXT: addi sp, sp, -16
813 ; RV32-NEXT: .cfi_def_cfa_offset 16
814 ; RV32-NEXT: sw a1, 12(sp)
815 ; RV32-NEXT: sw a0, 8(sp)
816 ; RV32-NEXT: addi a0, sp, 8
817 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
818 ; RV32-NEXT: vlse64.v v10, (a0), zero
819 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
820 ; RV32-NEXT: vmul.vv v8, v8, v10
821 ; RV32-NEXT: addi sp, sp, 16
824 ; RV64-LABEL: vmul_vx_v4i64_unmasked:
826 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
827 ; RV64-NEXT: vmul.vx v8, v8, a0
829 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
830 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
831 %head = insertelement <4 x i1> poison, i1 true, i32 0
832 %m = shufflevector <4 x i1> %head, <4 x i1> poison, <4 x i32> zeroinitializer
833 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
837 declare <8 x i64> @llvm.vp.mul.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
839 define <8 x i64> @vmul_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
840 ; CHECK-LABEL: vmul_vv_v8i64:
842 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
843 ; CHECK-NEXT: vmul.vv v8, v8, v12, v0.t
845 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
849 define <8 x i64> @vmul_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
850 ; CHECK-LABEL: vmul_vv_v8i64_unmasked:
852 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
853 ; CHECK-NEXT: vmul.vv v8, v8, v12
855 %head = insertelement <8 x i1> poison, i1 true, i32 0
856 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
857 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
861 define <8 x i64> @vmul_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
862 ; RV32-LABEL: vmul_vx_v8i64:
864 ; RV32-NEXT: addi sp, sp, -16
865 ; RV32-NEXT: .cfi_def_cfa_offset 16
866 ; RV32-NEXT: sw a1, 12(sp)
867 ; RV32-NEXT: sw a0, 8(sp)
868 ; RV32-NEXT: addi a0, sp, 8
869 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
870 ; RV32-NEXT: vlse64.v v12, (a0), zero
871 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
872 ; RV32-NEXT: vmul.vv v8, v8, v12, v0.t
873 ; RV32-NEXT: addi sp, sp, 16
876 ; RV64-LABEL: vmul_vx_v8i64:
878 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
879 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
881 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
882 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
883 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
887 define <8 x i64> @vmul_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
888 ; RV32-LABEL: vmul_vx_v8i64_unmasked:
890 ; RV32-NEXT: addi sp, sp, -16
891 ; RV32-NEXT: .cfi_def_cfa_offset 16
892 ; RV32-NEXT: sw a1, 12(sp)
893 ; RV32-NEXT: sw a0, 8(sp)
894 ; RV32-NEXT: addi a0, sp, 8
895 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
896 ; RV32-NEXT: vlse64.v v12, (a0), zero
897 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
898 ; RV32-NEXT: vmul.vv v8, v8, v12
899 ; RV32-NEXT: addi sp, sp, 16
902 ; RV64-LABEL: vmul_vx_v8i64_unmasked:
904 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
905 ; RV64-NEXT: vmul.vx v8, v8, a0
907 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
908 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
909 %head = insertelement <8 x i1> poison, i1 true, i32 0
910 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
911 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
915 declare <16 x i64> @llvm.vp.mul.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
917 define <16 x i64> @vmul_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
918 ; CHECK-LABEL: vmul_vv_v16i64:
920 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
921 ; CHECK-NEXT: vmul.vv v8, v8, v16, v0.t
923 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
927 define <16 x i64> @vmul_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
928 ; CHECK-LABEL: vmul_vv_v16i64_unmasked:
930 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
931 ; CHECK-NEXT: vmul.vv v8, v8, v16
933 %head = insertelement <16 x i1> poison, i1 true, i32 0
934 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
935 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
939 define <16 x i64> @vmul_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
940 ; RV32-LABEL: vmul_vx_v16i64:
942 ; RV32-NEXT: addi sp, sp, -16
943 ; RV32-NEXT: .cfi_def_cfa_offset 16
944 ; RV32-NEXT: sw a1, 12(sp)
945 ; RV32-NEXT: sw a0, 8(sp)
946 ; RV32-NEXT: addi a0, sp, 8
947 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
948 ; RV32-NEXT: vlse64.v v16, (a0), zero
949 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
950 ; RV32-NEXT: vmul.vv v8, v8, v16, v0.t
951 ; RV32-NEXT: addi sp, sp, 16
954 ; RV64-LABEL: vmul_vx_v16i64:
956 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
957 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
959 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
960 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
961 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
965 define <16 x i64> @vmul_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
966 ; RV32-LABEL: vmul_vx_v16i64_unmasked:
968 ; RV32-NEXT: addi sp, sp, -16
969 ; RV32-NEXT: .cfi_def_cfa_offset 16
970 ; RV32-NEXT: sw a1, 12(sp)
971 ; RV32-NEXT: sw a0, 8(sp)
972 ; RV32-NEXT: addi a0, sp, 8
973 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
974 ; RV32-NEXT: vlse64.v v16, (a0), zero
975 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
976 ; RV32-NEXT: vmul.vv v8, v8, v16
977 ; RV32-NEXT: addi sp, sp, 16
980 ; RV64-LABEL: vmul_vx_v16i64_unmasked:
982 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
983 ; RV64-NEXT: vmul.vx v8, v8, a0
985 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
986 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
987 %head = insertelement <16 x i1> poison, i1 true, i32 0
988 %m = shufflevector <16 x i1> %head, <16 x i1> poison, <16 x i32> zeroinitializer
989 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)