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 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> splat (i1 true), i32 %evl)
41 define <2 x i8> @vmul_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
42 ; CHECK-LABEL: vmul_vx_v2i8:
44 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
45 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
47 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
48 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
49 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
53 define <2 x i8> @vmul_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
54 ; CHECK-LABEL: vmul_vx_v2i8_unmasked:
56 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
57 ; CHECK-NEXT: vmul.vx v8, v8, a0
59 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
60 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
61 %v = call <2 x i8> @llvm.vp.mul.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> splat (i1 true), i32 %evl)
65 declare <4 x i8> @llvm.vp.mul.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
67 define <4 x i8> @vmul_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
68 ; CHECK-LABEL: vmul_vv_v4i8:
70 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
71 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
73 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
77 define <4 x i8> @vmul_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
78 ; CHECK-LABEL: vmul_vv_v4i8_unmasked:
80 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
81 ; CHECK-NEXT: vmul.vv v8, v8, v9
83 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> splat (i1 true), i32 %evl)
87 define <4 x i8> @vmul_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
88 ; CHECK-LABEL: vmul_vx_v4i8:
90 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
91 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
93 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
94 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
95 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
99 define <4 x i8> @vmul_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
100 ; CHECK-LABEL: vmul_vx_v4i8_unmasked:
102 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
103 ; CHECK-NEXT: vmul.vx v8, v8, a0
105 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
106 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
107 %v = call <4 x i8> @llvm.vp.mul.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> splat (i1 true), i32 %evl)
111 declare <8 x i8> @llvm.vp.mul.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
113 define <8 x i8> @vmul_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
114 ; CHECK-LABEL: vmul_vv_v8i8:
116 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
117 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
119 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
123 define <8 x i8> @vmul_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
124 ; CHECK-LABEL: vmul_vv_v8i8_unmasked:
126 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
127 ; CHECK-NEXT: vmul.vv v8, v8, v9
129 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> splat (i1 true), i32 %evl)
133 define <8 x i8> @vmul_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
134 ; CHECK-LABEL: vmul_vx_v8i8:
136 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
137 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
139 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
140 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
141 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
145 define <8 x i8> @vmul_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
146 ; CHECK-LABEL: vmul_vx_v8i8_unmasked:
148 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
149 ; CHECK-NEXT: vmul.vx v8, v8, a0
151 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
152 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
153 %v = call <8 x i8> @llvm.vp.mul.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> splat (i1 true), i32 %evl)
157 declare <16 x i8> @llvm.vp.mul.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
159 define <16 x i8> @vmul_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
160 ; CHECK-LABEL: vmul_vv_v16i8:
162 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
163 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
165 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
169 define <16 x i8> @vmul_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
170 ; CHECK-LABEL: vmul_vv_v16i8_unmasked:
172 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
173 ; CHECK-NEXT: vmul.vv v8, v8, v9
175 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> splat (i1 true), i32 %evl)
179 define <16 x i8> @vmul_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
180 ; CHECK-LABEL: vmul_vx_v16i8:
182 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
183 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
185 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
186 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
187 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
191 define <16 x i8> @vmul_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
192 ; CHECK-LABEL: vmul_vx_v16i8_unmasked:
194 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
195 ; CHECK-NEXT: vmul.vx v8, v8, a0
197 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
198 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
199 %v = call <16 x i8> @llvm.vp.mul.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> splat (i1 true), i32 %evl)
203 declare <2 x i16> @llvm.vp.mul.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
205 define <2 x i16> @vmul_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
206 ; CHECK-LABEL: vmul_vv_v2i16:
208 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
209 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
211 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
215 define <2 x i16> @vmul_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
216 ; CHECK-LABEL: vmul_vv_v2i16_unmasked:
218 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
219 ; CHECK-NEXT: vmul.vv v8, v8, v9
221 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> splat (i1 true), i32 %evl)
225 define <2 x i16> @vmul_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
226 ; CHECK-LABEL: vmul_vx_v2i16:
228 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
229 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
231 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
232 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
233 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
237 define <2 x i16> @vmul_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
238 ; CHECK-LABEL: vmul_vx_v2i16_unmasked:
240 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
241 ; CHECK-NEXT: vmul.vx v8, v8, a0
243 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
244 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
245 %v = call <2 x i16> @llvm.vp.mul.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> splat (i1 true), i32 %evl)
249 declare <4 x i16> @llvm.vp.mul.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
251 define <4 x i16> @vmul_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
252 ; CHECK-LABEL: vmul_vv_v4i16:
254 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
255 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
257 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
261 define <4 x i16> @vmul_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
262 ; CHECK-LABEL: vmul_vv_v4i16_unmasked:
264 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
265 ; CHECK-NEXT: vmul.vv v8, v8, v9
267 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> splat (i1 true), i32 %evl)
271 define <4 x i16> @vmul_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
272 ; CHECK-LABEL: vmul_vx_v4i16:
274 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
275 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
277 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
278 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
279 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
283 define <4 x i16> @vmul_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
284 ; CHECK-LABEL: vmul_vx_v4i16_unmasked:
286 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
287 ; CHECK-NEXT: vmul.vx v8, v8, a0
289 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
290 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
291 %v = call <4 x i16> @llvm.vp.mul.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> splat (i1 true), i32 %evl)
295 declare <8 x i16> @llvm.vp.mul.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
297 define <8 x i16> @vmul_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
298 ; CHECK-LABEL: vmul_vv_v8i16:
300 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
301 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
303 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
307 define <8 x i16> @vmul_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
308 ; CHECK-LABEL: vmul_vv_v8i16_unmasked:
310 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
311 ; CHECK-NEXT: vmul.vv v8, v8, v9
313 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> splat (i1 true), i32 %evl)
317 define <8 x i16> @vmul_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
318 ; CHECK-LABEL: vmul_vx_v8i16:
320 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
321 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
323 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
324 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
325 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
329 define <8 x i16> @vmul_vx_v8i16_commute(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
330 ; CHECK-LABEL: vmul_vx_v8i16_commute:
332 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
333 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
335 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
336 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
337 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %vb, <8 x i16> %va, <8 x i1> %m, i32 %evl)
341 define <8 x i16> @vmul_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
342 ; CHECK-LABEL: vmul_vx_v8i16_unmasked:
344 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
345 ; CHECK-NEXT: vmul.vx v8, v8, a0
347 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
348 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
349 %v = call <8 x i16> @llvm.vp.mul.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> splat (i1 true), i32 %evl)
353 declare <12 x i16> @llvm.vp.mul.v12i16(<12 x i16>, <12 x i16>, <12 x i1>, i32)
355 define <12 x i16> @vmul_vv_v12i16(<12 x i16> %va, <12 x i16> %b, <12 x i1> %m, i32 zeroext %evl) {
356 ; CHECK-LABEL: vmul_vv_v12i16:
358 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
359 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
361 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %b, <12 x i1> %m, i32 %evl)
365 define <12 x i16> @vmul_vv_v12i16_unmasked(<12 x i16> %va, <12 x i16> %b, i32 zeroext %evl) {
366 ; CHECK-LABEL: vmul_vv_v12i16_unmasked:
368 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
369 ; CHECK-NEXT: vmul.vv v8, v8, v10
371 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %b, <12 x i1> splat (i1 true), i32 %evl)
375 define <12 x i16> @vmul_vx_v12i16(<12 x i16> %va, i16 %b, <12 x i1> %m, i32 zeroext %evl) {
376 ; CHECK-LABEL: vmul_vx_v12i16:
378 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
379 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
381 %elt.head = insertelement <12 x i16> poison, i16 %b, i32 0
382 %vb = shufflevector <12 x i16> %elt.head, <12 x i16> poison, <12 x i32> zeroinitializer
383 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %vb, <12 x i1> %m, i32 %evl)
387 define <12 x i16> @vmul_vx_v12i16_unmasked(<12 x i16> %va, i16 %b, i32 zeroext %evl) {
388 ; CHECK-LABEL: vmul_vx_v12i16_unmasked:
390 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
391 ; CHECK-NEXT: vmul.vx v8, v8, a0
393 %elt.head = insertelement <12 x i16> poison, i16 %b, i32 0
394 %vb = shufflevector <12 x i16> %elt.head, <12 x i16> poison, <12 x i32> zeroinitializer
395 %v = call <12 x i16> @llvm.vp.mul.v12i16(<12 x i16> %va, <12 x i16> %vb, <12 x i1> splat (i1 true), i32 %evl)
399 declare <16 x i16> @llvm.vp.mul.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
401 define <16 x i16> @vmul_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
402 ; CHECK-LABEL: vmul_vv_v16i16:
404 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
405 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
407 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
411 define <16 x i16> @vmul_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
412 ; CHECK-LABEL: vmul_vv_v16i16_unmasked:
414 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
415 ; CHECK-NEXT: vmul.vv v8, v8, v10
417 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> splat (i1 true), i32 %evl)
421 define <16 x i16> @vmul_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
422 ; CHECK-LABEL: vmul_vx_v16i16:
424 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
425 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
427 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
428 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
429 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
433 define <16 x i16> @vmul_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
434 ; CHECK-LABEL: vmul_vx_v16i16_unmasked:
436 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
437 ; CHECK-NEXT: vmul.vx v8, v8, a0
439 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
440 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
441 %v = call <16 x i16> @llvm.vp.mul.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> splat (i1 true), i32 %evl)
445 declare <2 x i32> @llvm.vp.mul.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
447 define <2 x i32> @vmul_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
448 ; CHECK-LABEL: vmul_vv_v2i32:
450 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
451 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
453 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
457 define <2 x i32> @vmul_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
458 ; CHECK-LABEL: vmul_vv_v2i32_unmasked:
460 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
461 ; CHECK-NEXT: vmul.vv v8, v8, v9
463 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> splat (i1 true), i32 %evl)
467 define <2 x i32> @vmul_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
468 ; CHECK-LABEL: vmul_vx_v2i32:
470 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
471 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
473 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
474 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
475 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
479 define <2 x i32> @vmul_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
480 ; CHECK-LABEL: vmul_vx_v2i32_unmasked:
482 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
483 ; CHECK-NEXT: vmul.vx v8, v8, a0
485 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
486 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
487 %v = call <2 x i32> @llvm.vp.mul.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> splat (i1 true), i32 %evl)
491 declare <4 x i32> @llvm.vp.mul.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
493 define <4 x i32> @vmul_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
494 ; CHECK-LABEL: vmul_vv_v4i32:
496 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
497 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
499 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
503 define <4 x i32> @vmul_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
504 ; CHECK-LABEL: vmul_vv_v4i32_unmasked:
506 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
507 ; CHECK-NEXT: vmul.vv v8, v8, v9
509 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> splat (i1 true), i32 %evl)
513 define <4 x i32> @vmul_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
514 ; CHECK-LABEL: vmul_vx_v4i32:
516 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
517 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
519 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
520 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
521 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
525 define <4 x i32> @vmul_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
526 ; CHECK-LABEL: vmul_vx_v4i32_unmasked:
528 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
529 ; CHECK-NEXT: vmul.vx v8, v8, a0
531 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
532 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
533 %v = call <4 x i32> @llvm.vp.mul.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> splat (i1 true), i32 %evl)
537 declare <8 x i32> @llvm.vp.mul.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
539 define <8 x i32> @vmul_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
540 ; CHECK-LABEL: vmul_vv_v8i32:
542 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
543 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
545 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
549 define <8 x i32> @vmul_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
550 ; CHECK-LABEL: vmul_vv_v8i32_unmasked:
552 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
553 ; CHECK-NEXT: vmul.vv v8, v8, v10
555 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> splat (i1 true), i32 %evl)
559 define <8 x i32> @vmul_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
560 ; CHECK-LABEL: vmul_vx_v8i32:
562 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
563 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
565 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
566 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
567 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
571 define <8 x i32> @vmul_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
572 ; CHECK-LABEL: vmul_vx_v8i32_unmasked:
574 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
575 ; CHECK-NEXT: vmul.vx v8, v8, a0
577 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
578 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
579 %v = call <8 x i32> @llvm.vp.mul.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> splat (i1 true), i32 %evl)
583 declare <16 x i32> @llvm.vp.mul.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
585 define <16 x i32> @vmul_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
586 ; CHECK-LABEL: vmul_vv_v16i32:
588 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
589 ; CHECK-NEXT: vmul.vv v8, v8, v12, v0.t
591 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
595 define <16 x i32> @vmul_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
596 ; CHECK-LABEL: vmul_vv_v16i32_unmasked:
598 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
599 ; CHECK-NEXT: vmul.vv v8, v8, v12
601 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> splat (i1 true), i32 %evl)
605 define <16 x i32> @vmul_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
606 ; CHECK-LABEL: vmul_vx_v16i32:
608 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
609 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
611 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
612 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
613 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
617 define <16 x i32> @vmul_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
618 ; CHECK-LABEL: vmul_vx_v16i32_unmasked:
620 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
621 ; CHECK-NEXT: vmul.vx v8, v8, a0
623 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
624 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
625 %v = call <16 x i32> @llvm.vp.mul.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> splat (i1 true), i32 %evl)
629 declare <2 x i64> @llvm.vp.mul.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
631 define <2 x i64> @vmul_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
632 ; CHECK-LABEL: vmul_vv_v2i64:
634 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
635 ; CHECK-NEXT: vmul.vv v8, v8, v9, v0.t
637 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
641 define <2 x i64> @vmul_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
642 ; CHECK-LABEL: vmul_vv_v2i64_unmasked:
644 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
645 ; CHECK-NEXT: vmul.vv v8, v8, v9
647 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> splat (i1 true), i32 %evl)
651 define <2 x i64> @vmul_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
652 ; RV32-LABEL: vmul_vx_v2i64:
654 ; RV32-NEXT: addi sp, sp, -16
655 ; RV32-NEXT: .cfi_def_cfa_offset 16
656 ; RV32-NEXT: sw a0, 8(sp)
657 ; RV32-NEXT: sw a1, 12(sp)
658 ; RV32-NEXT: addi a0, sp, 8
659 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
660 ; RV32-NEXT: vlse64.v v9, (a0), zero
661 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
662 ; RV32-NEXT: vmul.vv v8, v8, v9, v0.t
663 ; RV32-NEXT: addi sp, sp, 16
664 ; RV32-NEXT: .cfi_def_cfa_offset 0
667 ; RV64-LABEL: vmul_vx_v2i64:
669 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
670 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
672 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
673 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
674 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
678 define <2 x i64> @vmul_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
679 ; RV32-LABEL: vmul_vx_v2i64_unmasked:
681 ; RV32-NEXT: addi sp, sp, -16
682 ; RV32-NEXT: .cfi_def_cfa_offset 16
683 ; RV32-NEXT: sw a0, 8(sp)
684 ; RV32-NEXT: sw a1, 12(sp)
685 ; RV32-NEXT: addi a0, sp, 8
686 ; RV32-NEXT: vsetivli zero, 2, e64, m1, ta, ma
687 ; RV32-NEXT: vlse64.v v9, (a0), zero
688 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
689 ; RV32-NEXT: vmul.vv v8, v8, v9
690 ; RV32-NEXT: addi sp, sp, 16
691 ; RV32-NEXT: .cfi_def_cfa_offset 0
694 ; RV64-LABEL: vmul_vx_v2i64_unmasked:
696 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
697 ; RV64-NEXT: vmul.vx v8, v8, a0
699 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
700 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
701 %v = call <2 x i64> @llvm.vp.mul.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> splat (i1 true), i32 %evl)
705 declare <4 x i64> @llvm.vp.mul.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
707 define <4 x i64> @vmul_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
708 ; CHECK-LABEL: vmul_vv_v4i64:
710 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
711 ; CHECK-NEXT: vmul.vv v8, v8, v10, v0.t
713 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
717 define <4 x i64> @vmul_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
718 ; CHECK-LABEL: vmul_vv_v4i64_unmasked:
720 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
721 ; CHECK-NEXT: vmul.vv v8, v8, v10
723 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> splat (i1 true), i32 %evl)
727 define <4 x i64> @vmul_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
728 ; RV32-LABEL: vmul_vx_v4i64:
730 ; RV32-NEXT: addi sp, sp, -16
731 ; RV32-NEXT: .cfi_def_cfa_offset 16
732 ; RV32-NEXT: sw a0, 8(sp)
733 ; RV32-NEXT: sw a1, 12(sp)
734 ; RV32-NEXT: addi a0, sp, 8
735 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
736 ; RV32-NEXT: vlse64.v v10, (a0), zero
737 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
738 ; RV32-NEXT: vmul.vv v8, v8, v10, v0.t
739 ; RV32-NEXT: addi sp, sp, 16
740 ; RV32-NEXT: .cfi_def_cfa_offset 0
743 ; RV64-LABEL: vmul_vx_v4i64:
745 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
746 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
748 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
749 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
750 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
754 define <4 x i64> @vmul_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
755 ; RV32-LABEL: vmul_vx_v4i64_unmasked:
757 ; RV32-NEXT: addi sp, sp, -16
758 ; RV32-NEXT: .cfi_def_cfa_offset 16
759 ; RV32-NEXT: sw a0, 8(sp)
760 ; RV32-NEXT: sw a1, 12(sp)
761 ; RV32-NEXT: addi a0, sp, 8
762 ; RV32-NEXT: vsetivli zero, 4, e64, m2, ta, ma
763 ; RV32-NEXT: vlse64.v v10, (a0), zero
764 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
765 ; RV32-NEXT: vmul.vv v8, v8, v10
766 ; RV32-NEXT: addi sp, sp, 16
767 ; RV32-NEXT: .cfi_def_cfa_offset 0
770 ; RV64-LABEL: vmul_vx_v4i64_unmasked:
772 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
773 ; RV64-NEXT: vmul.vx v8, v8, a0
775 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
776 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
777 %v = call <4 x i64> @llvm.vp.mul.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> splat (i1 true), i32 %evl)
781 declare <8 x i64> @llvm.vp.mul.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
783 define <8 x i64> @vmul_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
784 ; CHECK-LABEL: vmul_vv_v8i64:
786 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
787 ; CHECK-NEXT: vmul.vv v8, v8, v12, v0.t
789 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
793 define <8 x i64> @vmul_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
794 ; CHECK-LABEL: vmul_vv_v8i64_unmasked:
796 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
797 ; CHECK-NEXT: vmul.vv v8, v8, v12
799 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> splat (i1 true), i32 %evl)
803 define <8 x i64> @vmul_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
804 ; RV32-LABEL: vmul_vx_v8i64:
806 ; RV32-NEXT: addi sp, sp, -16
807 ; RV32-NEXT: .cfi_def_cfa_offset 16
808 ; RV32-NEXT: sw a0, 8(sp)
809 ; RV32-NEXT: sw a1, 12(sp)
810 ; RV32-NEXT: addi a0, sp, 8
811 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
812 ; RV32-NEXT: vlse64.v v12, (a0), zero
813 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
814 ; RV32-NEXT: vmul.vv v8, v8, v12, v0.t
815 ; RV32-NEXT: addi sp, sp, 16
816 ; RV32-NEXT: .cfi_def_cfa_offset 0
819 ; RV64-LABEL: vmul_vx_v8i64:
821 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
822 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
824 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
825 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
826 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
830 define <8 x i64> @vmul_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
831 ; RV32-LABEL: vmul_vx_v8i64_unmasked:
833 ; RV32-NEXT: addi sp, sp, -16
834 ; RV32-NEXT: .cfi_def_cfa_offset 16
835 ; RV32-NEXT: sw a0, 8(sp)
836 ; RV32-NEXT: sw a1, 12(sp)
837 ; RV32-NEXT: addi a0, sp, 8
838 ; RV32-NEXT: vsetivli zero, 8, e64, m4, ta, ma
839 ; RV32-NEXT: vlse64.v v12, (a0), zero
840 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
841 ; RV32-NEXT: vmul.vv v8, v8, v12
842 ; RV32-NEXT: addi sp, sp, 16
843 ; RV32-NEXT: .cfi_def_cfa_offset 0
846 ; RV64-LABEL: vmul_vx_v8i64_unmasked:
848 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
849 ; RV64-NEXT: vmul.vx v8, v8, a0
851 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
852 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
853 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> splat (i1 true), i32 %evl)
857 declare <16 x i64> @llvm.vp.mul.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
859 define <16 x i64> @vmul_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
860 ; CHECK-LABEL: vmul_vv_v16i64:
862 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
863 ; CHECK-NEXT: vmul.vv v8, v8, v16, v0.t
865 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
869 define <16 x i64> @vmul_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
870 ; CHECK-LABEL: vmul_vv_v16i64_unmasked:
872 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
873 ; CHECK-NEXT: vmul.vv v8, v8, v16
875 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> splat (i1 true), i32 %evl)
879 define <16 x i64> @vmul_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
880 ; RV32-LABEL: vmul_vx_v16i64:
882 ; RV32-NEXT: addi sp, sp, -16
883 ; RV32-NEXT: .cfi_def_cfa_offset 16
884 ; RV32-NEXT: sw a0, 8(sp)
885 ; RV32-NEXT: sw a1, 12(sp)
886 ; RV32-NEXT: addi a0, sp, 8
887 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
888 ; RV32-NEXT: vlse64.v v16, (a0), zero
889 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
890 ; RV32-NEXT: vmul.vv v8, v8, v16, v0.t
891 ; RV32-NEXT: addi sp, sp, 16
892 ; RV32-NEXT: .cfi_def_cfa_offset 0
895 ; RV64-LABEL: vmul_vx_v16i64:
897 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
898 ; RV64-NEXT: vmul.vx v8, v8, a0, v0.t
900 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
901 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
902 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
906 define <16 x i64> @vmul_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
907 ; RV32-LABEL: vmul_vx_v16i64_unmasked:
909 ; RV32-NEXT: addi sp, sp, -16
910 ; RV32-NEXT: .cfi_def_cfa_offset 16
911 ; RV32-NEXT: sw a0, 8(sp)
912 ; RV32-NEXT: sw a1, 12(sp)
913 ; RV32-NEXT: addi a0, sp, 8
914 ; RV32-NEXT: vsetivli zero, 16, e64, m8, ta, ma
915 ; RV32-NEXT: vlse64.v v16, (a0), zero
916 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
917 ; RV32-NEXT: vmul.vv v8, v8, v16
918 ; RV32-NEXT: addi sp, sp, 16
919 ; RV32-NEXT: .cfi_def_cfa_offset 0
922 ; RV64-LABEL: vmul_vx_v16i64_unmasked:
924 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
925 ; RV64-NEXT: vmul.vx v8, v8, a0
927 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
928 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
929 %v = call <16 x i64> @llvm.vp.mul.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> splat (i1 true), i32 %evl)
934 define <8 x i64> @vmul_vv_undef_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
935 ; RV32-LABEL: vmul_vv_undef_v8i64:
937 ; RV32-NEXT: vsetvli a0, zero, e64, m4, ta, ma
938 ; RV32-NEXT: vmv.v.i v8, 0
941 ; RV64-LABEL: vmul_vv_undef_v8i64:
943 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
944 ; RV64-NEXT: vmv.v.i v8, 0
946 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> undef, <8 x i1> %m, i32 %evl)
950 define <8 x i64> @vmul_vx_undef_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
951 ; RV32-LABEL: vmul_vx_undef_v8i64_unmasked:
953 ; RV32-NEXT: vsetvli a0, zero, e64, m4, ta, ma
954 ; RV32-NEXT: vmv.v.i v8, 0
957 ; RV64-LABEL: vmul_vx_undef_v8i64_unmasked:
959 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
960 ; RV64-NEXT: vmv.v.i v8, 0
962 %head = insertelement <8 x i1> poison, i1 true, i32 0
963 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
964 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> undef, <8 x i1> %m, i32 %evl)
968 define <8 x i64> @vmul_vx_zero_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
969 ; RV32-LABEL: vmul_vx_zero_v8i64:
971 ; RV32-NEXT: vsetvli a0, zero, e64, m4, ta, ma
972 ; RV32-NEXT: vmv.v.i v8, 0
975 ; RV64-LABEL: vmul_vx_zero_v8i64:
977 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
978 ; RV64-NEXT: vmv.v.i v8, 0
980 %elt.head = insertelement <8 x i64> poison, i64 0, i32 0
981 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
982 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
986 define <8 x i64> @vmul_vx_zero_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
987 ; RV32-LABEL: vmul_vx_zero_v8i64_unmasked:
989 ; RV32-NEXT: vsetvli a0, zero, e64, m4, ta, ma
990 ; RV32-NEXT: vmv.v.i v8, 0
993 ; RV64-LABEL: vmul_vx_zero_v8i64_unmasked:
995 ; RV64-NEXT: vsetivli zero, 8, e64, m4, ta, ma
996 ; RV64-NEXT: vmv.v.i v8, 0
998 %elt.head = insertelement <8 x i64> poison, i64 0, i32 0
999 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1000 %head = insertelement <8 x i1> poison, i1 true, i32 0
1001 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1002 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1006 define <8 x i64> @vmul_vx_one_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1007 ; CHECK-LABEL: vmul_vx_one_v8i64:
1010 %elt.head = insertelement <8 x i64> poison, i64 1, i32 0
1011 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1012 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1016 define <8 x i64> @vmul_vx_one_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1017 ; CHECK-LABEL: vmul_vx_one_v8i64_unmasked:
1020 %elt.head = insertelement <8 x i64> poison, i64 1, i32 0
1021 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1022 %head = insertelement <8 x i1> poison, i1 true, i32 0
1023 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1024 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1028 define <8 x i64> @vmul_vx_negone_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1029 ; CHECK-LABEL: vmul_vx_negone_v8i64:
1031 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1032 ; CHECK-NEXT: vrsub.vi v8, v8, 0, v0.t
1034 %elt.head = insertelement <8 x i64> poison, i64 -1, i32 0
1035 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1036 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1040 define <8 x i64> @vmul_vx_negone_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1041 ; CHECK-LABEL: vmul_vx_negone_v8i64_unmasked:
1043 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1044 ; CHECK-NEXT: vrsub.vi v8, v8, 0
1046 %elt.head = insertelement <8 x i64> poison, i64 -1, i32 0
1047 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1048 %head = insertelement <8 x i1> poison, i1 true, i32 0
1049 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1050 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1054 define <8 x i64> @vmul_vx_pow2_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1055 ; CHECK-LABEL: vmul_vx_pow2_v8i64:
1057 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1058 ; CHECK-NEXT: vsll.vi v8, v8, 6, v0.t
1060 %elt.head = insertelement <8 x i64> poison, i64 64, i32 0
1061 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1062 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1066 define <8 x i64> @vmul_vx_pow2_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1067 ; CHECK-LABEL: vmul_vx_pow2_v8i64_unmasked:
1069 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1070 ; CHECK-NEXT: vsll.vi v8, v8, 6
1072 %elt.head = insertelement <8 x i64> poison, i64 64, i32 0
1073 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1074 %head = insertelement <8 x i1> poison, i1 true, i32 0
1075 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1076 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1080 define <8 x i64> @vmul_vx_negpow2_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1081 ; CHECK-LABEL: vmul_vx_negpow2_v8i64:
1083 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1084 ; CHECK-NEXT: vsll.vi v8, v8, 6, v0.t
1085 ; CHECK-NEXT: vrsub.vi v8, v8, 0, v0.t
1087 %elt.head = insertelement <8 x i64> poison, i64 -64, i32 0
1088 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1089 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1093 define <8 x i64> @vmul_vx_negpow2_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1094 ; CHECK-LABEL: vmul_vx_negpow2_v8i64_unmasked:
1096 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1097 ; CHECK-NEXT: vsll.vi v8, v8, 6
1098 ; CHECK-NEXT: vrsub.vi v8, v8, 0
1100 %elt.head = insertelement <8 x i64> poison, i64 -64, i32 0
1101 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1102 %head = insertelement <8 x i1> poison, i1 true, i32 0
1103 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1104 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1108 declare <8 x i64> @llvm.vp.shl.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
1110 define <8 x i64> @vmul_vshl_vx_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1111 ; CHECK-LABEL: vmul_vshl_vx_v8i64:
1113 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1114 ; CHECK-NEXT: vsll.vi v8, v8, 3, v0.t
1115 ; CHECK-NEXT: li a0, 7
1116 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
1118 %elt.head1 = insertelement <8 x i64> poison, i64 3, i32 0
1119 %vb = shufflevector <8 x i64> %elt.head1, <8 x i64> poison, <8 x i32> zeroinitializer
1120 %elt.head2 = insertelement <8 x i64> poison, i64 7, i32 0
1121 %vc = shufflevector <8 x i64> %elt.head2, <8 x i64> poison, <8 x i32> zeroinitializer
1122 %vshl = call <8 x i64> @llvm.vp.shl.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1123 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %vshl, <8 x i64> %vc, <8 x i1> %m, i32 %evl)
1127 define <8 x i64> @vmul_vshl_vx_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1128 ; CHECK-LABEL: vmul_vshl_vx_v8i64_unmasked:
1130 ; CHECK-NEXT: li a0, 56
1131 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1132 ; CHECK-NEXT: vmul.vx v8, v8, a0
1134 %head = insertelement <8 x i1> poison, i1 true, i32 0
1135 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1136 %elt.head1 = insertelement <8 x i64> poison, i64 3, i32 0
1137 %vb = shufflevector <8 x i64> %elt.head1, <8 x i64> poison, <8 x i32> zeroinitializer
1138 %elt.head2 = insertelement <8 x i64> poison, i64 7, i32 0
1139 %vc = shufflevector <8 x i64> %elt.head2, <8 x i64> poison, <8 x i32> zeroinitializer
1140 %vshl = call <8 x i64> @llvm.vp.shl.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1141 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %vshl, <8 x i64> %vc, <8 x i1> %m, i32 %evl)
1145 define <8 x i64> @vmul_vshl_vv_v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 zeroext %evl) {
1146 ; CHECK-LABEL: vmul_vshl_vv_v8i64:
1148 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1149 ; CHECK-NEXT: vsll.vi v8, v8, 7, v0.t
1150 ; CHECK-NEXT: vmul.vv v8, v8, v12, v0.t
1152 %elt.head = insertelement <8 x i64> poison, i64 7, i32 0
1153 %vc = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1154 %vshl = call <8 x i64> @llvm.vp.shl.v8i64(<8 x i64> %va, <8 x i64> %vc, <8 x i1> %m, i32 %evl)
1155 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %vshl, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1159 define <8 x i64> @vmul_vshl_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %vb, i32 zeroext %evl) {
1160 ; CHECK-LABEL: vmul_vshl_vv_v8i64_unmasked:
1162 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1163 ; CHECK-NEXT: vmul.vv v8, v8, v12
1164 ; CHECK-NEXT: vsll.vi v8, v8, 7
1166 %head = insertelement <8 x i1> poison, i1 true, i32 0
1167 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1168 %elt.head = insertelement <8 x i64> poison, i64 7, i32 0
1169 %vc = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1170 %vshl = call <8 x i64> @llvm.vp.shl.v8i64(<8 x i64> %va, <8 x i64> %vc, <8 x i1> %m, i32 %evl)
1171 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %vshl, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1175 declare <8 x i64> @llvm.vp.add.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
1177 define <8 x i64> @vmul_vadd_vx_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1178 ; CHECK-LABEL: vmul_vadd_vx_v8i64:
1180 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1181 ; CHECK-NEXT: vadd.vi v8, v8, 3, v0.t
1182 ; CHECK-NEXT: li a0, 7
1183 ; CHECK-NEXT: vmul.vx v8, v8, a0, v0.t
1185 %elt.head1 = insertelement <8 x i64> poison, i64 3, i32 0
1186 %vb = shufflevector <8 x i64> %elt.head1, <8 x i64> poison, <8 x i32> zeroinitializer
1187 %elt.head2 = insertelement <8 x i64> poison, i64 7, i32 0
1188 %vc = shufflevector <8 x i64> %elt.head2, <8 x i64> poison, <8 x i32> zeroinitializer
1189 %vadd = call <8 x i64> @llvm.vp.add.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1190 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %vadd, <8 x i64> %vc, <8 x i1> %m, i32 %evl)
1194 define <8 x i64> @vmul_vadd_vx_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1195 ; CHECK-LABEL: vmul_vadd_vx_v8i64_unmasked:
1197 ; CHECK-NEXT: li a1, 21
1198 ; CHECK-NEXT: vsetivli zero, 8, e64, m4, ta, ma
1199 ; CHECK-NEXT: vmv.v.x v12, a1
1200 ; CHECK-NEXT: li a1, 7
1201 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1202 ; CHECK-NEXT: vmadd.vx v8, a1, v12
1204 %head = insertelement <8 x i1> poison, i1 true, i32 0
1205 %m = shufflevector <8 x i1> %head, <8 x i1> poison, <8 x i32> zeroinitializer
1206 %elt.head1 = insertelement <8 x i64> poison, i64 3, i32 0
1207 %vb = shufflevector <8 x i64> %elt.head1, <8 x i64> poison, <8 x i32> zeroinitializer
1208 %elt.head2 = insertelement <8 x i64> poison, i64 7, i32 0
1209 %vc = shufflevector <8 x i64> %elt.head2, <8 x i64> poison, <8 x i32> zeroinitializer
1210 %vadd = call <8 x i64> @llvm.vp.add.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1211 %v = call <8 x i64> @llvm.vp.mul.v8i64(<8 x i64> %vadd, <8 x i64> %vc, <8 x i1> %m, i32 %evl)