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.lshr.v8i7(<8 x i7>, <8 x i7>, <8 x i1>, i32)
9 define <8 x i7> @vsrl_vv_v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 zeroext %evl) {
10 ; CHECK-LABEL: vsrl_vv_v8i7:
12 ; CHECK-NEXT: li a1, 127
13 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
14 ; CHECK-NEXT: vand.vx v9, v9, a1, v0.t
15 ; CHECK-NEXT: vand.vx v8, v8, a1, v0.t
16 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
18 %v = call <8 x i7> @llvm.vp.lshr.v8i7(<8 x i7> %va, <8 x i7> %b, <8 x i1> %m, i32 %evl)
22 declare <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8>, <2 x i8>, <2 x i1>, i32)
24 define <2 x i8> @vsrl_vv_v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 zeroext %evl) {
25 ; CHECK-LABEL: vsrl_vv_v2i8:
27 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
28 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
30 %v = call <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> %m, i32 %evl)
34 define <2 x i8> @vsrl_vv_v2i8_unmasked(<2 x i8> %va, <2 x i8> %b, i32 zeroext %evl) {
35 ; CHECK-LABEL: vsrl_vv_v2i8_unmasked:
37 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
38 ; CHECK-NEXT: vsrl.vv v8, v8, v9
40 %v = call <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8> %va, <2 x i8> %b, <2 x i1> splat (i1 true), i32 %evl)
44 define <2 x i8> @vsrl_vx_v2i8(<2 x i8> %va, i8 %b, <2 x i1> %m, i32 zeroext %evl) {
45 ; CHECK-LABEL: vsrl_vx_v2i8:
47 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
48 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
50 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
51 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
52 %v = call <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> %m, i32 %evl)
56 define <2 x i8> @vsrl_vx_v2i8_unmasked(<2 x i8> %va, i8 %b, i32 zeroext %evl) {
57 ; CHECK-LABEL: vsrl_vx_v2i8_unmasked:
59 ; CHECK-NEXT: vsetvli zero, a1, e8, mf8, ta, ma
60 ; CHECK-NEXT: vsrl.vx v8, v8, a0
62 %elt.head = insertelement <2 x i8> poison, i8 %b, i32 0
63 %vb = shufflevector <2 x i8> %elt.head, <2 x i8> poison, <2 x i32> zeroinitializer
64 %v = call <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8> %va, <2 x i8> %vb, <2 x i1> splat (i1 true), i32 %evl)
68 define <2 x i8> @vsrl_vi_v2i8(<2 x i8> %va, <2 x i1> %m, i32 zeroext %evl) {
69 ; CHECK-LABEL: vsrl_vi_v2i8:
71 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
72 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
74 %v = call <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8> %va, <2 x i8> splat (i8 4), <2 x i1> %m, i32 %evl)
78 define <2 x i8> @vsrl_vi_v2i8_unmasked(<2 x i8> %va, i32 zeroext %evl) {
79 ; CHECK-LABEL: vsrl_vi_v2i8_unmasked:
81 ; CHECK-NEXT: vsetvli zero, a0, e8, mf8, ta, ma
82 ; CHECK-NEXT: vsrl.vi v8, v8, 4
84 %v = call <2 x i8> @llvm.vp.lshr.v2i8(<2 x i8> %va, <2 x i8> splat (i8 4), <2 x i1> splat (i1 true), i32 %evl)
88 declare <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8>, <4 x i8>, <4 x i1>, i32)
90 define <4 x i8> @vsrl_vv_v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 zeroext %evl) {
91 ; CHECK-LABEL: vsrl_vv_v4i8:
93 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
94 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
96 %v = call <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> %m, i32 %evl)
100 define <4 x i8> @vsrl_vv_v4i8_unmasked(<4 x i8> %va, <4 x i8> %b, i32 zeroext %evl) {
101 ; CHECK-LABEL: vsrl_vv_v4i8_unmasked:
103 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
104 ; CHECK-NEXT: vsrl.vv v8, v8, v9
106 %v = call <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8> %va, <4 x i8> %b, <4 x i1> splat (i1 true), i32 %evl)
110 define <4 x i8> @vsrl_vx_v4i8(<4 x i8> %va, i8 %b, <4 x i1> %m, i32 zeroext %evl) {
111 ; CHECK-LABEL: vsrl_vx_v4i8:
113 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
114 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
116 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
117 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
118 %v = call <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> %m, i32 %evl)
122 define <4 x i8> @vsrl_vx_v4i8_unmasked(<4 x i8> %va, i8 %b, i32 zeroext %evl) {
123 ; CHECK-LABEL: vsrl_vx_v4i8_unmasked:
125 ; CHECK-NEXT: vsetvli zero, a1, e8, mf4, ta, ma
126 ; CHECK-NEXT: vsrl.vx v8, v8, a0
128 %elt.head = insertelement <4 x i8> poison, i8 %b, i32 0
129 %vb = shufflevector <4 x i8> %elt.head, <4 x i8> poison, <4 x i32> zeroinitializer
130 %v = call <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8> %va, <4 x i8> %vb, <4 x i1> splat (i1 true), i32 %evl)
134 define <4 x i8> @vsrl_vi_v4i8(<4 x i8> %va, <4 x i1> %m, i32 zeroext %evl) {
135 ; CHECK-LABEL: vsrl_vi_v4i8:
137 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
138 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
140 %v = call <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8> %va, <4 x i8> splat (i8 4), <4 x i1> %m, i32 %evl)
144 define <4 x i8> @vsrl_vi_v4i8_unmasked(<4 x i8> %va, i32 zeroext %evl) {
145 ; CHECK-LABEL: vsrl_vi_v4i8_unmasked:
147 ; CHECK-NEXT: vsetvli zero, a0, e8, mf4, ta, ma
148 ; CHECK-NEXT: vsrl.vi v8, v8, 4
150 %v = call <4 x i8> @llvm.vp.lshr.v4i8(<4 x i8> %va, <4 x i8> splat (i8 4), <4 x i1> splat (i1 true), i32 %evl)
154 declare <7 x i8> @llvm.vp.lshr.v7i8(<7 x i8>, <7 x i8>, <7 x i1>, i32)
156 define <7 x i8> @vsrl_vv_v7i8(<7 x i8> %va, <7 x i8> %b, <7 x i1> %m, i32 zeroext %evl) {
157 ; CHECK-LABEL: vsrl_vv_v7i8:
159 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
160 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
162 %v = call <7 x i8> @llvm.vp.lshr.v7i8(<7 x i8> %va, <7 x i8> %b, <7 x i1> %m, i32 %evl)
166 declare <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8>, <8 x i8>, <8 x i1>, i32)
168 define <8 x i8> @vsrl_vv_v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 zeroext %evl) {
169 ; CHECK-LABEL: vsrl_vv_v8i8:
171 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
172 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
174 %v = call <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> %m, i32 %evl)
178 define <8 x i8> @vsrl_vv_v8i8_unmasked(<8 x i8> %va, <8 x i8> %b, i32 zeroext %evl) {
179 ; CHECK-LABEL: vsrl_vv_v8i8_unmasked:
181 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
182 ; CHECK-NEXT: vsrl.vv v8, v8, v9
184 %v = call <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8> %va, <8 x i8> %b, <8 x i1> splat (i1 true), i32 %evl)
188 define <8 x i8> @vsrl_vx_v8i8(<8 x i8> %va, i8 %b, <8 x i1> %m, i32 zeroext %evl) {
189 ; CHECK-LABEL: vsrl_vx_v8i8:
191 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
192 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
194 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
195 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
196 %v = call <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> %m, i32 %evl)
200 define <8 x i8> @vsrl_vx_v8i8_unmasked(<8 x i8> %va, i8 %b, i32 zeroext %evl) {
201 ; CHECK-LABEL: vsrl_vx_v8i8_unmasked:
203 ; CHECK-NEXT: vsetvli zero, a1, e8, mf2, ta, ma
204 ; CHECK-NEXT: vsrl.vx v8, v8, a0
206 %elt.head = insertelement <8 x i8> poison, i8 %b, i32 0
207 %vb = shufflevector <8 x i8> %elt.head, <8 x i8> poison, <8 x i32> zeroinitializer
208 %v = call <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8> %va, <8 x i8> %vb, <8 x i1> splat (i1 true), i32 %evl)
212 define <8 x i8> @vsrl_vi_v8i8(<8 x i8> %va, <8 x i1> %m, i32 zeroext %evl) {
213 ; CHECK-LABEL: vsrl_vi_v8i8:
215 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
216 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
218 %v = call <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), <8 x i1> %m, i32 %evl)
222 define <8 x i8> @vsrl_vi_v8i8_unmasked(<8 x i8> %va, i32 zeroext %evl) {
223 ; CHECK-LABEL: vsrl_vi_v8i8_unmasked:
225 ; CHECK-NEXT: vsetvli zero, a0, e8, mf2, ta, ma
226 ; CHECK-NEXT: vsrl.vi v8, v8, 4
228 %v = call <8 x i8> @llvm.vp.lshr.v8i8(<8 x i8> %va, <8 x i8> splat (i8 4), <8 x i1> splat (i1 true), i32 %evl)
232 declare <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8>, <16 x i8>, <16 x i1>, i32)
234 define <16 x i8> @vsrl_vv_v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 zeroext %evl) {
235 ; CHECK-LABEL: vsrl_vv_v16i8:
237 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
238 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
240 %v = call <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> %m, i32 %evl)
244 define <16 x i8> @vsrl_vv_v16i8_unmasked(<16 x i8> %va, <16 x i8> %b, i32 zeroext %evl) {
245 ; CHECK-LABEL: vsrl_vv_v16i8_unmasked:
247 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
248 ; CHECK-NEXT: vsrl.vv v8, v8, v9
250 %v = call <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8> %va, <16 x i8> %b, <16 x i1> splat (i1 true), i32 %evl)
254 define <16 x i8> @vsrl_vx_v16i8(<16 x i8> %va, i8 %b, <16 x i1> %m, i32 zeroext %evl) {
255 ; CHECK-LABEL: vsrl_vx_v16i8:
257 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
258 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
260 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
261 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
262 %v = call <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> %m, i32 %evl)
266 define <16 x i8> @vsrl_vx_v16i8_unmasked(<16 x i8> %va, i8 %b, i32 zeroext %evl) {
267 ; CHECK-LABEL: vsrl_vx_v16i8_unmasked:
269 ; CHECK-NEXT: vsetvli zero, a1, e8, m1, ta, ma
270 ; CHECK-NEXT: vsrl.vx v8, v8, a0
272 %elt.head = insertelement <16 x i8> poison, i8 %b, i32 0
273 %vb = shufflevector <16 x i8> %elt.head, <16 x i8> poison, <16 x i32> zeroinitializer
274 %v = call <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8> %va, <16 x i8> %vb, <16 x i1> splat (i1 true), i32 %evl)
278 define <16 x i8> @vsrl_vi_v16i8(<16 x i8> %va, <16 x i1> %m, i32 zeroext %evl) {
279 ; CHECK-LABEL: vsrl_vi_v16i8:
281 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
282 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
284 %v = call <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8> %va, <16 x i8> splat (i8 4), <16 x i1> %m, i32 %evl)
288 define <16 x i8> @vsrl_vi_v16i8_unmasked(<16 x i8> %va, i32 zeroext %evl) {
289 ; CHECK-LABEL: vsrl_vi_v16i8_unmasked:
291 ; CHECK-NEXT: vsetvli zero, a0, e8, m1, ta, ma
292 ; CHECK-NEXT: vsrl.vi v8, v8, 4
294 %v = call <16 x i8> @llvm.vp.lshr.v16i8(<16 x i8> %va, <16 x i8> splat (i8 4), <16 x i1> splat (i1 true), i32 %evl)
298 declare <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16>, <2 x i16>, <2 x i1>, i32)
300 define <2 x i16> @vsrl_vv_v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 zeroext %evl) {
301 ; CHECK-LABEL: vsrl_vv_v2i16:
303 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
304 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
306 %v = call <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> %m, i32 %evl)
310 define <2 x i16> @vsrl_vv_v2i16_unmasked(<2 x i16> %va, <2 x i16> %b, i32 zeroext %evl) {
311 ; CHECK-LABEL: vsrl_vv_v2i16_unmasked:
313 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
314 ; CHECK-NEXT: vsrl.vv v8, v8, v9
316 %v = call <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16> %va, <2 x i16> %b, <2 x i1> splat (i1 true), i32 %evl)
320 define <2 x i16> @vsrl_vx_v2i16(<2 x i16> %va, i16 %b, <2 x i1> %m, i32 zeroext %evl) {
321 ; CHECK-LABEL: vsrl_vx_v2i16:
323 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
324 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
326 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
327 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
328 %v = call <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> %m, i32 %evl)
332 define <2 x i16> @vsrl_vx_v2i16_unmasked(<2 x i16> %va, i16 %b, i32 zeroext %evl) {
333 ; CHECK-LABEL: vsrl_vx_v2i16_unmasked:
335 ; CHECK-NEXT: vsetvli zero, a1, e16, mf4, ta, ma
336 ; CHECK-NEXT: vsrl.vx v8, v8, a0
338 %elt.head = insertelement <2 x i16> poison, i16 %b, i32 0
339 %vb = shufflevector <2 x i16> %elt.head, <2 x i16> poison, <2 x i32> zeroinitializer
340 %v = call <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16> %va, <2 x i16> %vb, <2 x i1> splat (i1 true), i32 %evl)
344 define <2 x i16> @vsrl_vi_v2i16(<2 x i16> %va, <2 x i1> %m, i32 zeroext %evl) {
345 ; CHECK-LABEL: vsrl_vi_v2i16:
347 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
348 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
350 %v = call <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16> %va, <2 x i16> splat (i16 4), <2 x i1> %m, i32 %evl)
354 define <2 x i16> @vsrl_vi_v2i16_unmasked(<2 x i16> %va, i32 zeroext %evl) {
355 ; CHECK-LABEL: vsrl_vi_v2i16_unmasked:
357 ; CHECK-NEXT: vsetvli zero, a0, e16, mf4, ta, ma
358 ; CHECK-NEXT: vsrl.vi v8, v8, 4
360 %v = call <2 x i16> @llvm.vp.lshr.v2i16(<2 x i16> %va, <2 x i16> splat (i16 4), <2 x i1> splat (i1 true), i32 %evl)
364 declare <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16>, <4 x i16>, <4 x i1>, i32)
366 define <4 x i16> @vsrl_vv_v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 zeroext %evl) {
367 ; CHECK-LABEL: vsrl_vv_v4i16:
369 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
370 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
372 %v = call <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> %m, i32 %evl)
376 define <4 x i16> @vsrl_vv_v4i16_unmasked(<4 x i16> %va, <4 x i16> %b, i32 zeroext %evl) {
377 ; CHECK-LABEL: vsrl_vv_v4i16_unmasked:
379 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
380 ; CHECK-NEXT: vsrl.vv v8, v8, v9
382 %v = call <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16> %va, <4 x i16> %b, <4 x i1> splat (i1 true), i32 %evl)
386 define <4 x i16> @vsrl_vx_v4i16(<4 x i16> %va, i16 %b, <4 x i1> %m, i32 zeroext %evl) {
387 ; CHECK-LABEL: vsrl_vx_v4i16:
389 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
390 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
392 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
393 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
394 %v = call <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> %m, i32 %evl)
398 define <4 x i16> @vsrl_vx_v4i16_unmasked(<4 x i16> %va, i16 %b, i32 zeroext %evl) {
399 ; CHECK-LABEL: vsrl_vx_v4i16_unmasked:
401 ; CHECK-NEXT: vsetvli zero, a1, e16, mf2, ta, ma
402 ; CHECK-NEXT: vsrl.vx v8, v8, a0
404 %elt.head = insertelement <4 x i16> poison, i16 %b, i32 0
405 %vb = shufflevector <4 x i16> %elt.head, <4 x i16> poison, <4 x i32> zeroinitializer
406 %v = call <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16> %va, <4 x i16> %vb, <4 x i1> splat (i1 true), i32 %evl)
410 define <4 x i16> @vsrl_vi_v4i16(<4 x i16> %va, <4 x i1> %m, i32 zeroext %evl) {
411 ; CHECK-LABEL: vsrl_vi_v4i16:
413 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
414 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
416 %v = call <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16> %va, <4 x i16> splat (i16 4), <4 x i1> %m, i32 %evl)
420 define <4 x i16> @vsrl_vi_v4i16_unmasked(<4 x i16> %va, i32 zeroext %evl) {
421 ; CHECK-LABEL: vsrl_vi_v4i16_unmasked:
423 ; CHECK-NEXT: vsetvli zero, a0, e16, mf2, ta, ma
424 ; CHECK-NEXT: vsrl.vi v8, v8, 4
426 %v = call <4 x i16> @llvm.vp.lshr.v4i16(<4 x i16> %va, <4 x i16> splat (i16 4), <4 x i1> splat (i1 true), i32 %evl)
430 declare <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16>, <8 x i16>, <8 x i1>, i32)
432 define <8 x i16> @vsrl_vv_v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 zeroext %evl) {
433 ; CHECK-LABEL: vsrl_vv_v8i16:
435 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
436 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
438 %v = call <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> %m, i32 %evl)
442 define <8 x i16> @vsrl_vv_v8i16_unmasked(<8 x i16> %va, <8 x i16> %b, i32 zeroext %evl) {
443 ; CHECK-LABEL: vsrl_vv_v8i16_unmasked:
445 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
446 ; CHECK-NEXT: vsrl.vv v8, v8, v9
448 %v = call <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16> %va, <8 x i16> %b, <8 x i1> splat (i1 true), i32 %evl)
452 define <8 x i16> @vsrl_vx_v8i16(<8 x i16> %va, i16 %b, <8 x i1> %m, i32 zeroext %evl) {
453 ; CHECK-LABEL: vsrl_vx_v8i16:
455 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
456 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
458 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
459 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
460 %v = call <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> %m, i32 %evl)
464 define <8 x i16> @vsrl_vx_v8i16_unmasked(<8 x i16> %va, i16 %b, i32 zeroext %evl) {
465 ; CHECK-LABEL: vsrl_vx_v8i16_unmasked:
467 ; CHECK-NEXT: vsetvli zero, a1, e16, m1, ta, ma
468 ; CHECK-NEXT: vsrl.vx v8, v8, a0
470 %elt.head = insertelement <8 x i16> poison, i16 %b, i32 0
471 %vb = shufflevector <8 x i16> %elt.head, <8 x i16> poison, <8 x i32> zeroinitializer
472 %v = call <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16> %va, <8 x i16> %vb, <8 x i1> splat (i1 true), i32 %evl)
476 define <8 x i16> @vsrl_vi_v8i16(<8 x i16> %va, <8 x i1> %m, i32 zeroext %evl) {
477 ; CHECK-LABEL: vsrl_vi_v8i16:
479 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
480 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
482 %v = call <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16> %va, <8 x i16> splat (i16 4), <8 x i1> %m, i32 %evl)
486 define <8 x i16> @vsrl_vi_v8i16_unmasked(<8 x i16> %va, i32 zeroext %evl) {
487 ; CHECK-LABEL: vsrl_vi_v8i16_unmasked:
489 ; CHECK-NEXT: vsetvli zero, a0, e16, m1, ta, ma
490 ; CHECK-NEXT: vsrl.vi v8, v8, 4
492 %v = call <8 x i16> @llvm.vp.lshr.v8i16(<8 x i16> %va, <8 x i16> splat (i16 4), <8 x i1> splat (i1 true), i32 %evl)
496 declare <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16>, <16 x i16>, <16 x i1>, i32)
498 define <16 x i16> @vsrl_vv_v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 zeroext %evl) {
499 ; CHECK-LABEL: vsrl_vv_v16i16:
501 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
502 ; CHECK-NEXT: vsrl.vv v8, v8, v10, v0.t
504 %v = call <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> %m, i32 %evl)
508 define <16 x i16> @vsrl_vv_v16i16_unmasked(<16 x i16> %va, <16 x i16> %b, i32 zeroext %evl) {
509 ; CHECK-LABEL: vsrl_vv_v16i16_unmasked:
511 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
512 ; CHECK-NEXT: vsrl.vv v8, v8, v10
514 %v = call <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16> %va, <16 x i16> %b, <16 x i1> splat (i1 true), i32 %evl)
518 define <16 x i16> @vsrl_vx_v16i16(<16 x i16> %va, i16 %b, <16 x i1> %m, i32 zeroext %evl) {
519 ; CHECK-LABEL: vsrl_vx_v16i16:
521 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
522 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
524 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
525 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
526 %v = call <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> %m, i32 %evl)
530 define <16 x i16> @vsrl_vx_v16i16_unmasked(<16 x i16> %va, i16 %b, i32 zeroext %evl) {
531 ; CHECK-LABEL: vsrl_vx_v16i16_unmasked:
533 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
534 ; CHECK-NEXT: vsrl.vx v8, v8, a0
536 %elt.head = insertelement <16 x i16> poison, i16 %b, i32 0
537 %vb = shufflevector <16 x i16> %elt.head, <16 x i16> poison, <16 x i32> zeroinitializer
538 %v = call <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16> %va, <16 x i16> %vb, <16 x i1> splat (i1 true), i32 %evl)
542 define <16 x i16> @vsrl_vi_v16i16(<16 x i16> %va, <16 x i1> %m, i32 zeroext %evl) {
543 ; CHECK-LABEL: vsrl_vi_v16i16:
545 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
546 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
548 %v = call <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16> %va, <16 x i16> splat (i16 4), <16 x i1> %m, i32 %evl)
552 define <16 x i16> @vsrl_vi_v16i16_unmasked(<16 x i16> %va, i32 zeroext %evl) {
553 ; CHECK-LABEL: vsrl_vi_v16i16_unmasked:
555 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
556 ; CHECK-NEXT: vsrl.vi v8, v8, 4
558 %v = call <16 x i16> @llvm.vp.lshr.v16i16(<16 x i16> %va, <16 x i16> splat (i16 4), <16 x i1> splat (i1 true), i32 %evl)
562 declare <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32>, <2 x i32>, <2 x i1>, i32)
564 define <2 x i32> @vsrl_vv_v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 zeroext %evl) {
565 ; CHECK-LABEL: vsrl_vv_v2i32:
567 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
568 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
570 %v = call <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> %m, i32 %evl)
574 define <2 x i32> @vsrl_vv_v2i32_unmasked(<2 x i32> %va, <2 x i32> %b, i32 zeroext %evl) {
575 ; CHECK-LABEL: vsrl_vv_v2i32_unmasked:
577 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
578 ; CHECK-NEXT: vsrl.vv v8, v8, v9
580 %v = call <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32> %va, <2 x i32> %b, <2 x i1> splat (i1 true), i32 %evl)
584 define <2 x i32> @vsrl_vx_v2i32(<2 x i32> %va, i32 %b, <2 x i1> %m, i32 zeroext %evl) {
585 ; CHECK-LABEL: vsrl_vx_v2i32:
587 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
588 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
590 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
591 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
592 %v = call <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> %m, i32 %evl)
596 define <2 x i32> @vsrl_vx_v2i32_unmasked(<2 x i32> %va, i32 %b, i32 zeroext %evl) {
597 ; CHECK-LABEL: vsrl_vx_v2i32_unmasked:
599 ; CHECK-NEXT: vsetvli zero, a1, e32, mf2, ta, ma
600 ; CHECK-NEXT: vsrl.vx v8, v8, a0
602 %elt.head = insertelement <2 x i32> poison, i32 %b, i32 0
603 %vb = shufflevector <2 x i32> %elt.head, <2 x i32> poison, <2 x i32> zeroinitializer
604 %v = call <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32> %va, <2 x i32> %vb, <2 x i1> splat (i1 true), i32 %evl)
608 define <2 x i32> @vsrl_vi_v2i32(<2 x i32> %va, <2 x i1> %m, i32 zeroext %evl) {
609 ; CHECK-LABEL: vsrl_vi_v2i32:
611 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
612 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
614 %v = call <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32> %va, <2 x i32> splat (i32 4), <2 x i1> %m, i32 %evl)
618 define <2 x i32> @vsrl_vi_v2i32_unmasked(<2 x i32> %va, i32 zeroext %evl) {
619 ; CHECK-LABEL: vsrl_vi_v2i32_unmasked:
621 ; CHECK-NEXT: vsetvli zero, a0, e32, mf2, ta, ma
622 ; CHECK-NEXT: vsrl.vi v8, v8, 4
624 %v = call <2 x i32> @llvm.vp.lshr.v2i32(<2 x i32> %va, <2 x i32> splat (i32 4), <2 x i1> splat (i1 true), i32 %evl)
628 declare <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32>, <4 x i32>, <4 x i1>, i32)
630 define <4 x i32> @vsrl_vv_v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 zeroext %evl) {
631 ; CHECK-LABEL: vsrl_vv_v4i32:
633 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
634 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
636 %v = call <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> %m, i32 %evl)
640 define <4 x i32> @vsrl_vv_v4i32_unmasked(<4 x i32> %va, <4 x i32> %b, i32 zeroext %evl) {
641 ; CHECK-LABEL: vsrl_vv_v4i32_unmasked:
643 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
644 ; CHECK-NEXT: vsrl.vv v8, v8, v9
646 %v = call <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32> %va, <4 x i32> %b, <4 x i1> splat (i1 true), i32 %evl)
650 define <4 x i32> @vsrl_vx_v4i32(<4 x i32> %va, i32 %b, <4 x i1> %m, i32 zeroext %evl) {
651 ; CHECK-LABEL: vsrl_vx_v4i32:
653 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
654 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
656 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
657 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
658 %v = call <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> %m, i32 %evl)
662 define <4 x i32> @vsrl_vx_v4i32_unmasked(<4 x i32> %va, i32 %b, i32 zeroext %evl) {
663 ; CHECK-LABEL: vsrl_vx_v4i32_unmasked:
665 ; CHECK-NEXT: vsetvli zero, a1, e32, m1, ta, ma
666 ; CHECK-NEXT: vsrl.vx v8, v8, a0
668 %elt.head = insertelement <4 x i32> poison, i32 %b, i32 0
669 %vb = shufflevector <4 x i32> %elt.head, <4 x i32> poison, <4 x i32> zeroinitializer
670 %v = call <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32> %va, <4 x i32> %vb, <4 x i1> splat (i1 true), i32 %evl)
674 define <4 x i32> @vsrl_vi_v4i32(<4 x i32> %va, <4 x i1> %m, i32 zeroext %evl) {
675 ; CHECK-LABEL: vsrl_vi_v4i32:
677 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
678 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
680 %v = call <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32> %va, <4 x i32> splat (i32 4), <4 x i1> %m, i32 %evl)
684 define <4 x i32> @vsrl_vi_v4i32_unmasked(<4 x i32> %va, i32 zeroext %evl) {
685 ; CHECK-LABEL: vsrl_vi_v4i32_unmasked:
687 ; CHECK-NEXT: vsetvli zero, a0, e32, m1, ta, ma
688 ; CHECK-NEXT: vsrl.vi v8, v8, 4
690 %v = call <4 x i32> @llvm.vp.lshr.v4i32(<4 x i32> %va, <4 x i32> splat (i32 4), <4 x i1> splat (i1 true), i32 %evl)
694 declare <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32>, <8 x i32>, <8 x i1>, i32)
696 define <8 x i32> @vsrl_vv_v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 zeroext %evl) {
697 ; CHECK-LABEL: vsrl_vv_v8i32:
699 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
700 ; CHECK-NEXT: vsrl.vv v8, v8, v10, v0.t
702 %v = call <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> %m, i32 %evl)
706 define <8 x i32> @vsrl_vv_v8i32_unmasked(<8 x i32> %va, <8 x i32> %b, i32 zeroext %evl) {
707 ; CHECK-LABEL: vsrl_vv_v8i32_unmasked:
709 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
710 ; CHECK-NEXT: vsrl.vv v8, v8, v10
712 %v = call <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32> %va, <8 x i32> %b, <8 x i1> splat (i1 true), i32 %evl)
716 define <8 x i32> @vsrl_vx_v8i32(<8 x i32> %va, i32 %b, <8 x i1> %m, i32 zeroext %evl) {
717 ; CHECK-LABEL: vsrl_vx_v8i32:
719 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
720 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
722 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
723 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
724 %v = call <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> %m, i32 %evl)
728 define <8 x i32> @vsrl_vx_v8i32_unmasked(<8 x i32> %va, i32 %b, i32 zeroext %evl) {
729 ; CHECK-LABEL: vsrl_vx_v8i32_unmasked:
731 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
732 ; CHECK-NEXT: vsrl.vx v8, v8, a0
734 %elt.head = insertelement <8 x i32> poison, i32 %b, i32 0
735 %vb = shufflevector <8 x i32> %elt.head, <8 x i32> poison, <8 x i32> zeroinitializer
736 %v = call <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32> %va, <8 x i32> %vb, <8 x i1> splat (i1 true), i32 %evl)
740 define <8 x i32> @vsrl_vi_v8i32(<8 x i32> %va, <8 x i1> %m, i32 zeroext %evl) {
741 ; CHECK-LABEL: vsrl_vi_v8i32:
743 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
744 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
746 %v = call <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), <8 x i1> %m, i32 %evl)
750 define <8 x i32> @vsrl_vi_v8i32_unmasked(<8 x i32> %va, i32 zeroext %evl) {
751 ; CHECK-LABEL: vsrl_vi_v8i32_unmasked:
753 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
754 ; CHECK-NEXT: vsrl.vi v8, v8, 4
756 %v = call <8 x i32> @llvm.vp.lshr.v8i32(<8 x i32> %va, <8 x i32> splat (i32 4), <8 x i1> splat (i1 true), i32 %evl)
760 declare <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32>, <16 x i32>, <16 x i1>, i32)
762 define <16 x i32> @vsrl_vv_v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 zeroext %evl) {
763 ; CHECK-LABEL: vsrl_vv_v16i32:
765 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
766 ; CHECK-NEXT: vsrl.vv v8, v8, v12, v0.t
768 %v = call <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> %m, i32 %evl)
772 define <16 x i32> @vsrl_vv_v16i32_unmasked(<16 x i32> %va, <16 x i32> %b, i32 zeroext %evl) {
773 ; CHECK-LABEL: vsrl_vv_v16i32_unmasked:
775 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
776 ; CHECK-NEXT: vsrl.vv v8, v8, v12
778 %v = call <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32> %va, <16 x i32> %b, <16 x i1> splat (i1 true), i32 %evl)
782 define <16 x i32> @vsrl_vx_v16i32(<16 x i32> %va, i32 %b, <16 x i1> %m, i32 zeroext %evl) {
783 ; CHECK-LABEL: vsrl_vx_v16i32:
785 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
786 ; CHECK-NEXT: vsrl.vx v8, v8, a0, v0.t
788 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
789 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
790 %v = call <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> %m, i32 %evl)
794 define <16 x i32> @vsrl_vx_v16i32_unmasked(<16 x i32> %va, i32 %b, i32 zeroext %evl) {
795 ; CHECK-LABEL: vsrl_vx_v16i32_unmasked:
797 ; CHECK-NEXT: vsetvli zero, a1, e32, m4, ta, ma
798 ; CHECK-NEXT: vsrl.vx v8, v8, a0
800 %elt.head = insertelement <16 x i32> poison, i32 %b, i32 0
801 %vb = shufflevector <16 x i32> %elt.head, <16 x i32> poison, <16 x i32> zeroinitializer
802 %v = call <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32> %va, <16 x i32> %vb, <16 x i1> splat (i1 true), i32 %evl)
806 define <16 x i32> @vsrl_vi_v16i32(<16 x i32> %va, <16 x i1> %m, i32 zeroext %evl) {
807 ; CHECK-LABEL: vsrl_vi_v16i32:
809 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
810 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
812 %v = call <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32> %va, <16 x i32> splat (i32 4), <16 x i1> %m, i32 %evl)
816 define <16 x i32> @vsrl_vi_v16i32_unmasked(<16 x i32> %va, i32 zeroext %evl) {
817 ; CHECK-LABEL: vsrl_vi_v16i32_unmasked:
819 ; CHECK-NEXT: vsetvli zero, a0, e32, m4, ta, ma
820 ; CHECK-NEXT: vsrl.vi v8, v8, 4
822 %v = call <16 x i32> @llvm.vp.lshr.v16i32(<16 x i32> %va, <16 x i32> splat (i32 4), <16 x i1> splat (i1 true), i32 %evl)
826 declare <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64>, <2 x i64>, <2 x i1>, i32)
828 define <2 x i64> @vsrl_vv_v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 zeroext %evl) {
829 ; CHECK-LABEL: vsrl_vv_v2i64:
831 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
832 ; CHECK-NEXT: vsrl.vv v8, v8, v9, v0.t
834 %v = call <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> %m, i32 %evl)
838 define <2 x i64> @vsrl_vv_v2i64_unmasked(<2 x i64> %va, <2 x i64> %b, i32 zeroext %evl) {
839 ; CHECK-LABEL: vsrl_vv_v2i64_unmasked:
841 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
842 ; CHECK-NEXT: vsrl.vv v8, v8, v9
844 %v = call <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64> %va, <2 x i64> %b, <2 x i1> splat (i1 true), i32 %evl)
848 define <2 x i64> @vsrl_vx_v2i64(<2 x i64> %va, i64 %b, <2 x i1> %m, i32 zeroext %evl) {
849 ; RV32-LABEL: vsrl_vx_v2i64:
851 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
852 ; RV32-NEXT: vsrl.vx v8, v8, a0, v0.t
855 ; RV64-LABEL: vsrl_vx_v2i64:
857 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
858 ; RV64-NEXT: vsrl.vx v8, v8, a0, v0.t
860 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
861 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
862 %v = call <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> %m, i32 %evl)
866 define <2 x i64> @vsrl_vx_v2i64_unmasked(<2 x i64> %va, i64 %b, i32 zeroext %evl) {
867 ; RV32-LABEL: vsrl_vx_v2i64_unmasked:
869 ; RV32-NEXT: vsetvli zero, a2, e64, m1, ta, ma
870 ; RV32-NEXT: vsrl.vx v8, v8, a0
873 ; RV64-LABEL: vsrl_vx_v2i64_unmasked:
875 ; RV64-NEXT: vsetvli zero, a1, e64, m1, ta, ma
876 ; RV64-NEXT: vsrl.vx v8, v8, a0
878 %elt.head = insertelement <2 x i64> poison, i64 %b, i32 0
879 %vb = shufflevector <2 x i64> %elt.head, <2 x i64> poison, <2 x i32> zeroinitializer
880 %v = call <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64> %va, <2 x i64> %vb, <2 x i1> splat (i1 true), i32 %evl)
884 define <2 x i64> @vsrl_vi_v2i64(<2 x i64> %va, <2 x i1> %m, i32 zeroext %evl) {
885 ; CHECK-LABEL: vsrl_vi_v2i64:
887 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
888 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
890 %v = call <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64> %va, <2 x i64> splat (i64 4), <2 x i1> %m, i32 %evl)
894 define <2 x i64> @vsrl_vi_v2i64_unmasked(<2 x i64> %va, i32 zeroext %evl) {
895 ; CHECK-LABEL: vsrl_vi_v2i64_unmasked:
897 ; CHECK-NEXT: vsetvli zero, a0, e64, m1, ta, ma
898 ; CHECK-NEXT: vsrl.vi v8, v8, 4
900 %v = call <2 x i64> @llvm.vp.lshr.v2i64(<2 x i64> %va, <2 x i64> splat (i64 4), <2 x i1> splat (i1 true), i32 %evl)
904 declare <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64>, <4 x i64>, <4 x i1>, i32)
906 define <4 x i64> @vsrl_vv_v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 zeroext %evl) {
907 ; CHECK-LABEL: vsrl_vv_v4i64:
909 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
910 ; CHECK-NEXT: vsrl.vv v8, v8, v10, v0.t
912 %v = call <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> %m, i32 %evl)
916 define <4 x i64> @vsrl_vv_v4i64_unmasked(<4 x i64> %va, <4 x i64> %b, i32 zeroext %evl) {
917 ; CHECK-LABEL: vsrl_vv_v4i64_unmasked:
919 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
920 ; CHECK-NEXT: vsrl.vv v8, v8, v10
922 %v = call <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64> %va, <4 x i64> %b, <4 x i1> splat (i1 true), i32 %evl)
926 define <4 x i64> @vsrl_vx_v4i64(<4 x i64> %va, i64 %b, <4 x i1> %m, i32 zeroext %evl) {
927 ; RV32-LABEL: vsrl_vx_v4i64:
929 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
930 ; RV32-NEXT: vsrl.vx v8, v8, a0, v0.t
933 ; RV64-LABEL: vsrl_vx_v4i64:
935 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
936 ; RV64-NEXT: vsrl.vx v8, v8, a0, v0.t
938 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
939 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
940 %v = call <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> %m, i32 %evl)
944 define <4 x i64> @vsrl_vx_v4i64_unmasked(<4 x i64> %va, i64 %b, i32 zeroext %evl) {
945 ; RV32-LABEL: vsrl_vx_v4i64_unmasked:
947 ; RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
948 ; RV32-NEXT: vsrl.vx v8, v8, a0
951 ; RV64-LABEL: vsrl_vx_v4i64_unmasked:
953 ; RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
954 ; RV64-NEXT: vsrl.vx v8, v8, a0
956 %elt.head = insertelement <4 x i64> poison, i64 %b, i32 0
957 %vb = shufflevector <4 x i64> %elt.head, <4 x i64> poison, <4 x i32> zeroinitializer
958 %v = call <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64> %va, <4 x i64> %vb, <4 x i1> splat (i1 true), i32 %evl)
962 define <4 x i64> @vsrl_vi_v4i64(<4 x i64> %va, <4 x i1> %m, i32 zeroext %evl) {
963 ; CHECK-LABEL: vsrl_vi_v4i64:
965 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
966 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
968 %v = call <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64> %va, <4 x i64> splat (i64 4), <4 x i1> %m, i32 %evl)
972 define <4 x i64> @vsrl_vi_v4i64_unmasked(<4 x i64> %va, i32 zeroext %evl) {
973 ; CHECK-LABEL: vsrl_vi_v4i64_unmasked:
975 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
976 ; CHECK-NEXT: vsrl.vi v8, v8, 4
978 %v = call <4 x i64> @llvm.vp.lshr.v4i64(<4 x i64> %va, <4 x i64> splat (i64 4), <4 x i1> splat (i1 true), i32 %evl)
982 declare <8 x i64> @llvm.vp.lshr.v8i64(<8 x i64>, <8 x i64>, <8 x i1>, i32)
984 define <8 x i64> @vsrl_vv_v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 zeroext %evl) {
985 ; CHECK-LABEL: vsrl_vv_v8i64:
987 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
988 ; CHECK-NEXT: vsrl.vv v8, v8, v12, v0.t
990 %v = call <8 x i64> @llvm.vp.lshr.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> %m, i32 %evl)
994 define <8 x i64> @vsrl_vv_v8i64_unmasked(<8 x i64> %va, <8 x i64> %b, i32 zeroext %evl) {
995 ; CHECK-LABEL: vsrl_vv_v8i64_unmasked:
997 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
998 ; CHECK-NEXT: vsrl.vv v8, v8, v12
1000 %v = call <8 x i64> @llvm.vp.lshr.v8i64(<8 x i64> %va, <8 x i64> %b, <8 x i1> splat (i1 true), i32 %evl)
1004 define <8 x i64> @vsrl_vx_v8i64(<8 x i64> %va, i64 %b, <8 x i1> %m, i32 zeroext %evl) {
1005 ; RV32-LABEL: vsrl_vx_v8i64:
1007 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1008 ; RV32-NEXT: vsrl.vx v8, v8, a0, v0.t
1011 ; RV64-LABEL: vsrl_vx_v8i64:
1013 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1014 ; RV64-NEXT: vsrl.vx v8, v8, a0, v0.t
1016 %elt.head = insertelement <8 x i64> poison, i64 %b, i32 0
1017 %vb = shufflevector <8 x i64> %elt.head, <8 x i64> poison, <8 x i32> zeroinitializer
1018 %v = call <8 x i64> @llvm.vp.lshr.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> %m, i32 %evl)
1022 define <8 x i64> @vsrl_vx_v8i64_unmasked(<8 x i64> %va, i64 %b, i32 zeroext %evl) {
1023 ; RV32-LABEL: vsrl_vx_v8i64_unmasked:
1025 ; RV32-NEXT: vsetvli zero, a2, e64, m4, ta, ma
1026 ; RV32-NEXT: vsrl.vx v8, v8, a0
1029 ; RV64-LABEL: vsrl_vx_v8i64_unmasked:
1031 ; RV64-NEXT: vsetvli zero, a1, e64, m4, ta, ma
1032 ; RV64-NEXT: vsrl.vx v8, v8, a0
1034 %elt.head = insertelement <8 x i64> poison, i64 %b, 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.lshr.v8i64(<8 x i64> %va, <8 x i64> %vb, <8 x i1> splat (i1 true), i32 %evl)
1040 define <8 x i64> @vsrl_vi_v8i64(<8 x i64> %va, <8 x i1> %m, i32 zeroext %evl) {
1041 ; CHECK-LABEL: vsrl_vi_v8i64:
1043 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1044 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
1046 %v = call <8 x i64> @llvm.vp.lshr.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), <8 x i1> %m, i32 %evl)
1050 define <8 x i64> @vsrl_vi_v8i64_unmasked(<8 x i64> %va, i32 zeroext %evl) {
1051 ; CHECK-LABEL: vsrl_vi_v8i64_unmasked:
1053 ; CHECK-NEXT: vsetvli zero, a0, e64, m4, ta, ma
1054 ; CHECK-NEXT: vsrl.vi v8, v8, 4
1056 %v = call <8 x i64> @llvm.vp.lshr.v8i64(<8 x i64> %va, <8 x i64> splat (i64 4), <8 x i1> splat (i1 true), i32 %evl)
1060 declare <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64>, <16 x i64>, <16 x i1>, i32)
1062 define <16 x i64> @vsrl_vv_v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 zeroext %evl) {
1063 ; CHECK-LABEL: vsrl_vv_v16i64:
1065 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1066 ; CHECK-NEXT: vsrl.vv v8, v8, v16, v0.t
1068 %v = call <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> %m, i32 %evl)
1072 define <16 x i64> @vsrl_vv_v16i64_unmasked(<16 x i64> %va, <16 x i64> %b, i32 zeroext %evl) {
1073 ; CHECK-LABEL: vsrl_vv_v16i64_unmasked:
1075 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1076 ; CHECK-NEXT: vsrl.vv v8, v8, v16
1078 %v = call <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64> %va, <16 x i64> %b, <16 x i1> splat (i1 true), i32 %evl)
1082 define <16 x i64> @vsrl_vx_v16i64(<16 x i64> %va, i64 %b, <16 x i1> %m, i32 zeroext %evl) {
1083 ; RV32-LABEL: vsrl_vx_v16i64:
1085 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1086 ; RV32-NEXT: vsrl.vx v8, v8, a0, v0.t
1089 ; RV64-LABEL: vsrl_vx_v16i64:
1091 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1092 ; RV64-NEXT: vsrl.vx v8, v8, a0, v0.t
1094 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
1095 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
1096 %v = call <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> %m, i32 %evl)
1100 define <16 x i64> @vsrl_vx_v16i64_unmasked(<16 x i64> %va, i64 %b, i32 zeroext %evl) {
1101 ; RV32-LABEL: vsrl_vx_v16i64_unmasked:
1103 ; RV32-NEXT: vsetvli zero, a2, e64, m8, ta, ma
1104 ; RV32-NEXT: vsrl.vx v8, v8, a0
1107 ; RV64-LABEL: vsrl_vx_v16i64_unmasked:
1109 ; RV64-NEXT: vsetvli zero, a1, e64, m8, ta, ma
1110 ; RV64-NEXT: vsrl.vx v8, v8, a0
1112 %elt.head = insertelement <16 x i64> poison, i64 %b, i32 0
1113 %vb = shufflevector <16 x i64> %elt.head, <16 x i64> poison, <16 x i32> zeroinitializer
1114 %v = call <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64> %va, <16 x i64> %vb, <16 x i1> splat (i1 true), i32 %evl)
1118 define <16 x i64> @vsrl_vi_v16i64(<16 x i64> %va, <16 x i1> %m, i32 zeroext %evl) {
1119 ; CHECK-LABEL: vsrl_vi_v16i64:
1121 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1122 ; CHECK-NEXT: vsrl.vi v8, v8, 4, v0.t
1124 %v = call <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64> %va, <16 x i64> splat (i64 4), <16 x i1> %m, i32 %evl)
1128 define <16 x i64> @vsrl_vi_v16i64_unmasked(<16 x i64> %va, i32 zeroext %evl) {
1129 ; CHECK-LABEL: vsrl_vi_v16i64_unmasked:
1131 ; CHECK-NEXT: vsetvli zero, a0, e64, m8, ta, ma
1132 ; CHECK-NEXT: vsrl.vi v8, v8, 4
1134 %v = call <16 x i64> @llvm.vp.lshr.v16i64(<16 x i64> %va, <16 x i64> splat (i64 4), <16 x i1> splat (i1 true), i32 %evl)