1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=riscv32 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-RV32
3 ; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK,CHECK-RV64
4 ; RUN: llc -mtriple=riscv32 -mattr=+v,+zvbb -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-ZVBB,CHECK-ZVBB32
5 ; RUN: llc -mtriple=riscv64 -mattr=+v,+zvbb -verify-machineinstrs < %s | FileCheck %s --check-prefixes=CHECK-ZVBB,CHECK-ZVBB64
7 ; ==============================================================================
9 ; ==============================================================================
11 declare <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64>, <vscale x 2 x i64>, <vscale x 2 x i1>, i32)
13 define <vscale x 2 x i64> @vwsll_vv_nxv2i64_sext(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
14 ; CHECK-LABEL: vwsll_vv_nxv2i64_sext:
16 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
17 ; CHECK-NEXT: vzext.vf2 v10, v8
18 ; CHECK-NEXT: vsext.vf2 v12, v9
19 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
20 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
23 ; CHECK-ZVBB-LABEL: vwsll_vv_nxv2i64_sext:
24 ; CHECK-ZVBB: # %bb.0:
25 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e32, m1, ta, ma
26 ; CHECK-ZVBB-NEXT: vwsll.vv v10, v8, v9, v0.t
27 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
28 ; CHECK-ZVBB-NEXT: ret
29 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
30 %y = sext <vscale x 2 x i32> %b to <vscale x 2 x i64>
31 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
32 ret <vscale x 2 x i64> %z
35 define <vscale x 2 x i64> @vwsll_vv_nxv2i64_zext(<vscale x 2 x i32> %a, <vscale x 2 x i32> %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
36 ; CHECK-LABEL: vwsll_vv_nxv2i64_zext:
38 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
39 ; CHECK-NEXT: vzext.vf2 v10, v8
40 ; CHECK-NEXT: vzext.vf2 v12, v9
41 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
42 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
45 ; CHECK-ZVBB-LABEL: vwsll_vv_nxv2i64_zext:
46 ; CHECK-ZVBB: # %bb.0:
47 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e32, m1, ta, ma
48 ; CHECK-ZVBB-NEXT: vwsll.vv v10, v8, v9, v0.t
49 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
50 ; CHECK-ZVBB-NEXT: ret
51 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
52 %y = zext <vscale x 2 x i32> %b to <vscale x 2 x i64>
53 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
54 ret <vscale x 2 x i64> %z
57 define <vscale x 2 x i64> @vwsll_vx_i64_nxv2i64(<vscale x 2 x i32> %a, i64 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
58 ; CHECK-RV32-LABEL: vwsll_vx_i64_nxv2i64:
59 ; CHECK-RV32: # %bb.0:
60 ; CHECK-RV32-NEXT: vsetvli a1, zero, e64, m2, ta, ma
61 ; CHECK-RV32-NEXT: vzext.vf2 v10, v8
62 ; CHECK-RV32-NEXT: vsetvli zero, a2, e64, m2, ta, ma
63 ; CHECK-RV32-NEXT: vsll.vx v8, v10, a0, v0.t
64 ; CHECK-RV32-NEXT: ret
66 ; CHECK-RV64-LABEL: vwsll_vx_i64_nxv2i64:
67 ; CHECK-RV64: # %bb.0:
68 ; CHECK-RV64-NEXT: vsetvli a2, zero, e64, m2, ta, ma
69 ; CHECK-RV64-NEXT: vzext.vf2 v10, v8
70 ; CHECK-RV64-NEXT: vsetvli zero, a1, e64, m2, ta, ma
71 ; CHECK-RV64-NEXT: vsll.vx v8, v10, a0, v0.t
72 ; CHECK-RV64-NEXT: ret
74 ; CHECK-ZVBB32-LABEL: vwsll_vx_i64_nxv2i64:
75 ; CHECK-ZVBB32: # %bb.0:
76 ; CHECK-ZVBB32-NEXT: vsetvli zero, a2, e32, m1, ta, ma
77 ; CHECK-ZVBB32-NEXT: vwsll.vx v10, v8, a0, v0.t
78 ; CHECK-ZVBB32-NEXT: vmv2r.v v8, v10
79 ; CHECK-ZVBB32-NEXT: ret
81 ; CHECK-ZVBB64-LABEL: vwsll_vx_i64_nxv2i64:
82 ; CHECK-ZVBB64: # %bb.0:
83 ; CHECK-ZVBB64-NEXT: vsetvli zero, a1, e32, m1, ta, ma
84 ; CHECK-ZVBB64-NEXT: vwsll.vx v10, v8, a0, v0.t
85 ; CHECK-ZVBB64-NEXT: vmv2r.v v8, v10
86 ; CHECK-ZVBB64-NEXT: ret
87 %head = insertelement <vscale x 2 x i64> poison, i64 %b, i32 0
88 %splat = shufflevector <vscale x 2 x i64> %head, <vscale x 2 x i64> poison, <vscale x 2 x i32> zeroinitializer
89 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
90 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %splat, <vscale x 2 x i1> %m, i32 %vl)
91 ret <vscale x 2 x i64> %z
94 define <vscale x 2 x i64> @vwsll_vx_i32_nxv2i64_sext(<vscale x 2 x i32> %a, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
95 ; CHECK-LABEL: vwsll_vx_i32_nxv2i64_sext:
97 ; CHECK-NEXT: vsetvli a2, zero, e32, m1, ta, ma
98 ; CHECK-NEXT: vmv.v.x v9, a0
99 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
100 ; CHECK-NEXT: vzext.vf2 v10, v8
101 ; CHECK-NEXT: vsext.vf2 v12, v9
102 ; CHECK-NEXT: vsetvli zero, a1, e64, m2, ta, ma
103 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
106 ; CHECK-ZVBB-LABEL: vwsll_vx_i32_nxv2i64_sext:
107 ; CHECK-ZVBB: # %bb.0:
108 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e32, m1, ta, ma
109 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
110 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
111 ; CHECK-ZVBB-NEXT: ret
112 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
113 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
114 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
115 %y = sext <vscale x 2 x i32> %splat to <vscale x 2 x i64>
116 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
117 ret <vscale x 2 x i64> %z
120 define <vscale x 2 x i64> @vwsll_vx_i32_nxv2i64_zext(<vscale x 2 x i32> %a, i32 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
121 ; CHECK-LABEL: vwsll_vx_i32_nxv2i64_zext:
123 ; CHECK-NEXT: vsetvli a2, zero, e32, m1, ta, ma
124 ; CHECK-NEXT: vmv.v.x v9, a0
125 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
126 ; CHECK-NEXT: vzext.vf2 v10, v8
127 ; CHECK-NEXT: vzext.vf2 v12, v9
128 ; CHECK-NEXT: vsetvli zero, a1, e64, m2, ta, ma
129 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
132 ; CHECK-ZVBB-LABEL: vwsll_vx_i32_nxv2i64_zext:
133 ; CHECK-ZVBB: # %bb.0:
134 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e32, m1, ta, ma
135 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
136 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
137 ; CHECK-ZVBB-NEXT: ret
138 %head = insertelement <vscale x 2 x i32> poison, i32 %b, i32 0
139 %splat = shufflevector <vscale x 2 x i32> %head, <vscale x 2 x i32> poison, <vscale x 2 x i32> zeroinitializer
140 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
141 %y = zext <vscale x 2 x i32> %splat to <vscale x 2 x i64>
142 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
143 ret <vscale x 2 x i64> %z
146 define <vscale x 2 x i64> @vwsll_vx_i16_nxv2i64_sext(<vscale x 2 x i32> %a, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
147 ; CHECK-LABEL: vwsll_vx_i16_nxv2i64_sext:
149 ; CHECK-NEXT: vsetvli a2, zero, e16, mf2, ta, ma
150 ; CHECK-NEXT: vmv.v.x v9, a0
151 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
152 ; CHECK-NEXT: vzext.vf2 v10, v8
153 ; CHECK-NEXT: vsext.vf4 v12, v9
154 ; CHECK-NEXT: vsetvli zero, a1, e64, m2, ta, ma
155 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
158 ; CHECK-ZVBB-LABEL: vwsll_vx_i16_nxv2i64_sext:
159 ; CHECK-ZVBB: # %bb.0:
160 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e32, m1, ta, ma
161 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
162 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
163 ; CHECK-ZVBB-NEXT: ret
164 %head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
165 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
166 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
167 %y = sext <vscale x 2 x i16> %splat to <vscale x 2 x i64>
168 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
169 ret <vscale x 2 x i64> %z
172 define <vscale x 2 x i64> @vwsll_vx_i16_nxv2i64_zext(<vscale x 2 x i32> %a, i16 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
173 ; CHECK-LABEL: vwsll_vx_i16_nxv2i64_zext:
175 ; CHECK-NEXT: vsetvli a2, zero, e16, mf2, ta, ma
176 ; CHECK-NEXT: vmv.v.x v9, a0
177 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
178 ; CHECK-NEXT: vzext.vf2 v10, v8
179 ; CHECK-NEXT: vzext.vf4 v12, v9
180 ; CHECK-NEXT: vsetvli zero, a1, e64, m2, ta, ma
181 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
184 ; CHECK-ZVBB-LABEL: vwsll_vx_i16_nxv2i64_zext:
185 ; CHECK-ZVBB: # %bb.0:
186 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e32, m1, ta, ma
187 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
188 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
189 ; CHECK-ZVBB-NEXT: ret
190 %head = insertelement <vscale x 2 x i16> poison, i16 %b, i32 0
191 %splat = shufflevector <vscale x 2 x i16> %head, <vscale x 2 x i16> poison, <vscale x 2 x i32> zeroinitializer
192 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
193 %y = zext <vscale x 2 x i16> %splat to <vscale x 2 x i64>
194 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
195 ret <vscale x 2 x i64> %z
198 define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_sext(<vscale x 2 x i32> %a, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
199 ; CHECK-LABEL: vwsll_vx_i8_nxv2i64_sext:
201 ; CHECK-NEXT: vsetvli a2, zero, e8, mf4, ta, ma
202 ; CHECK-NEXT: vmv.v.x v9, a0
203 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
204 ; CHECK-NEXT: vzext.vf2 v10, v8
205 ; CHECK-NEXT: vsext.vf8 v12, v9
206 ; CHECK-NEXT: vsetvli zero, a1, e64, m2, ta, ma
207 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
210 ; CHECK-ZVBB-LABEL: vwsll_vx_i8_nxv2i64_sext:
211 ; CHECK-ZVBB: # %bb.0:
212 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e32, m1, ta, ma
213 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
214 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
215 ; CHECK-ZVBB-NEXT: ret
216 %head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
217 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
218 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
219 %y = sext <vscale x 2 x i8> %splat to <vscale x 2 x i64>
220 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
221 ret <vscale x 2 x i64> %z
224 define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_zext(<vscale x 2 x i32> %a, i8 %b, <vscale x 2 x i1> %m, i32 zeroext %vl) {
225 ; CHECK-LABEL: vwsll_vx_i8_nxv2i64_zext:
227 ; CHECK-NEXT: vsetvli a2, zero, e8, mf4, ta, ma
228 ; CHECK-NEXT: vmv.v.x v9, a0
229 ; CHECK-NEXT: vsetvli zero, zero, e64, m2, ta, ma
230 ; CHECK-NEXT: vzext.vf2 v10, v8
231 ; CHECK-NEXT: vzext.vf8 v12, v9
232 ; CHECK-NEXT: vsetvli zero, a1, e64, m2, ta, ma
233 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
236 ; CHECK-ZVBB-LABEL: vwsll_vx_i8_nxv2i64_zext:
237 ; CHECK-ZVBB: # %bb.0:
238 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e32, m1, ta, ma
239 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
240 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
241 ; CHECK-ZVBB-NEXT: ret
242 %head = insertelement <vscale x 2 x i8> poison, i8 %b, i32 0
243 %splat = shufflevector <vscale x 2 x i8> %head, <vscale x 2 x i8> poison, <vscale x 2 x i32> zeroinitializer
244 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
245 %y = zext <vscale x 2 x i8> %splat to <vscale x 2 x i64>
246 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> %y, <vscale x 2 x i1> %m, i32 %vl)
247 ret <vscale x 2 x i64> %z
250 define <vscale x 2 x i64> @vwsll_vi_nxv2i64(<vscale x 2 x i32> %a, <vscale x 2 x i1> %m, i32 zeroext %vl) {
251 ; CHECK-LABEL: vwsll_vi_nxv2i64:
253 ; CHECK-NEXT: vsetvli a1, zero, e64, m2, ta, ma
254 ; CHECK-NEXT: vzext.vf2 v10, v8
255 ; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
256 ; CHECK-NEXT: vsll.vi v8, v10, 2, v0.t
259 ; CHECK-ZVBB-LABEL: vwsll_vi_nxv2i64:
260 ; CHECK-ZVBB: # %bb.0:
261 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e32, m1, ta, ma
262 ; CHECK-ZVBB-NEXT: vwsll.vi v10, v8, 2, v0.t
263 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
264 ; CHECK-ZVBB-NEXT: ret
265 %x = zext <vscale x 2 x i32> %a to <vscale x 2 x i64>
266 %z = call <vscale x 2 x i64> @llvm.vp.shl.nxv2i64(<vscale x 2 x i64> %x, <vscale x 2 x i64> splat (i64 2), <vscale x 2 x i1> %m, i32 %vl)
267 ret <vscale x 2 x i64> %z
270 ; ==============================================================================
272 ; ==============================================================================
274 declare <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32>, <vscale x 4 x i32>, <vscale x 4 x i1>, i32)
276 define <vscale x 4 x i32> @vwsll_vv_nxv4i32_sext(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
277 ; CHECK-LABEL: vwsll_vv_nxv4i32_sext:
279 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
280 ; CHECK-NEXT: vzext.vf2 v10, v8
281 ; CHECK-NEXT: vsext.vf2 v12, v9
282 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
283 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
286 ; CHECK-ZVBB-LABEL: vwsll_vv_nxv4i32_sext:
287 ; CHECK-ZVBB: # %bb.0:
288 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e16, m1, ta, ma
289 ; CHECK-ZVBB-NEXT: vwsll.vv v10, v8, v9, v0.t
290 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
291 ; CHECK-ZVBB-NEXT: ret
292 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
293 %y = sext <vscale x 4 x i16> %b to <vscale x 4 x i32>
294 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
295 ret <vscale x 4 x i32> %z
298 define <vscale x 4 x i32> @vwsll_vv_nxv4i32_zext(<vscale x 4 x i16> %a, <vscale x 4 x i16> %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
299 ; CHECK-LABEL: vwsll_vv_nxv4i32_zext:
301 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
302 ; CHECK-NEXT: vzext.vf2 v10, v8
303 ; CHECK-NEXT: vzext.vf2 v12, v9
304 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
305 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
308 ; CHECK-ZVBB-LABEL: vwsll_vv_nxv4i32_zext:
309 ; CHECK-ZVBB: # %bb.0:
310 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e16, m1, ta, ma
311 ; CHECK-ZVBB-NEXT: vwsll.vv v10, v8, v9, v0.t
312 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
313 ; CHECK-ZVBB-NEXT: ret
314 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
315 %y = zext <vscale x 4 x i16> %b to <vscale x 4 x i32>
316 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
317 ret <vscale x 4 x i32> %z
320 define <vscale x 4 x i32> @vwsll_vx_i64_nxv4i32(<vscale x 4 x i16> %a, i64 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
321 ; CHECK-RV32-LABEL: vwsll_vx_i64_nxv4i32:
322 ; CHECK-RV32: # %bb.0:
323 ; CHECK-RV32-NEXT: vsetvli a1, zero, e32, m2, ta, ma
324 ; CHECK-RV32-NEXT: vzext.vf2 v10, v8
325 ; CHECK-RV32-NEXT: vsetvli zero, a2, e32, m2, ta, ma
326 ; CHECK-RV32-NEXT: vsll.vx v8, v10, a0, v0.t
327 ; CHECK-RV32-NEXT: ret
329 ; CHECK-RV64-LABEL: vwsll_vx_i64_nxv4i32:
330 ; CHECK-RV64: # %bb.0:
331 ; CHECK-RV64-NEXT: vsetvli a2, zero, e32, m2, ta, ma
332 ; CHECK-RV64-NEXT: vzext.vf2 v10, v8
333 ; CHECK-RV64-NEXT: vsetvli zero, a1, e32, m2, ta, ma
334 ; CHECK-RV64-NEXT: vsll.vx v8, v10, a0, v0.t
335 ; CHECK-RV64-NEXT: ret
337 ; CHECK-ZVBB32-LABEL: vwsll_vx_i64_nxv4i32:
338 ; CHECK-ZVBB32: # %bb.0:
339 ; CHECK-ZVBB32-NEXT: vsetvli zero, a2, e16, m1, ta, ma
340 ; CHECK-ZVBB32-NEXT: vwsll.vx v10, v8, a0, v0.t
341 ; CHECK-ZVBB32-NEXT: vmv2r.v v8, v10
342 ; CHECK-ZVBB32-NEXT: ret
344 ; CHECK-ZVBB64-LABEL: vwsll_vx_i64_nxv4i32:
345 ; CHECK-ZVBB64: # %bb.0:
346 ; CHECK-ZVBB64-NEXT: vsetvli zero, a1, e16, m1, ta, ma
347 ; CHECK-ZVBB64-NEXT: vwsll.vx v10, v8, a0, v0.t
348 ; CHECK-ZVBB64-NEXT: vmv2r.v v8, v10
349 ; CHECK-ZVBB64-NEXT: ret
350 %head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
351 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 4 x i32> zeroinitializer
352 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
353 %y = trunc <vscale x 4 x i64> %splat to <vscale x 4 x i32>
354 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
355 ret <vscale x 4 x i32> %z
358 define <vscale x 4 x i32> @vwsll_vx_i32_nxv4i32(<vscale x 4 x i16> %a, i32 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
359 ; CHECK-LABEL: vwsll_vx_i32_nxv4i32:
361 ; CHECK-NEXT: vsetvli a2, zero, e32, m2, ta, ma
362 ; CHECK-NEXT: vzext.vf2 v10, v8
363 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
364 ; CHECK-NEXT: vsll.vx v8, v10, a0, v0.t
367 ; CHECK-ZVBB-LABEL: vwsll_vx_i32_nxv4i32:
368 ; CHECK-ZVBB: # %bb.0:
369 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e16, m1, ta, ma
370 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
371 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
372 ; CHECK-ZVBB-NEXT: ret
373 %head = insertelement <vscale x 4 x i32> poison, i32 %b, i32 0
374 %splat = shufflevector <vscale x 4 x i32> %head, <vscale x 4 x i32> poison, <vscale x 4 x i32> zeroinitializer
375 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
376 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %splat, <vscale x 4 x i1> %m, i32 %vl)
377 ret <vscale x 4 x i32> %z
380 define <vscale x 4 x i32> @vwsll_vx_i16_nxv4i32_sext(<vscale x 4 x i16> %a, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
381 ; CHECK-LABEL: vwsll_vx_i16_nxv4i32_sext:
383 ; CHECK-NEXT: vsetvli a2, zero, e16, m1, ta, ma
384 ; CHECK-NEXT: vmv.v.x v9, a0
385 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
386 ; CHECK-NEXT: vzext.vf2 v10, v8
387 ; CHECK-NEXT: vsext.vf2 v12, v9
388 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
389 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
392 ; CHECK-ZVBB-LABEL: vwsll_vx_i16_nxv4i32_sext:
393 ; CHECK-ZVBB: # %bb.0:
394 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e16, m1, ta, ma
395 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
396 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
397 ; CHECK-ZVBB-NEXT: ret
398 %head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
399 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
400 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
401 %y = sext <vscale x 4 x i16> %splat to <vscale x 4 x i32>
402 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
403 ret <vscale x 4 x i32> %z
406 define <vscale x 4 x i32> @vwsll_vx_i16_nxv4i32_zext(<vscale x 4 x i16> %a, i16 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
407 ; CHECK-LABEL: vwsll_vx_i16_nxv4i32_zext:
409 ; CHECK-NEXT: vsetvli a2, zero, e16, m1, ta, ma
410 ; CHECK-NEXT: vmv.v.x v9, a0
411 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
412 ; CHECK-NEXT: vzext.vf2 v10, v8
413 ; CHECK-NEXT: vzext.vf2 v12, v9
414 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
415 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
418 ; CHECK-ZVBB-LABEL: vwsll_vx_i16_nxv4i32_zext:
419 ; CHECK-ZVBB: # %bb.0:
420 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e16, m1, ta, ma
421 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
422 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
423 ; CHECK-ZVBB-NEXT: ret
424 %head = insertelement <vscale x 4 x i16> poison, i16 %b, i32 0
425 %splat = shufflevector <vscale x 4 x i16> %head, <vscale x 4 x i16> poison, <vscale x 4 x i32> zeroinitializer
426 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
427 %y = zext <vscale x 4 x i16> %splat to <vscale x 4 x i32>
428 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
429 ret <vscale x 4 x i32> %z
432 define <vscale x 4 x i32> @vwsll_vx_i8_nxv4i32_sext(<vscale x 4 x i16> %a, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
433 ; CHECK-LABEL: vwsll_vx_i8_nxv4i32_sext:
435 ; CHECK-NEXT: vsetvli a2, zero, e8, mf2, ta, ma
436 ; CHECK-NEXT: vmv.v.x v9, a0
437 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
438 ; CHECK-NEXT: vzext.vf2 v10, v8
439 ; CHECK-NEXT: vsext.vf4 v12, v9
440 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
441 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
444 ; CHECK-ZVBB-LABEL: vwsll_vx_i8_nxv4i32_sext:
445 ; CHECK-ZVBB: # %bb.0:
446 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e16, m1, ta, ma
447 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
448 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
449 ; CHECK-ZVBB-NEXT: ret
450 %head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
451 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
452 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
453 %y = sext <vscale x 4 x i8> %splat to <vscale x 4 x i32>
454 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
455 ret <vscale x 4 x i32> %z
458 define <vscale x 4 x i32> @vwsll_vx_i8_nxv4i32_zext(<vscale x 4 x i16> %a, i8 %b, <vscale x 4 x i1> %m, i32 zeroext %vl) {
459 ; CHECK-LABEL: vwsll_vx_i8_nxv4i32_zext:
461 ; CHECK-NEXT: vsetvli a2, zero, e8, mf2, ta, ma
462 ; CHECK-NEXT: vmv.v.x v9, a0
463 ; CHECK-NEXT: vsetvli zero, zero, e32, m2, ta, ma
464 ; CHECK-NEXT: vzext.vf2 v10, v8
465 ; CHECK-NEXT: vzext.vf4 v12, v9
466 ; CHECK-NEXT: vsetvli zero, a1, e32, m2, ta, ma
467 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
470 ; CHECK-ZVBB-LABEL: vwsll_vx_i8_nxv4i32_zext:
471 ; CHECK-ZVBB: # %bb.0:
472 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e16, m1, ta, ma
473 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
474 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
475 ; CHECK-ZVBB-NEXT: ret
476 %head = insertelement <vscale x 4 x i8> poison, i8 %b, i32 0
477 %splat = shufflevector <vscale x 4 x i8> %head, <vscale x 4 x i8> poison, <vscale x 4 x i32> zeroinitializer
478 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
479 %y = zext <vscale x 4 x i8> %splat to <vscale x 4 x i32>
480 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> %y, <vscale x 4 x i1> %m, i32 %vl)
481 ret <vscale x 4 x i32> %z
484 define <vscale x 4 x i32> @vwsll_vi_nxv4i32(<vscale x 4 x i16> %a, <vscale x 4 x i1> %m, i32 zeroext %vl) {
485 ; CHECK-LABEL: vwsll_vi_nxv4i32:
487 ; CHECK-NEXT: vsetvli a1, zero, e32, m2, ta, ma
488 ; CHECK-NEXT: vzext.vf2 v10, v8
489 ; CHECK-NEXT: vsetvli zero, a0, e32, m2, ta, ma
490 ; CHECK-NEXT: vsll.vi v8, v10, 2, v0.t
493 ; CHECK-ZVBB-LABEL: vwsll_vi_nxv4i32:
494 ; CHECK-ZVBB: # %bb.0:
495 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e16, m1, ta, ma
496 ; CHECK-ZVBB-NEXT: vwsll.vi v10, v8, 2, v0.t
497 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
498 ; CHECK-ZVBB-NEXT: ret
499 %x = zext <vscale x 4 x i16> %a to <vscale x 4 x i32>
500 %z = call <vscale x 4 x i32> @llvm.vp.shl.nxv4i32(<vscale x 4 x i32> %x, <vscale x 4 x i32> splat (i32 2), <vscale x 4 x i1> %m, i32 %vl)
501 ret <vscale x 4 x i32> %z
505 ; ==============================================================================
507 ; ==============================================================================
509 declare <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16>, <vscale x 8 x i16>, <vscale x 8 x i1>, i32)
511 define <vscale x 8 x i16> @vwsll_vv_nxv8i16_sext(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
512 ; CHECK-LABEL: vwsll_vv_nxv8i16_sext:
514 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
515 ; CHECK-NEXT: vzext.vf2 v10, v8
516 ; CHECK-NEXT: vsext.vf2 v12, v9
517 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
518 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
521 ; CHECK-ZVBB-LABEL: vwsll_vv_nxv8i16_sext:
522 ; CHECK-ZVBB: # %bb.0:
523 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e8, m1, ta, ma
524 ; CHECK-ZVBB-NEXT: vwsll.vv v10, v8, v9, v0.t
525 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
526 ; CHECK-ZVBB-NEXT: ret
527 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
528 %y = sext <vscale x 8 x i8> %b to <vscale x 8 x i16>
529 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y, <vscale x 8 x i1> %m, i32 %vl)
530 ret <vscale x 8 x i16> %z
533 define <vscale x 8 x i16> @vwsll_vv_nxv8i16_zext(<vscale x 8 x i8> %a, <vscale x 8 x i8> %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
534 ; CHECK-LABEL: vwsll_vv_nxv8i16_zext:
536 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
537 ; CHECK-NEXT: vzext.vf2 v10, v8
538 ; CHECK-NEXT: vzext.vf2 v12, v9
539 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
540 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
543 ; CHECK-ZVBB-LABEL: vwsll_vv_nxv8i16_zext:
544 ; CHECK-ZVBB: # %bb.0:
545 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e8, m1, ta, ma
546 ; CHECK-ZVBB-NEXT: vwsll.vv v10, v8, v9, v0.t
547 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
548 ; CHECK-ZVBB-NEXT: ret
549 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
550 %y = zext <vscale x 8 x i8> %b to <vscale x 8 x i16>
551 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y, <vscale x 8 x i1> %m, i32 %vl)
552 ret <vscale x 8 x i16> %z
555 define <vscale x 8 x i16> @vwsll_vx_i64_nxv8i16(<vscale x 8 x i8> %a, i64 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
556 ; CHECK-RV32-LABEL: vwsll_vx_i64_nxv8i16:
557 ; CHECK-RV32: # %bb.0:
558 ; CHECK-RV32-NEXT: vsetvli a1, zero, e16, m2, ta, ma
559 ; CHECK-RV32-NEXT: vzext.vf2 v10, v8
560 ; CHECK-RV32-NEXT: vsetvli zero, a2, e16, m2, ta, ma
561 ; CHECK-RV32-NEXT: vsll.vx v8, v10, a0, v0.t
562 ; CHECK-RV32-NEXT: ret
564 ; CHECK-RV64-LABEL: vwsll_vx_i64_nxv8i16:
565 ; CHECK-RV64: # %bb.0:
566 ; CHECK-RV64-NEXT: vsetvli a2, zero, e16, m2, ta, ma
567 ; CHECK-RV64-NEXT: vzext.vf2 v10, v8
568 ; CHECK-RV64-NEXT: vsetvli zero, a1, e16, m2, ta, ma
569 ; CHECK-RV64-NEXT: vsll.vx v8, v10, a0, v0.t
570 ; CHECK-RV64-NEXT: ret
572 ; CHECK-ZVBB32-LABEL: vwsll_vx_i64_nxv8i16:
573 ; CHECK-ZVBB32: # %bb.0:
574 ; CHECK-ZVBB32-NEXT: vsetvli zero, a2, e8, m1, ta, ma
575 ; CHECK-ZVBB32-NEXT: vwsll.vx v10, v8, a0, v0.t
576 ; CHECK-ZVBB32-NEXT: vmv2r.v v8, v10
577 ; CHECK-ZVBB32-NEXT: ret
579 ; CHECK-ZVBB64-LABEL: vwsll_vx_i64_nxv8i16:
580 ; CHECK-ZVBB64: # %bb.0:
581 ; CHECK-ZVBB64-NEXT: vsetvli zero, a1, e8, m1, ta, ma
582 ; CHECK-ZVBB64-NEXT: vwsll.vx v10, v8, a0, v0.t
583 ; CHECK-ZVBB64-NEXT: vmv2r.v v8, v10
584 ; CHECK-ZVBB64-NEXT: ret
585 %head = insertelement <vscale x 4 x i64> poison, i64 %b, i32 0
586 %splat = shufflevector <vscale x 4 x i64> %head, <vscale x 4 x i64> poison, <vscale x 8 x i32> zeroinitializer
587 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
588 %y = trunc <vscale x 8 x i64> %splat to <vscale x 8 x i16>
589 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y, <vscale x 8 x i1> %m, i32 %vl)
590 ret <vscale x 8 x i16> %z
593 define <vscale x 8 x i16> @vwsll_vx_i32_nxv8i16(<vscale x 8 x i8> %a, i32 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
594 ; CHECK-LABEL: vwsll_vx_i32_nxv8i16:
596 ; CHECK-NEXT: vsetvli a2, zero, e16, m2, ta, ma
597 ; CHECK-NEXT: vzext.vf2 v10, v8
598 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
599 ; CHECK-NEXT: vsll.vx v8, v10, a0, v0.t
602 ; CHECK-ZVBB-LABEL: vwsll_vx_i32_nxv8i16:
603 ; CHECK-ZVBB: # %bb.0:
604 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e8, m1, ta, ma
605 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
606 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
607 ; CHECK-ZVBB-NEXT: ret
608 %head = insertelement <vscale x 8 x i32> poison, i32 %b, i32 0
609 %splat = shufflevector <vscale x 8 x i32> %head, <vscale x 8 x i32> poison, <vscale x 8 x i32> zeroinitializer
610 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
611 %y = trunc <vscale x 8 x i32> %splat to <vscale x 8 x i16>
612 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y, <vscale x 8 x i1> %m, i32 %vl)
613 ret <vscale x 8 x i16> %z
616 define <vscale x 8 x i16> @vwsll_vx_i16_nxv8i16(<vscale x 8 x i8> %a, i16 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
617 ; CHECK-LABEL: vwsll_vx_i16_nxv8i16:
619 ; CHECK-NEXT: vsetvli a2, zero, e16, m2, ta, ma
620 ; CHECK-NEXT: vzext.vf2 v10, v8
621 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
622 ; CHECK-NEXT: vsll.vx v8, v10, a0, v0.t
625 ; CHECK-ZVBB-LABEL: vwsll_vx_i16_nxv8i16:
626 ; CHECK-ZVBB: # %bb.0:
627 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e8, m1, ta, ma
628 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
629 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
630 ; CHECK-ZVBB-NEXT: ret
631 %head = insertelement <vscale x 8 x i16> poison, i16 %b, i32 0
632 %splat = shufflevector <vscale x 8 x i16> %head, <vscale x 8 x i16> poison, <vscale x 8 x i32> zeroinitializer
633 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
634 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %splat, <vscale x 8 x i1> %m, i32 %vl)
635 ret <vscale x 8 x i16> %z
638 define <vscale x 8 x i16> @vwsll_vx_i8_nxv8i16_sext(<vscale x 8 x i8> %a, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
639 ; CHECK-LABEL: vwsll_vx_i8_nxv8i16_sext:
641 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
642 ; CHECK-NEXT: vmv.v.x v9, a0
643 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
644 ; CHECK-NEXT: vzext.vf2 v10, v8
645 ; CHECK-NEXT: vsext.vf2 v12, v9
646 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
647 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
650 ; CHECK-ZVBB-LABEL: vwsll_vx_i8_nxv8i16_sext:
651 ; CHECK-ZVBB: # %bb.0:
652 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e8, m1, ta, ma
653 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
654 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
655 ; CHECK-ZVBB-NEXT: ret
656 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
657 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
658 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
659 %y = sext <vscale x 8 x i8> %splat to <vscale x 8 x i16>
660 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y, <vscale x 8 x i1> %m, i32 %vl)
661 ret <vscale x 8 x i16> %z
664 define <vscale x 8 x i16> @vwsll_vx_i8_nxv8i16_zext(<vscale x 8 x i8> %a, i8 %b, <vscale x 8 x i1> %m, i32 zeroext %vl) {
665 ; CHECK-LABEL: vwsll_vx_i8_nxv8i16_zext:
667 ; CHECK-NEXT: vsetvli a2, zero, e8, m1, ta, ma
668 ; CHECK-NEXT: vmv.v.x v9, a0
669 ; CHECK-NEXT: vsetvli zero, zero, e16, m2, ta, ma
670 ; CHECK-NEXT: vzext.vf2 v10, v8
671 ; CHECK-NEXT: vzext.vf2 v12, v9
672 ; CHECK-NEXT: vsetvli zero, a1, e16, m2, ta, ma
673 ; CHECK-NEXT: vsll.vv v8, v10, v12, v0.t
676 ; CHECK-ZVBB-LABEL: vwsll_vx_i8_nxv8i16_zext:
677 ; CHECK-ZVBB: # %bb.0:
678 ; CHECK-ZVBB-NEXT: vsetvli zero, a1, e8, m1, ta, ma
679 ; CHECK-ZVBB-NEXT: vwsll.vx v10, v8, a0, v0.t
680 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
681 ; CHECK-ZVBB-NEXT: ret
682 %head = insertelement <vscale x 8 x i8> poison, i8 %b, i32 0
683 %splat = shufflevector <vscale x 8 x i8> %head, <vscale x 8 x i8> poison, <vscale x 8 x i32> zeroinitializer
684 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
685 %y = zext <vscale x 8 x i8> %splat to <vscale x 8 x i16>
686 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> %y, <vscale x 8 x i1> %m, i32 %vl)
687 ret <vscale x 8 x i16> %z
690 define <vscale x 8 x i16> @vwsll_vi_nxv8i16(<vscale x 8 x i8> %a, <vscale x 8 x i1> %m, i32 zeroext %vl) {
691 ; CHECK-LABEL: vwsll_vi_nxv8i16:
693 ; CHECK-NEXT: vsetvli a1, zero, e16, m2, ta, ma
694 ; CHECK-NEXT: vzext.vf2 v10, v8
695 ; CHECK-NEXT: vsetvli zero, a0, e16, m2, ta, ma
696 ; CHECK-NEXT: vsll.vi v8, v10, 2, v0.t
699 ; CHECK-ZVBB-LABEL: vwsll_vi_nxv8i16:
700 ; CHECK-ZVBB: # %bb.0:
701 ; CHECK-ZVBB-NEXT: vsetvli zero, a0, e8, m1, ta, ma
702 ; CHECK-ZVBB-NEXT: vwsll.vi v10, v8, 2, v0.t
703 ; CHECK-ZVBB-NEXT: vmv2r.v v8, v10
704 ; CHECK-ZVBB-NEXT: ret
705 %x = zext <vscale x 8 x i8> %a to <vscale x 8 x i16>
706 %z = call <vscale x 8 x i16> @llvm.vp.shl.nxv8i16(<vscale x 8 x i16> %x, <vscale x 8 x i16> splat (i16 2), <vscale x 8 x i1> %m, i32 %vl)
707 ret <vscale x 8 x i16> %z