1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
9 define <8 x i16> @sse2_psrai_w_0(<8 x i16> %v) {
10 ; CHECK-LABEL: @sse2_psrai_w_0(
11 ; CHECK-NEXT: ret <8 x i16> %v
13 %1 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %v, i32 0)
17 define <8 x i16> @sse2_psrai_w_15(<8 x i16> %v) {
18 ; CHECK-LABEL: @sse2_psrai_w_15(
19 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
20 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
22 %1 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %v, i32 15)
26 define <8 x i16> @sse2_psrai_w_64(<8 x i16> %v) {
27 ; CHECK-LABEL: @sse2_psrai_w_64(
28 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
29 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
31 %1 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %v, i32 64)
35 define <4 x i32> @sse2_psrai_d_0(<4 x i32> %v) {
36 ; CHECK-LABEL: @sse2_psrai_d_0(
37 ; CHECK-NEXT: ret <4 x i32> %v
39 %1 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %v, i32 0)
43 define <4 x i32> @sse2_psrai_d_15(<4 x i32> %v) {
44 ; CHECK-LABEL: @sse2_psrai_d_15(
45 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 15, i32 15, i32 15, i32 15>
46 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
48 %1 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %v, i32 15)
52 define <4 x i32> @sse2_psrai_d_64(<4 x i32> %v) {
53 ; CHECK-LABEL: @sse2_psrai_d_64(
54 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 31, i32 31, i32 31, i32 31>
55 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
57 %1 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %v, i32 64)
61 define <16 x i16> @avx2_psrai_w_0(<16 x i16> %v) {
62 ; CHECK-LABEL: @avx2_psrai_w_0(
63 ; CHECK-NEXT: ret <16 x i16> %v
65 %1 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %v, i32 0)
69 define <16 x i16> @avx2_psrai_w_15(<16 x i16> %v) {
70 ; CHECK-LABEL: @avx2_psrai_w_15(
71 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
72 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
74 %1 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %v, i32 15)
78 define <16 x i16> @avx2_psrai_w_64(<16 x i16> %v) {
79 ; CHECK-LABEL: @avx2_psrai_w_64(
80 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
81 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
83 %1 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %v, i32 64)
87 define <8 x i32> @avx2_psrai_d_0(<8 x i32> %v) {
88 ; CHECK-LABEL: @avx2_psrai_d_0(
89 ; CHECK-NEXT: ret <8 x i32> %v
91 %1 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %v, i32 0)
95 define <8 x i32> @avx2_psrai_d_15(<8 x i32> %v) {
96 ; CHECK-LABEL: @avx2_psrai_d_15(
97 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
98 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
100 %1 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %v, i32 15)
104 define <8 x i32> @avx2_psrai_d_64(<8 x i32> %v) {
105 ; CHECK-LABEL: @avx2_psrai_d_64(
106 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
107 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
109 %1 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %v, i32 64)
113 define <2 x i64> @avx512_psrai_q_128_0(<2 x i64> %v) {
114 ; CHECK-LABEL: @avx512_psrai_q_128_0(
115 ; CHECK-NEXT: ret <2 x i64> %v
117 %1 = tail call <2 x i64> @llvm.x86.avx512.psrai.q.128(<2 x i64> %v, i32 0)
121 define <2 x i64> @avx512_psrai_q_128_15(<2 x i64> %v) {
122 ; CHECK-LABEL: @avx512_psrai_q_128_15(
123 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 15, i64 15>
124 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
126 %1 = tail call <2 x i64> @llvm.x86.avx512.psrai.q.128(<2 x i64> %v, i32 15)
130 define <2 x i64> @avx512_psrai_q_128_64(<2 x i64> %v) {
131 ; CHECK-LABEL: @avx512_psrai_q_128_64(
132 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 63, i64 63>
133 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
135 %1 = tail call <2 x i64> @llvm.x86.avx512.psrai.q.128(<2 x i64> %v, i32 64)
139 define <4 x i64> @avx512_psrai_q_256_0(<4 x i64> %v) {
140 ; CHECK-LABEL: @avx512_psrai_q_256_0(
141 ; CHECK-NEXT: ret <4 x i64> %v
143 %1 = tail call <4 x i64> @llvm.x86.avx512.psrai.q.256(<4 x i64> %v, i32 0)
147 define <4 x i64> @avx512_psrai_q_256_15(<4 x i64> %v) {
148 ; CHECK-LABEL: @avx512_psrai_q_256_15(
149 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 15, i64 15, i64 15, i64 15>
150 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
152 %1 = tail call <4 x i64> @llvm.x86.avx512.psrai.q.256(<4 x i64> %v, i32 15)
156 define <4 x i64> @avx512_psrai_q_256_64(<4 x i64> %v) {
157 ; CHECK-LABEL: @avx512_psrai_q_256_64(
158 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 63, i64 63, i64 63, i64 63>
159 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
161 %1 = tail call <4 x i64> @llvm.x86.avx512.psrai.q.256(<4 x i64> %v, i32 64)
165 define <32 x i16> @avx512_psrai_w_512_0(<32 x i16> %v) {
166 ; CHECK-LABEL: @avx512_psrai_w_512_0(
167 ; CHECK-NEXT: ret <32 x i16> %v
169 %1 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %v, i32 0)
173 define <32 x i16> @avx512_psrai_w_512_15(<32 x i16> %v) {
174 ; CHECK-LABEL: @avx512_psrai_w_512_15(
175 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
176 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
178 %1 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %v, i32 15)
182 define <32 x i16> @avx512_psrai_w_512_64(<32 x i16> %v) {
183 ; CHECK-LABEL: @avx512_psrai_w_512_64(
184 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
185 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
187 %1 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %v, i32 64)
191 define <16 x i32> @avx512_psrai_d_512_0(<16 x i32> %v) {
192 ; CHECK-LABEL: @avx512_psrai_d_512_0(
193 ; CHECK-NEXT: ret <16 x i32> %v
195 %1 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %v, i32 0)
199 define <16 x i32> @avx512_psrai_d_512_15(<16 x i32> %v) {
200 ; CHECK-LABEL: @avx512_psrai_d_512_15(
201 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
202 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
204 %1 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %v, i32 15)
208 define <16 x i32> @avx512_psrai_d_512_64(<16 x i32> %v) {
209 ; CHECK-LABEL: @avx512_psrai_d_512_64(
210 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
211 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
213 %1 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %v, i32 64)
217 define <8 x i64> @avx512_psrai_q_512_0(<8 x i64> %v) {
218 ; CHECK-LABEL: @avx512_psrai_q_512_0(
219 ; CHECK-NEXT: ret <8 x i64> %v
221 %1 = tail call <8 x i64> @llvm.x86.avx512.psrai.q.512(<8 x i64> %v, i32 0)
225 define <8 x i64> @avx512_psrai_q_512_15(<8 x i64> %v) {
226 ; CHECK-LABEL: @avx512_psrai_q_512_15(
227 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
228 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
230 %1 = tail call <8 x i64> @llvm.x86.avx512.psrai.q.512(<8 x i64> %v, i32 15)
234 define <8 x i64> @avx512_psrai_q_512_64(<8 x i64> %v) {
235 ; CHECK-LABEL: @avx512_psrai_q_512_64(
236 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63>
237 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
239 %1 = tail call <8 x i64> @llvm.x86.avx512.psrai.q.512(<8 x i64> %v, i32 64)
247 define <8 x i16> @sse2_psrli_w_0(<8 x i16> %v) {
248 ; CHECK-LABEL: @sse2_psrli_w_0(
249 ; CHECK-NEXT: ret <8 x i16> %v
251 %1 = tail call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %v, i32 0)
255 define <8 x i16> @sse2_psrli_w_15(<8 x i16> %v) {
256 ; CHECK-LABEL: @sse2_psrli_w_15(
257 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
258 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
260 %1 = tail call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %v, i32 15)
264 define <8 x i16> @sse2_psrli_w_64(<8 x i16> %v) {
265 ; CHECK-LABEL: @sse2_psrli_w_64(
266 ; CHECK-NEXT: ret <8 x i16> zeroinitializer
268 %1 = tail call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %v, i32 64)
272 define <4 x i32> @sse2_psrli_d_0(<4 x i32> %v) {
273 ; CHECK-LABEL: @sse2_psrli_d_0(
274 ; CHECK-NEXT: ret <4 x i32> %v
276 %1 = tail call <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32> %v, i32 0)
280 define <4 x i32> @sse2_psrli_d_15(<4 x i32> %v) {
281 ; CHECK-LABEL: @sse2_psrli_d_15(
282 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i32> %v, <i32 15, i32 15, i32 15, i32 15>
283 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
285 %1 = tail call <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32> %v, i32 15)
289 define <4 x i32> @sse2_psrli_d_64(<4 x i32> %v) {
290 ; CHECK-LABEL: @sse2_psrli_d_64(
291 ; CHECK-NEXT: ret <4 x i32> zeroinitializer
293 %1 = tail call <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32> %v, i32 64)
297 define <2 x i64> @sse2_psrli_q_0(<2 x i64> %v) {
298 ; CHECK-LABEL: @sse2_psrli_q_0(
299 ; CHECK-NEXT: ret <2 x i64> %v
301 %1 = tail call <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64> %v, i32 0)
305 define <2 x i64> @sse2_psrli_q_15(<2 x i64> %v) {
306 ; CHECK-LABEL: @sse2_psrli_q_15(
307 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <2 x i64> %v, <i64 15, i64 15>
308 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
310 %1 = tail call <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64> %v, i32 15)
314 define <2 x i64> @sse2_psrli_q_64(<2 x i64> %v) {
315 ; CHECK-LABEL: @sse2_psrli_q_64(
316 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
318 %1 = tail call <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64> %v, i32 64)
322 define <16 x i16> @avx2_psrli_w_0(<16 x i16> %v) {
323 ; CHECK-LABEL: @avx2_psrli_w_0(
324 ; CHECK-NEXT: ret <16 x i16> %v
326 %1 = tail call <16 x i16> @llvm.x86.avx2.psrli.w(<16 x i16> %v, i32 0)
330 define <16 x i16> @avx2_psrli_w_15(<16 x i16> %v) {
331 ; CHECK-LABEL: @avx2_psrli_w_15(
332 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
333 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
335 %1 = tail call <16 x i16> @llvm.x86.avx2.psrli.w(<16 x i16> %v, i32 15)
339 define <16 x i16> @avx2_psrli_w_64(<16 x i16> %v) {
340 ; CHECK-LABEL: @avx2_psrli_w_64(
341 ; CHECK-NEXT: ret <16 x i16> zeroinitializer
343 %1 = tail call <16 x i16> @llvm.x86.avx2.psrli.w(<16 x i16> %v, i32 64)
347 define <8 x i32> @avx2_psrli_d_0(<8 x i32> %v) {
348 ; CHECK-LABEL: @avx2_psrli_d_0(
349 ; CHECK-NEXT: ret <8 x i32> %v
351 %1 = tail call <8 x i32> @llvm.x86.avx2.psrli.d(<8 x i32> %v, i32 0)
355 define <8 x i32> @avx2_psrli_d_15(<8 x i32> %v) {
356 ; CHECK-LABEL: @avx2_psrli_d_15(
357 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
358 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
360 %1 = tail call <8 x i32> @llvm.x86.avx2.psrli.d(<8 x i32> %v, i32 15)
364 define <8 x i32> @avx2_psrli_d_64(<8 x i32> %v) {
365 ; CHECK-LABEL: @avx2_psrli_d_64(
366 ; CHECK-NEXT: ret <8 x i32> zeroinitializer
368 %1 = tail call <8 x i32> @llvm.x86.avx2.psrli.d(<8 x i32> %v, i32 64)
372 define <4 x i64> @avx2_psrli_q_0(<4 x i64> %v) {
373 ; CHECK-LABEL: @avx2_psrli_q_0(
374 ; CHECK-NEXT: ret <4 x i64> %v
376 %1 = tail call <4 x i64> @llvm.x86.avx2.psrli.q(<4 x i64> %v, i32 0)
380 define <4 x i64> @avx2_psrli_q_15(<4 x i64> %v) {
381 ; CHECK-LABEL: @avx2_psrli_q_15(
382 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i64> %v, <i64 15, i64 15, i64 15, i64 15>
383 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
385 %1 = tail call <4 x i64> @llvm.x86.avx2.psrli.q(<4 x i64> %v, i32 15)
389 define <4 x i64> @avx2_psrli_q_64(<4 x i64> %v) {
390 ; CHECK-LABEL: @avx2_psrli_q_64(
391 ; CHECK-NEXT: ret <4 x i64> zeroinitializer
393 %1 = tail call <4 x i64> @llvm.x86.avx2.psrli.q(<4 x i64> %v, i32 64)
397 define <32 x i16> @avx512_psrli_w_512_0(<32 x i16> %v) {
398 ; CHECK-LABEL: @avx512_psrli_w_512_0(
399 ; CHECK-NEXT: ret <32 x i16> %v
401 %1 = tail call <32 x i16> @llvm.x86.avx512.psrli.w.512(<32 x i16> %v, i32 0)
405 define <32 x i16> @avx512_psrli_w_512_15(<32 x i16> %v) {
406 ; CHECK-LABEL: @avx512_psrli_w_512_15(
407 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
408 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
410 %1 = tail call <32 x i16> @llvm.x86.avx512.psrli.w.512(<32 x i16> %v, i32 15)
414 define <32 x i16> @avx512_psrli_w_512_64(<32 x i16> %v) {
415 ; CHECK-LABEL: @avx512_psrli_w_512_64(
416 ; CHECK-NEXT: ret <32 x i16> zeroinitializer
418 %1 = tail call <32 x i16> @llvm.x86.avx512.psrli.w.512(<32 x i16> %v, i32 64)
422 define <16 x i32> @avx512_psrli_d_512_0(<16 x i32> %v) {
423 ; CHECK-LABEL: @avx512_psrli_d_512_0(
424 ; CHECK-NEXT: ret <16 x i32> %v
426 %1 = tail call <16 x i32> @llvm.x86.avx512.psrli.d.512(<16 x i32> %v, i32 0)
430 define <16 x i32> @avx512_psrli_d_512_15(<16 x i32> %v) {
431 ; CHECK-LABEL: @avx512_psrli_d_512_15(
432 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
433 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
435 %1 = tail call <16 x i32> @llvm.x86.avx512.psrli.d.512(<16 x i32> %v, i32 15)
439 define <16 x i32> @avx512_psrli_d_512_64(<16 x i32> %v) {
440 ; CHECK-LABEL: @avx512_psrli_d_512_64(
441 ; CHECK-NEXT: ret <16 x i32> zeroinitializer
443 %1 = tail call <16 x i32> @llvm.x86.avx512.psrli.d.512(<16 x i32> %v, i32 64)
447 define <8 x i64> @avx512_psrli_q_512_0(<8 x i64> %v) {
448 ; CHECK-LABEL: @avx512_psrli_q_512_0(
449 ; CHECK-NEXT: ret <8 x i64> %v
451 %1 = tail call <8 x i64> @llvm.x86.avx512.psrli.q.512(<8 x i64> %v, i32 0)
455 define <8 x i64> @avx512_psrli_q_512_15(<8 x i64> %v) {
456 ; CHECK-LABEL: @avx512_psrli_q_512_15(
457 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i64> %v, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
458 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
460 %1 = tail call <8 x i64> @llvm.x86.avx512.psrli.q.512(<8 x i64> %v, i32 15)
464 define <8 x i64> @avx512_psrli_q_512_64(<8 x i64> %v) {
465 ; CHECK-LABEL: @avx512_psrli_q_512_64(
466 ; CHECK-NEXT: ret <8 x i64> zeroinitializer
468 %1 = tail call <8 x i64> @llvm.x86.avx512.psrli.q.512(<8 x i64> %v, i32 64)
476 define <8 x i16> @sse2_pslli_w_0(<8 x i16> %v) {
477 ; CHECK-LABEL: @sse2_pslli_w_0(
478 ; CHECK-NEXT: ret <8 x i16> %v
480 %1 = tail call <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16> %v, i32 0)
484 define <8 x i16> @sse2_pslli_w_15(<8 x i16> %v) {
485 ; CHECK-LABEL: @sse2_pslli_w_15(
486 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
487 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
489 %1 = tail call <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16> %v, i32 15)
493 define <8 x i16> @sse2_pslli_w_64(<8 x i16> %v) {
494 ; CHECK-LABEL: @sse2_pslli_w_64(
495 ; CHECK-NEXT: ret <8 x i16> zeroinitializer
497 %1 = tail call <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16> %v, i32 64)
501 define <4 x i32> @sse2_pslli_d_0(<4 x i32> %v) {
502 ; CHECK-LABEL: @sse2_pslli_d_0(
503 ; CHECK-NEXT: ret <4 x i32> %v
505 %1 = tail call <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32> %v, i32 0)
509 define <4 x i32> @sse2_pslli_d_15(<4 x i32> %v) {
510 ; CHECK-LABEL: @sse2_pslli_d_15(
511 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i32> %v, <i32 15, i32 15, i32 15, i32 15>
512 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
514 %1 = tail call <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32> %v, i32 15)
518 define <4 x i32> @sse2_pslli_d_64(<4 x i32> %v) {
519 ; CHECK-LABEL: @sse2_pslli_d_64(
520 ; CHECK-NEXT: ret <4 x i32> zeroinitializer
522 %1 = tail call <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32> %v, i32 64)
526 define <2 x i64> @sse2_pslli_q_0(<2 x i64> %v) {
527 ; CHECK-LABEL: @sse2_pslli_q_0(
528 ; CHECK-NEXT: ret <2 x i64> %v
530 %1 = tail call <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64> %v, i32 0)
534 define <2 x i64> @sse2_pslli_q_15(<2 x i64> %v) {
535 ; CHECK-LABEL: @sse2_pslli_q_15(
536 ; CHECK-NEXT: [[TMP1:%.*]] = shl <2 x i64> %v, <i64 15, i64 15>
537 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
539 %1 = tail call <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64> %v, i32 15)
543 define <2 x i64> @sse2_pslli_q_64(<2 x i64> %v) {
544 ; CHECK-LABEL: @sse2_pslli_q_64(
545 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
547 %1 = tail call <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64> %v, i32 64)
551 define <16 x i16> @avx2_pslli_w_0(<16 x i16> %v) {
552 ; CHECK-LABEL: @avx2_pslli_w_0(
553 ; CHECK-NEXT: ret <16 x i16> %v
555 %1 = tail call <16 x i16> @llvm.x86.avx2.pslli.w(<16 x i16> %v, i32 0)
559 define <16 x i16> @avx2_pslli_w_15(<16 x i16> %v) {
560 ; CHECK-LABEL: @avx2_pslli_w_15(
561 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
562 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
564 %1 = tail call <16 x i16> @llvm.x86.avx2.pslli.w(<16 x i16> %v, i32 15)
568 define <16 x i16> @avx2_pslli_w_64(<16 x i16> %v) {
569 ; CHECK-LABEL: @avx2_pslli_w_64(
570 ; CHECK-NEXT: ret <16 x i16> zeroinitializer
572 %1 = tail call <16 x i16> @llvm.x86.avx2.pslli.w(<16 x i16> %v, i32 64)
576 define <8 x i32> @avx2_pslli_d_0(<8 x i32> %v) {
577 ; CHECK-LABEL: @avx2_pslli_d_0(
578 ; CHECK-NEXT: ret <8 x i32> %v
580 %1 = tail call <8 x i32> @llvm.x86.avx2.pslli.d(<8 x i32> %v, i32 0)
584 define <8 x i32> @avx2_pslli_d_15(<8 x i32> %v) {
585 ; CHECK-LABEL: @avx2_pslli_d_15(
586 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
587 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
589 %1 = tail call <8 x i32> @llvm.x86.avx2.pslli.d(<8 x i32> %v, i32 15)
593 define <8 x i32> @avx2_pslli_d_64(<8 x i32> %v) {
594 ; CHECK-LABEL: @avx2_pslli_d_64(
595 ; CHECK-NEXT: ret <8 x i32> zeroinitializer
597 %1 = tail call <8 x i32> @llvm.x86.avx2.pslli.d(<8 x i32> %v, i32 64)
601 define <4 x i64> @avx2_pslli_q_0(<4 x i64> %v) {
602 ; CHECK-LABEL: @avx2_pslli_q_0(
603 ; CHECK-NEXT: ret <4 x i64> %v
605 %1 = tail call <4 x i64> @llvm.x86.avx2.pslli.q(<4 x i64> %v, i32 0)
609 define <4 x i64> @avx2_pslli_q_15(<4 x i64> %v) {
610 ; CHECK-LABEL: @avx2_pslli_q_15(
611 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i64> %v, <i64 15, i64 15, i64 15, i64 15>
612 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
614 %1 = tail call <4 x i64> @llvm.x86.avx2.pslli.q(<4 x i64> %v, i32 15)
618 define <4 x i64> @avx2_pslli_q_64(<4 x i64> %v) {
619 ; CHECK-LABEL: @avx2_pslli_q_64(
620 ; CHECK-NEXT: ret <4 x i64> zeroinitializer
622 %1 = tail call <4 x i64> @llvm.x86.avx2.pslli.q(<4 x i64> %v, i32 64)
626 define <32 x i16> @avx512_pslli_w_512_0(<32 x i16> %v) {
627 ; CHECK-LABEL: @avx512_pslli_w_512_0(
628 ; CHECK-NEXT: ret <32 x i16> %v
630 %1 = tail call <32 x i16> @llvm.x86.avx512.pslli.w.512(<32 x i16> %v, i32 0)
634 define <32 x i16> @avx512_pslli_w_512_15(<32 x i16> %v) {
635 ; CHECK-LABEL: @avx512_pslli_w_512_15(
636 ; CHECK-NEXT: [[TMP1:%.*]] = shl <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
637 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
639 %1 = tail call <32 x i16> @llvm.x86.avx512.pslli.w.512(<32 x i16> %v, i32 15)
643 define <32 x i16> @avx512_pslli_w_512_64(<32 x i16> %v) {
644 ; CHECK-LABEL: @avx512_pslli_w_512_64(
645 ; CHECK-NEXT: ret <32 x i16> zeroinitializer
647 %1 = tail call <32 x i16> @llvm.x86.avx512.pslli.w.512(<32 x i16> %v, i32 64)
651 define <16 x i32> @avx512_pslli_d_512_0(<16 x i32> %v) {
652 ; CHECK-LABEL: @avx512_pslli_d_512_0(
653 ; CHECK-NEXT: ret <16 x i32> %v
655 %1 = tail call <16 x i32> @llvm.x86.avx512.pslli.d.512(<16 x i32> %v, i32 0)
659 define <16 x i32> @avx512_pslli_d_512_15(<16 x i32> %v) {
660 ; CHECK-LABEL: @avx512_pslli_d_512_15(
661 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
662 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
664 %1 = tail call <16 x i32> @llvm.x86.avx512.pslli.d.512(<16 x i32> %v, i32 15)
668 define <16 x i32> @avx512_pslli_d_512_64(<16 x i32> %v) {
669 ; CHECK-LABEL: @avx512_pslli_d_512_64(
670 ; CHECK-NEXT: ret <16 x i32> zeroinitializer
672 %1 = tail call <16 x i32> @llvm.x86.avx512.pslli.d.512(<16 x i32> %v, i32 64)
676 define <8 x i64> @avx512_pslli_q_512_0(<8 x i64> %v) {
677 ; CHECK-LABEL: @avx512_pslli_q_512_0(
678 ; CHECK-NEXT: ret <8 x i64> %v
680 %1 = tail call <8 x i64> @llvm.x86.avx512.pslli.q.512(<8 x i64> %v, i32 0)
684 define <8 x i64> @avx512_pslli_q_512_15(<8 x i64> %v) {
685 ; CHECK-LABEL: @avx512_pslli_q_512_15(
686 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i64> %v, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
687 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
689 %1 = tail call <8 x i64> @llvm.x86.avx512.pslli.q.512(<8 x i64> %v, i32 15)
693 define <8 x i64> @avx512_pslli_q_512_64(<8 x i64> %v) {
694 ; CHECK-LABEL: @avx512_pslli_q_512_64(
695 ; CHECK-NEXT: ret <8 x i64> zeroinitializer
697 %1 = tail call <8 x i64> @llvm.x86.avx512.pslli.q.512(<8 x i64> %v, i32 64)
702 ; ASHR - Constant Vector
705 define <8 x i16> @sse2_psra_w_0(<8 x i16> %v) {
706 ; CHECK-LABEL: @sse2_psra_w_0(
707 ; CHECK-NEXT: ret <8 x i16> %v
709 %1 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> zeroinitializer)
713 define <8 x i16> @sse2_psra_w_15(<8 x i16> %v) {
714 ; CHECK-LABEL: @sse2_psra_w_15(
715 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
716 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
718 %1 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
722 define <8 x i16> @sse2_psra_w_15_splat(<8 x i16> %v) {
723 ; CHECK-LABEL: @sse2_psra_w_15_splat(
724 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
725 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
727 %1 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
731 define <8 x i16> @sse2_psra_w_64(<8 x i16> %v) {
732 ; CHECK-LABEL: @sse2_psra_w_64(
733 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
734 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
736 %1 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
740 define <4 x i32> @sse2_psra_d_0(<4 x i32> %v) {
741 ; CHECK-LABEL: @sse2_psra_d_0(
742 ; CHECK-NEXT: ret <4 x i32> %v
744 %1 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> zeroinitializer)
748 define <4 x i32> @sse2_psra_d_15(<4 x i32> %v) {
749 ; CHECK-LABEL: @sse2_psra_d_15(
750 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 15, i32 15, i32 15, i32 15>
751 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
753 %1 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
757 define <4 x i32> @sse2_psra_d_15_splat(<4 x i32> %v) {
758 ; CHECK-LABEL: @sse2_psra_d_15_splat(
759 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 31, i32 31, i32 31, i32 31>
760 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
762 %1 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
766 define <4 x i32> @sse2_psra_d_64(<4 x i32> %v) {
767 ; CHECK-LABEL: @sse2_psra_d_64(
768 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 31, i32 31, i32 31, i32 31>
769 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
771 %1 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
775 define <16 x i16> @avx2_psra_w_0(<16 x i16> %v) {
776 ; CHECK-LABEL: @avx2_psra_w_0(
777 ; CHECK-NEXT: ret <16 x i16> %v
779 %1 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %v, <8 x i16> zeroinitializer)
783 define <16 x i16> @avx2_psra_w_15(<16 x i16> %v) {
784 ; CHECK-LABEL: @avx2_psra_w_15(
785 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
786 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
788 %1 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
792 define <16 x i16> @avx2_psra_w_15_splat(<16 x i16> %v) {
793 ; CHECK-LABEL: @avx2_psra_w_15_splat(
794 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
795 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
797 %1 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
801 define <16 x i16> @avx2_psra_w_64(<16 x i16> %v) {
802 ; CHECK-LABEL: @avx2_psra_w_64(
803 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
804 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
806 %1 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
810 define <8 x i32> @avx2_psra_d_0(<8 x i32> %v) {
811 ; CHECK-LABEL: @avx2_psra_d_0(
812 ; CHECK-NEXT: ret <8 x i32> %v
814 %1 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %v, <4 x i32> zeroinitializer)
818 define <8 x i32> @avx2_psra_d_15(<8 x i32> %v) {
819 ; CHECK-LABEL: @avx2_psra_d_15(
820 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
821 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
823 %1 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
827 define <8 x i32> @avx2_psra_d_15_splat(<8 x i32> %v) {
828 ; CHECK-LABEL: @avx2_psra_d_15_splat(
829 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
830 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
832 %1 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
836 define <8 x i32> @avx2_psra_d_64(<8 x i32> %v) {
837 ; CHECK-LABEL: @avx2_psra_d_64(
838 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
839 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
841 %1 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
845 define <2 x i64> @avx512_psra_q_128_0(<2 x i64> %v) {
846 ; CHECK-LABEL: @avx512_psra_q_128_0(
847 ; CHECK-NEXT: ret <2 x i64> %v
849 %1 = tail call <2 x i64> @llvm.x86.avx512.psra.q.128(<2 x i64> %v, <2 x i64> zeroinitializer)
853 define <2 x i64> @avx512_psra_q_128_15(<2 x i64> %v) {
854 ; CHECK-LABEL: @avx512_psra_q_128_15(
855 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 15, i64 15>
856 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
858 %1 = tail call <2 x i64> @llvm.x86.avx512.psra.q.128(<2 x i64> %v, <2 x i64> <i64 15, i64 9999>)
862 define <2 x i64> @avx512_psra_q_128_64(<2 x i64> %v) {
863 ; CHECK-LABEL: @avx512_psra_q_128_64(
864 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 63, i64 63>
865 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
867 %1 = tail call <2 x i64> @llvm.x86.avx512.psra.q.128(<2 x i64> %v, <2 x i64> <i64 64, i64 9999>)
871 define <4 x i64> @avx512_psra_q_256_0(<4 x i64> %v) {
872 ; CHECK-LABEL: @avx512_psra_q_256_0(
873 ; CHECK-NEXT: ret <4 x i64> %v
875 %1 = tail call <4 x i64> @llvm.x86.avx512.psra.q.256(<4 x i64> %v, <2 x i64> zeroinitializer)
879 define <4 x i64> @avx512_psra_q_256_15(<4 x i64> %v) {
880 ; CHECK-LABEL: @avx512_psra_q_256_15(
881 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 15, i64 15, i64 15, i64 15>
882 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
884 %1 = tail call <4 x i64> @llvm.x86.avx512.psra.q.256(<4 x i64> %v, <2 x i64> <i64 15, i64 9999>)
888 define <4 x i64> @avx512_psra_q_256_64(<4 x i64> %v) {
889 ; CHECK-LABEL: @avx512_psra_q_256_64(
890 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 63, i64 63, i64 63, i64 63>
891 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
893 %1 = tail call <4 x i64> @llvm.x86.avx512.psra.q.256(<4 x i64> %v, <2 x i64> <i64 64, i64 9999>)
897 define <32 x i16> @avx512_psra_w_512_0(<32 x i16> %v) {
898 ; CHECK-LABEL: @avx512_psra_w_512_0(
899 ; CHECK-NEXT: ret <32 x i16> %v
901 %1 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %v, <8 x i16> zeroinitializer)
905 define <32 x i16> @avx512_psra_w_512_15(<32 x i16> %v) {
906 ; CHECK-LABEL: @avx512_psra_w_512_15(
907 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
908 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
910 %1 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
914 define <32 x i16> @avx512_psra_w_512_15_splat(<32 x i16> %v) {
915 ; CHECK-LABEL: @avx512_psra_w_512_15_splat(
916 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
917 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
919 %1 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
923 define <32 x i16> @avx512_psra_w_512_64(<32 x i16> %v) {
924 ; CHECK-LABEL: @avx512_psra_w_512_64(
925 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
926 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
928 %1 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
932 define <16 x i32> @avx512_psra_d_512_0(<16 x i32> %v) {
933 ; CHECK-LABEL: @avx512_psra_d_512_0(
934 ; CHECK-NEXT: ret <16 x i32> %v
936 %1 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %v, <4 x i32> zeroinitializer)
940 define <16 x i32> @avx512_psra_d_512_15(<16 x i32> %v) {
941 ; CHECK-LABEL: @avx512_psra_d_512_15(
942 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
943 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
945 %1 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
949 define <16 x i32> @avx512_psra_d_512_15_splat(<16 x i32> %v) {
950 ; CHECK-LABEL: @avx512_psra_d_512_15_splat(
951 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
952 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
954 %1 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
958 define <16 x i32> @avx512_psra_d_512_64(<16 x i32> %v) {
959 ; CHECK-LABEL: @avx512_psra_d_512_64(
960 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
961 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
963 %1 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
967 define <8 x i64> @avx512_psra_q_512_0(<8 x i64> %v) {
968 ; CHECK-LABEL: @avx512_psra_q_512_0(
969 ; CHECK-NEXT: ret <8 x i64> %v
971 %1 = tail call <8 x i64> @llvm.x86.avx512.psra.q.512(<8 x i64> %v, <2 x i64> zeroinitializer)
975 define <8 x i64> @avx512_psra_q_512_15(<8 x i64> %v) {
976 ; CHECK-LABEL: @avx512_psra_q_512_15(
977 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
978 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
980 %1 = tail call <8 x i64> @llvm.x86.avx512.psra.q.512(<8 x i64> %v, <2 x i64> <i64 15, i64 9999>)
984 define <8 x i64> @avx512_psra_q_512_64(<8 x i64> %v) {
985 ; CHECK-LABEL: @avx512_psra_q_512_64(
986 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63, i64 63>
987 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
989 %1 = tail call <8 x i64> @llvm.x86.avx512.psra.q.512(<8 x i64> %v, <2 x i64> <i64 64, i64 9999>)
994 ; LSHR - Constant Vector
997 define <8 x i16> @sse2_psrl_w_0(<8 x i16> %v) {
998 ; CHECK-LABEL: @sse2_psrl_w_0(
999 ; CHECK-NEXT: ret <8 x i16> %v
1001 %1 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %v, <8 x i16> zeroinitializer)
1005 define <8 x i16> @sse2_psrl_w_15(<8 x i16> %v) {
1006 ; CHECK-LABEL: @sse2_psrl_w_15(
1007 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1008 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
1010 %1 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1014 define <8 x i16> @sse2_psrl_w_15_splat(<8 x i16> %v) {
1015 ; CHECK-LABEL: @sse2_psrl_w_15_splat(
1016 ; CHECK-NEXT: ret <8 x i16> zeroinitializer
1018 %1 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
1022 define <8 x i16> @sse2_psrl_w_64(<8 x i16> %v) {
1023 ; CHECK-LABEL: @sse2_psrl_w_64(
1024 ; CHECK-NEXT: ret <8 x i16> zeroinitializer
1026 %1 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1030 define <4 x i32> @sse2_psrl_d_0(<4 x i32> %v) {
1031 ; CHECK-LABEL: @sse2_psrl_d_0(
1032 ; CHECK-NEXT: ret <4 x i32> %v
1034 %1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> zeroinitializer)
1038 define <4 x i32> @sse2_psrl_d_15(<4 x i32> %v) {
1039 ; CHECK-LABEL: @sse2_psrl_d_15(
1040 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i32> %v, <i32 15, i32 15, i32 15, i32 15>
1041 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1043 %1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
1047 define <4 x i32> @sse2_psrl_d_15_splat(<4 x i32> %v) {
1048 ; CHECK-LABEL: @sse2_psrl_d_15_splat(
1049 ; CHECK-NEXT: ret <4 x i32> zeroinitializer
1051 %1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
1055 define <4 x i32> @sse2_psrl_d_64(<4 x i32> %v) {
1056 ; CHECK-LABEL: @sse2_psrl_d_64(
1057 ; CHECK-NEXT: ret <4 x i32> zeroinitializer
1059 %1 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
1063 define <2 x i64> @sse2_psrl_q_0(<2 x i64> %v) {
1064 ; CHECK-LABEL: @sse2_psrl_q_0(
1065 ; CHECK-NEXT: ret <2 x i64> %v
1067 %1 = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %v, <2 x i64> zeroinitializer)
1071 define <2 x i64> @sse2_psrl_q_15(<2 x i64> %v) {
1072 ; CHECK-LABEL: @sse2_psrl_q_15(
1073 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <2 x i64> %v, <i64 15, i64 15>
1074 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
1076 %1 = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %v, <2 x i64> <i64 15, i64 9999>)
1080 define <2 x i64> @sse2_psrl_q_64(<2 x i64> %v) {
1081 ; CHECK-LABEL: @sse2_psrl_q_64(
1082 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
1084 %1 = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %v, <2 x i64> <i64 64, i64 9999>)
1088 define <16 x i16> @avx2_psrl_w_0(<16 x i16> %v) {
1089 ; CHECK-LABEL: @avx2_psrl_w_0(
1090 ; CHECK-NEXT: ret <16 x i16> %v
1092 %1 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> zeroinitializer)
1096 define <16 x i16> @avx2_psrl_w_15(<16 x i16> %v) {
1097 ; CHECK-LABEL: @avx2_psrl_w_15(
1098 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1099 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
1101 %1 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1105 define <16 x i16> @avx2_psrl_w_15_splat(<16 x i16> %v) {
1106 ; CHECK-LABEL: @avx2_psrl_w_15_splat(
1107 ; CHECK-NEXT: ret <16 x i16> zeroinitializer
1109 %1 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
1113 define <16 x i16> @avx2_psrl_w_64(<16 x i16> %v) {
1114 ; CHECK-LABEL: @avx2_psrl_w_64(
1115 ; CHECK-NEXT: ret <16 x i16> zeroinitializer
1117 %1 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1121 define <8 x i32> @avx2_psrl_d_0(<8 x i32> %v) {
1122 ; CHECK-LABEL: @avx2_psrl_d_0(
1123 ; CHECK-NEXT: ret <8 x i32> %v
1125 %1 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> zeroinitializer)
1129 define <8 x i32> @avx2_psrl_d_15(<8 x i32> %v) {
1130 ; CHECK-LABEL: @avx2_psrl_d_15(
1131 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
1132 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1134 %1 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
1138 define <8 x i32> @avx2_psrl_d_15_splat(<8 x i32> %v) {
1139 ; CHECK-LABEL: @avx2_psrl_d_15_splat(
1140 ; CHECK-NEXT: ret <8 x i32> zeroinitializer
1142 %1 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
1146 define <8 x i32> @avx2_psrl_d_64(<8 x i32> %v) {
1147 ; CHECK-LABEL: @avx2_psrl_d_64(
1148 ; CHECK-NEXT: ret <8 x i32> zeroinitializer
1150 %1 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
1154 define <4 x i64> @avx2_psrl_q_0(<4 x i64> %v) {
1155 ; CHECK-LABEL: @avx2_psrl_q_0(
1156 ; CHECK-NEXT: ret <4 x i64> %v
1158 %1 = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %v, <2 x i64> zeroinitializer)
1162 define <4 x i64> @avx2_psrl_q_15(<4 x i64> %v) {
1163 ; CHECK-LABEL: @avx2_psrl_q_15(
1164 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i64> %v, <i64 15, i64 15, i64 15, i64 15>
1165 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
1167 %1 = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %v, <2 x i64> <i64 15, i64 9999>)
1171 define <4 x i64> @avx2_psrl_q_64(<4 x i64> %v) {
1172 ; CHECK-LABEL: @avx2_psrl_q_64(
1173 ; CHECK-NEXT: ret <4 x i64> zeroinitializer
1175 %1 = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %v, <2 x i64> <i64 64, i64 9999>)
1179 define <32 x i16> @avx512_psrl_w_512_0(<32 x i16> %v) {
1180 ; CHECK-LABEL: @avx512_psrl_w_512_0(
1181 ; CHECK-NEXT: ret <32 x i16> %v
1183 %1 = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> zeroinitializer)
1187 define <32 x i16> @avx512_psrl_w_512_15(<32 x i16> %v) {
1188 ; CHECK-LABEL: @avx512_psrl_w_512_15(
1189 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1190 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
1192 %1 = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1196 define <32 x i16> @avx512_psrl_w_512_15_splat(<32 x i16> %v) {
1197 ; CHECK-LABEL: @avx512_psrl_w_512_15_splat(
1198 ; CHECK-NEXT: ret <32 x i16> zeroinitializer
1200 %1 = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
1204 define <32 x i16> @avx512_psrl_w_512_64(<32 x i16> %v) {
1205 ; CHECK-LABEL: @avx512_psrl_w_512_64(
1206 ; CHECK-NEXT: ret <32 x i16> zeroinitializer
1208 %1 = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1212 define <16 x i32> @avx512_psrl_d_512_0(<16 x i32> %v) {
1213 ; CHECK-LABEL: @avx512_psrl_d_512_0(
1214 ; CHECK-NEXT: ret <16 x i32> %v
1216 %1 = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> zeroinitializer)
1220 define <16 x i32> @avx512_psrl_d_512_15(<16 x i32> %v) {
1221 ; CHECK-LABEL: @avx512_psrl_d_512_15(
1222 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
1223 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
1225 %1 = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
1229 define <16 x i32> @avx512_psrl_d_512_15_splat(<16 x i32> %v) {
1230 ; CHECK-LABEL: @avx512_psrl_d_512_15_splat(
1231 ; CHECK-NEXT: ret <16 x i32> zeroinitializer
1233 %1 = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
1237 define <16 x i32> @avx512_psrl_d_512_64(<16 x i32> %v) {
1238 ; CHECK-LABEL: @avx512_psrl_d_512_64(
1239 ; CHECK-NEXT: ret <16 x i32> zeroinitializer
1241 %1 = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
1245 define <8 x i64> @avx512_psrl_q_512_0(<8 x i64> %v) {
1246 ; CHECK-LABEL: @avx512_psrl_q_512_0(
1247 ; CHECK-NEXT: ret <8 x i64> %v
1249 %1 = tail call <8 x i64> @llvm.x86.avx512.psrl.q.512(<8 x i64> %v, <2 x i64> zeroinitializer)
1253 define <8 x i64> @avx512_psrl_q_512_15(<8 x i64> %v) {
1254 ; CHECK-LABEL: @avx512_psrl_q_512_15(
1255 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i64> %v, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
1256 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
1258 %1 = tail call <8 x i64> @llvm.x86.avx512.psrl.q.512(<8 x i64> %v, <2 x i64> <i64 15, i64 9999>)
1262 define <8 x i64> @avx512_psrl_q_512_64(<8 x i64> %v) {
1263 ; CHECK-LABEL: @avx512_psrl_q_512_64(
1264 ; CHECK-NEXT: ret <8 x i64> zeroinitializer
1266 %1 = tail call <8 x i64> @llvm.x86.avx512.psrl.q.512(<8 x i64> %v, <2 x i64> <i64 64, i64 9999>)
1271 ; SHL - Constant Vector
1274 define <8 x i16> @sse2_psll_w_0(<8 x i16> %v) {
1275 ; CHECK-LABEL: @sse2_psll_w_0(
1276 ; CHECK-NEXT: ret <8 x i16> %v
1278 %1 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %v, <8 x i16> zeroinitializer)
1282 define <8 x i16> @sse2_psll_w_15(<8 x i16> %v) {
1283 ; CHECK-LABEL: @sse2_psll_w_15(
1284 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1285 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
1287 %1 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1291 define <8 x i16> @sse2_psll_w_15_splat(<8 x i16> %v) {
1292 ; CHECK-LABEL: @sse2_psll_w_15_splat(
1293 ; CHECK-NEXT: ret <8 x i16> zeroinitializer
1295 %1 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
1299 define <8 x i16> @sse2_psll_w_64(<8 x i16> %v) {
1300 ; CHECK-LABEL: @sse2_psll_w_64(
1301 ; CHECK-NEXT: ret <8 x i16> zeroinitializer
1303 %1 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1307 define <4 x i32> @sse2_psll_d_0(<4 x i32> %v) {
1308 ; CHECK-LABEL: @sse2_psll_d_0(
1309 ; CHECK-NEXT: ret <4 x i32> %v
1311 %1 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %v, <4 x i32> zeroinitializer)
1315 define <4 x i32> @sse2_psll_d_15(<4 x i32> %v) {
1316 ; CHECK-LABEL: @sse2_psll_d_15(
1317 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i32> %v, <i32 15, i32 15, i32 15, i32 15>
1318 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1320 %1 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
1324 define <4 x i32> @sse2_psll_d_15_splat(<4 x i32> %v) {
1325 ; CHECK-LABEL: @sse2_psll_d_15_splat(
1326 ; CHECK-NEXT: ret <4 x i32> zeroinitializer
1328 %1 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
1332 define <4 x i32> @sse2_psll_d_64(<4 x i32> %v) {
1333 ; CHECK-LABEL: @sse2_psll_d_64(
1334 ; CHECK-NEXT: ret <4 x i32> zeroinitializer
1336 %1 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
1340 define <2 x i64> @sse2_psll_q_0(<2 x i64> %v) {
1341 ; CHECK-LABEL: @sse2_psll_q_0(
1342 ; CHECK-NEXT: ret <2 x i64> %v
1344 %1 = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %v, <2 x i64> zeroinitializer)
1348 define <2 x i64> @sse2_psll_q_15(<2 x i64> %v) {
1349 ; CHECK-LABEL: @sse2_psll_q_15(
1350 ; CHECK-NEXT: [[TMP1:%.*]] = shl <2 x i64> %v, <i64 15, i64 15>
1351 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
1353 %1 = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %v, <2 x i64> <i64 15, i64 9999>)
1357 define <2 x i64> @sse2_psll_q_64(<2 x i64> %v) {
1358 ; CHECK-LABEL: @sse2_psll_q_64(
1359 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
1361 %1 = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %v, <2 x i64> <i64 64, i64 9999>)
1365 define <16 x i16> @avx2_psll_w_0(<16 x i16> %v) {
1366 ; CHECK-LABEL: @avx2_psll_w_0(
1367 ; CHECK-NEXT: ret <16 x i16> %v
1369 %1 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> %v, <8 x i16> zeroinitializer)
1373 define <16 x i16> @avx2_psll_w_15(<16 x i16> %v) {
1374 ; CHECK-LABEL: @avx2_psll_w_15(
1375 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1376 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
1378 %1 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1382 define <16 x i16> @avx2_psll_w_15_splat(<16 x i16> %v) {
1383 ; CHECK-LABEL: @avx2_psll_w_15_splat(
1384 ; CHECK-NEXT: ret <16 x i16> zeroinitializer
1386 %1 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
1390 define <16 x i16> @avx2_psll_w_64(<16 x i16> %v) {
1391 ; CHECK-LABEL: @avx2_psll_w_64(
1392 ; CHECK-NEXT: ret <16 x i16> zeroinitializer
1394 %1 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1398 define <8 x i32> @avx2_psll_d_0(<8 x i32> %v) {
1399 ; CHECK-LABEL: @avx2_psll_d_0(
1400 ; CHECK-NEXT: ret <8 x i32> %v
1402 %1 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %v, <4 x i32> zeroinitializer)
1406 define <8 x i32> @avx2_psll_d_15(<8 x i32> %v) {
1407 ; CHECK-LABEL: @avx2_psll_d_15(
1408 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
1409 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1411 %1 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
1415 define <8 x i32> @avx2_psll_d_15_splat(<8 x i32> %v) {
1416 ; CHECK-LABEL: @avx2_psll_d_15_splat(
1417 ; CHECK-NEXT: ret <8 x i32> zeroinitializer
1419 %1 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
1423 define <8 x i32> @avx2_psll_d_64(<8 x i32> %v) {
1424 ; CHECK-LABEL: @avx2_psll_d_64(
1425 ; CHECK-NEXT: ret <8 x i32> zeroinitializer
1427 %1 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
1431 define <4 x i64> @avx2_psll_q_0(<4 x i64> %v) {
1432 ; CHECK-LABEL: @avx2_psll_q_0(
1433 ; CHECK-NEXT: ret <4 x i64> %v
1435 %1 = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %v, <2 x i64> zeroinitializer)
1439 define <4 x i64> @avx2_psll_q_15(<4 x i64> %v) {
1440 ; CHECK-LABEL: @avx2_psll_q_15(
1441 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i64> %v, <i64 15, i64 15, i64 15, i64 15>
1442 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
1444 %1 = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %v, <2 x i64> <i64 15, i64 9999>)
1448 define <4 x i64> @avx2_psll_q_64(<4 x i64> %v) {
1449 ; CHECK-LABEL: @avx2_psll_q_64(
1450 ; CHECK-NEXT: ret <4 x i64> zeroinitializer
1452 %1 = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %v, <2 x i64> <i64 64, i64 9999>)
1456 define <32 x i16> @avx512_psll_w_512_0(<32 x i16> %v) {
1457 ; CHECK-LABEL: @avx512_psll_w_512_0(
1458 ; CHECK-NEXT: ret <32 x i16> %v
1460 %1 = tail call <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16> %v, <8 x i16> zeroinitializer)
1464 define <32 x i16> @avx512_psll_w_512_15(<32 x i16> %v) {
1465 ; CHECK-LABEL: @avx512_psll_w_512_15(
1466 ; CHECK-NEXT: [[TMP1:%.*]] = shl <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1467 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
1469 %1 = tail call <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16> %v, <8 x i16> <i16 15, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1473 define <32 x i16> @avx512_psll_w_15_512_splat(<32 x i16> %v) {
1474 ; CHECK-LABEL: @avx512_psll_w_15_512_splat(
1475 ; CHECK-NEXT: ret <32 x i16> zeroinitializer
1477 %1 = tail call <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16> %v, <8 x i16> <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>)
1481 define <32 x i16> @avx512_psll_w_512_64(<32 x i16> %v) {
1482 ; CHECK-LABEL: @avx512_psll_w_512_64(
1483 ; CHECK-NEXT: ret <32 x i16> zeroinitializer
1485 %1 = tail call <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16> %v, <8 x i16> <i16 64, i16 0, i16 0, i16 0, i16 9999, i16 9999, i16 9999, i16 9999>)
1489 define <16 x i32> @avx512_psll_d_512_0(<16 x i32> %v) {
1490 ; CHECK-LABEL: @avx512_psll_d_512_0(
1491 ; CHECK-NEXT: ret <16 x i32> %v
1493 %1 = tail call <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32> %v, <4 x i32> zeroinitializer)
1497 define <16 x i32> @avx512_psll_d_512_15(<16 x i32> %v) {
1498 ; CHECK-LABEL: @avx512_psll_d_512_15(
1499 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i32> %v, <i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15, i32 15>
1500 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
1502 %1 = tail call <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32> %v, <4 x i32> <i32 15, i32 0, i32 9999, i32 9999>)
1506 define <16 x i32> @avx512_psll_d_512_15_splat(<16 x i32> %v) {
1507 ; CHECK-LABEL: @avx512_psll_d_512_15_splat(
1508 ; CHECK-NEXT: ret <16 x i32> zeroinitializer
1510 %1 = tail call <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32> %v, <4 x i32> <i32 15, i32 15, i32 15, i32 15>)
1514 define <16 x i32> @avx512_psll_d_512_64(<16 x i32> %v) {
1515 ; CHECK-LABEL: @avx512_psll_d_512_64(
1516 ; CHECK-NEXT: ret <16 x i32> zeroinitializer
1518 %1 = tail call <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32> %v, <4 x i32> <i32 64, i32 0, i32 9999, i32 9999>)
1522 define <8 x i64> @avx512_psll_q_512_0(<8 x i64> %v) {
1523 ; CHECK-LABEL: @avx512_psll_q_512_0(
1524 ; CHECK-NEXT: ret <8 x i64> %v
1526 %1 = tail call <8 x i64> @llvm.x86.avx512.psll.q.512(<8 x i64> %v, <2 x i64> zeroinitializer)
1530 define <8 x i64> @avx512_psll_q_512_15(<8 x i64> %v) {
1531 ; CHECK-LABEL: @avx512_psll_q_512_15(
1532 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i64> %v, <i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15, i64 15>
1533 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
1535 %1 = tail call <8 x i64> @llvm.x86.avx512.psll.q.512(<8 x i64> %v, <2 x i64> <i64 15, i64 9999>)
1539 define <8 x i64> @avx512_psll_q_512_64(<8 x i64> %v) {
1540 ; CHECK-LABEL: @avx512_psll_q_512_64(
1541 ; CHECK-NEXT: ret <8 x i64> zeroinitializer
1543 %1 = tail call <8 x i64> @llvm.x86.avx512.psll.q.512(<8 x i64> %v, <2 x i64> <i64 64, i64 9999>)
1548 ; ASHR - Constant Per-Element Vector
1551 define <4 x i32> @avx2_psrav_d_128_0(<4 x i32> %v) {
1552 ; CHECK-LABEL: @avx2_psrav_d_128_0(
1553 ; CHECK-NEXT: ret <4 x i32> %v
1555 %1 = tail call <4 x i32> @llvm.x86.avx2.psrav.d(<4 x i32> %v, <4 x i32> zeroinitializer)
1559 define <8 x i32> @avx2_psrav_d_256_0(<8 x i32> %v) {
1560 ; CHECK-LABEL: @avx2_psrav_d_256_0(
1561 ; CHECK-NEXT: ret <8 x i32> %v
1563 %1 = tail call <8 x i32> @llvm.x86.avx2.psrav.d.256(<8 x i32> %v, <8 x i32> zeroinitializer)
1567 define <16 x i32> @avx512_psrav_d_512_0(<16 x i32> %v) {
1568 ; CHECK-LABEL: @avx512_psrav_d_512_0(
1569 ; CHECK-NEXT: ret <16 x i32> %v
1571 %1 = tail call <16 x i32> @llvm.x86.avx512.psrav.d.512(<16 x i32> %v, <16 x i32> zeroinitializer)
1575 define <4 x i32> @avx2_psrav_d_128_var(<4 x i32> %v) {
1576 ; CHECK-LABEL: @avx2_psrav_d_128_var(
1577 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 0, i32 8, i32 16, i32 31>
1578 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1580 %1 = tail call <4 x i32> @llvm.x86.avx2.psrav.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 64>)
1584 define <8 x i32> @avx2_psrav_d_256_var(<8 x i32> %v) {
1585 ; CHECK-LABEL: @avx2_psrav_d_256_var(
1586 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
1587 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1589 %1 = tail call <8 x i32> @llvm.x86.avx2.psrav.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 24, i32 32, i32 24, i32 8, i32 0>)
1593 define <16 x i32> @avx512_psrav_d_512_var(<16 x i32> %v) {
1594 ; CHECK-LABEL: @avx512_psrav_d_512_var(
1595 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
1596 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
1598 %1 = tail call <16 x i32> @llvm.x86.avx512.psrav.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 24, i32 32, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 32, i32 24, i32 8, i32 0>)
1602 define <4 x i32> @avx2_psrav_d_128_allbig(<4 x i32> %v) {
1603 ; CHECK-LABEL: @avx2_psrav_d_128_allbig(
1604 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 31, i32 31, i32 31, i32 undef>
1605 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1607 %1 = tail call <4 x i32> @llvm.x86.avx2.psrav.d(<4 x i32> %v, <4 x i32> <i32 32, i32 100, i32 -255, i32 undef>)
1611 define <8 x i32> @avx2_psrav_d_256_allbig(<8 x i32> %v) {
1612 ; CHECK-LABEL: @avx2_psrav_d_256_allbig(
1613 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 undef, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
1614 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1616 %1 = tail call <8 x i32> @llvm.x86.avx2.psrav.d.256(<8 x i32> %v, <8 x i32> <i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555>)
1620 define <16 x i32> @avx512_psrav_d_512_allbig(<16 x i32> %v) {
1621 ; CHECK-LABEL: @avx512_psrav_d_512_allbig(
1622 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 undef, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 undef, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31, i32 31>
1623 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
1625 %1 = tail call <16 x i32> @llvm.x86.avx512.psrav.d.512(<16 x i32> %v, <16 x i32> <i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555, i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555>)
1629 define <4 x i32> @avx2_psrav_d_128_undef(<4 x i32> %v) {
1630 ; CHECK-LABEL: @avx2_psrav_d_128_undef(
1631 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i32> %v, <i32 undef, i32 8, i32 16, i32 31>
1632 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1634 %1 = insertelement <4 x i32> <i32 0, i32 8, i32 16, i32 64>, i32 undef, i32 0
1635 %2 = tail call <4 x i32> @llvm.x86.avx2.psrav.d(<4 x i32> %v, <4 x i32> %1)
1639 define <8 x i32> @avx2_psrav_d_256_undef(<8 x i32> %v) {
1640 ; CHECK-LABEL: @avx2_psrav_d_256_undef(
1641 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i32> %v, <i32 0, i32 undef, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
1642 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1644 %1 = insertelement <8 x i32> <i32 0, i32 8, i32 16, i32 24, i32 32, i32 24, i32 8, i32 0>, i32 undef, i32 1
1645 %2 = tail call <8 x i32> @llvm.x86.avx2.psrav.d.256(<8 x i32> %v, <8 x i32> %1)
1649 define <16 x i32> @avx512_psrav_d_512_undef(<16 x i32> %v) {
1650 ; CHECK-LABEL: @avx512_psrav_d_512_undef(
1651 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i32> %v, <i32 0, i32 undef, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
1652 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
1654 %1 = insertelement <16 x i32> <i32 0, i32 8, i32 16, i32 24, i32 32, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 32, i32 24, i32 8, i32 0>, i32 undef, i32 1
1655 %2 = tail call <16 x i32> @llvm.x86.avx512.psrav.d.512(<16 x i32> %v, <16 x i32> %1)
1659 define <2 x i64> @avx512_psrav_q_128_0(<2 x i64> %v) {
1660 ; CHECK-LABEL: @avx512_psrav_q_128_0(
1661 ; CHECK-NEXT: ret <2 x i64> %v
1663 %1 = tail call <2 x i64> @llvm.x86.avx512.psrav.q.128(<2 x i64> %v, <2 x i64> zeroinitializer)
1667 define <4 x i64> @avx512_psrav_q_256_0(<4 x i64> %v) {
1668 ; CHECK-LABEL: @avx512_psrav_q_256_0(
1669 ; CHECK-NEXT: ret <4 x i64> %v
1671 %1 = tail call <4 x i64> @llvm.x86.avx512.psrav.q.256(<4 x i64> %v, <4 x i64> zeroinitializer)
1675 define <2 x i64> @avx512_psrav_q_128_var(<2 x i64> %v) {
1676 ; CHECK-LABEL: @avx512_psrav_q_128_var(
1677 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 0, i64 8>
1678 %1 = tail call <2 x i64> @llvm.x86.avx512.psrav.q.128(<2 x i64> %v, <2 x i64> <i64 0, i64 8>)
1682 define <4 x i64> @avx512_psrav_q_256_var(<4 x i64> %v) {
1683 ; CHECK-LABEL: @avx512_psrav_q_256_var(
1684 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 0, i64 8, i64 16, i64 31>
1685 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
1687 %1 = tail call <4 x i64> @llvm.x86.avx512.psrav.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 31>)
1691 define <2 x i64> @avx512_psrav_q_128_allbig(<2 x i64> %v) {
1692 ; CHECK-LABEL: @avx512_psrav_q_128_allbig(
1693 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 63, i64 undef>
1694 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
1696 %1 = tail call <2 x i64> @llvm.x86.avx512.psrav.q.128(<2 x i64> %v, <2 x i64> <i64 64, i64 undef>)
1700 define <4 x i64> @avx512_psrav_q_256_allbig(<4 x i64> %v) {
1701 ; CHECK-LABEL: @avx512_psrav_q_256_allbig(
1702 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 63, i64 undef, i64 63, i64 63>
1703 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
1705 %1 = tail call <4 x i64> @llvm.x86.avx512.psrav.q.256(<4 x i64> %v, <4 x i64> <i64 64, i64 undef, i64 -128, i64 -60>)
1709 define <2 x i64> @avx512_psrav_q_128_undef(<2 x i64> %v) {
1710 ; CHECK-LABEL: @avx512_psrav_q_128_undef(
1711 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <2 x i64> %v, <i64 undef, i64 8>
1712 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
1714 %1 = insertelement <2 x i64> <i64 0, i64 8>, i64 undef, i64 0
1715 %2 = tail call <2 x i64> @llvm.x86.avx512.psrav.q.128(<2 x i64> %v, <2 x i64> %1)
1719 define <4 x i64> @avx512_psrav_q_256_undef(<4 x i64> %v) {
1720 ; CHECK-LABEL: @avx512_psrav_q_256_undef(
1721 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <4 x i64> %v, <i64 undef, i64 8, i64 16, i64 31>
1722 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
1724 %1 = insertelement <4 x i64> <i64 0, i64 8, i64 16, i64 31>, i64 undef, i64 0
1725 %2 = tail call <4 x i64> @llvm.x86.avx512.psrav.q.256(<4 x i64> %v, <4 x i64> %1)
1729 define <8 x i64> @avx512_psrav_q_512_0(<8 x i64> %v) {
1730 ; CHECK-LABEL: @avx512_psrav_q_512_0(
1731 ; CHECK-NEXT: ret <8 x i64> %v
1733 %1 = tail call <8 x i64> @llvm.x86.avx512.psrav.q.512(<8 x i64> %v, <8 x i64> zeroinitializer)
1737 define <8 x i64> @avx512_psrav_q_512_var(<8 x i64> %v) {
1738 ; CHECK-LABEL: @avx512_psrav_q_512_var(
1739 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>
1740 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
1742 %1 = tail call <8 x i64> @llvm.x86.avx512.psrav.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>)
1746 define <8 x i64> @avx512_psrav_q_512_allbig(<8 x i64> %v) {
1747 ; CHECK-LABEL: @avx512_psrav_q_512_allbig(
1748 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 63, i64 undef, i64 63, i64 63, i64 63, i64 undef, i64 63, i64 63>
1749 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
1751 %1 = tail call <8 x i64> @llvm.x86.avx512.psrav.q.512(<8 x i64> %v, <8 x i64> <i64 64, i64 undef, i64 -128, i64 -60, i64 64, i64 undef, i64 -128, i64 -60>)
1755 define <8 x i64> @avx512_psrav_q_512_undef(<8 x i64> %v) {
1756 ; CHECK-LABEL: @avx512_psrav_q_512_undef(
1757 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i64> %v, <i64 undef, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>
1758 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
1760 %1 = insertelement <8 x i64> <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>, i64 undef, i64 0
1761 %2 = tail call <8 x i64> @llvm.x86.avx512.psrav.q.512(<8 x i64> %v, <8 x i64> %1)
1765 define <8 x i16> @avx512_psrav_w_128_0(<8 x i16> %v) {
1766 ; CHECK-LABEL: @avx512_psrav_w_128_0(
1767 ; CHECK-NEXT: ret <8 x i16> %v
1769 %1 = tail call <8 x i16> @llvm.x86.avx512.psrav.w.128(<8 x i16> %v, <8 x i16> zeroinitializer)
1773 define <8 x i16> @avx512_psrav_w_128_var(<8 x i16> %v) {
1774 ; CHECK-LABEL: @avx512_psrav_w_128_var(
1775 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1776 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
1778 %1 = tail call <8 x i16> @llvm.x86.avx512.psrav.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>)
1782 define <8 x i16> @avx512_psrav_w_128_allbig(<8 x i16> %v) {
1783 ; CHECK-LABEL: @avx512_psrav_w_128_allbig(
1784 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 undef>
1785 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
1788 %1 = tail call <8 x i16> @llvm.x86.avx512.psrav.w.128(<8 x i16> %v, <8 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 undef>)
1792 define <8 x i16> @avx512_psrav_w_128_undef(<8 x i16> %v) {
1793 ; CHECK-LABEL: @avx512_psrav_w_128_undef(
1794 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <8 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
1795 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
1797 %1 = insertelement <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>, i16 undef, i64 0
1798 %2 = tail call <8 x i16> @llvm.x86.avx512.psrav.w.128(<8 x i16> %v, <8 x i16> %1)
1802 define <16 x i16> @avx512_psrav_w_256_0(<16 x i16> %v) {
1803 ; CHECK-LABEL: @avx512_psrav_w_256_0(
1804 ; CHECK-NEXT: ret <16 x i16> %v
1806 %1 = tail call <16 x i16> @llvm.x86.avx512.psrav.w.256(<16 x i16> %v, <16 x i16> zeroinitializer)
1810 define <16 x i16> @avx512_psrav_w_256_var(<16 x i16> %v) {
1811 ; CHECK-LABEL: @avx512_psrav_w_256_var(
1812 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>
1813 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
1815 %1 = tail call <16 x i16> @llvm.x86.avx512.psrav.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>)
1819 define <16 x i16> @avx512_psrav_w_256_allbig(<16 x i16> %v) {
1820 ; CHECK-LABEL: @avx512_psrav_w_256_allbig(
1821 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 undef, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15>
1822 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
1825 %1 = tail call <16 x i16> @llvm.x86.avx512.psrav.w.256(<16 x i16> %v, <16 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 -7, i16 undef, i16 64, i16 -10, i16 256, i16 16, i16 28, i16 65535, i16 32767>)
1829 define <16 x i16> @avx512_psrav_w_256_undef(<16 x i16> %v) {
1830 ; CHECK-LABEL: @avx512_psrav_w_256_undef(
1831 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <16 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>
1832 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
1834 %1 = insertelement <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, i16 undef, i64 0
1835 %2 = tail call <16 x i16> @llvm.x86.avx512.psrav.w.256(<16 x i16> %v, <16 x i16> %1)
1839 define <32 x i16> @avx512_psrav_w_512_0(<32 x i16> %v) {
1840 ; CHECK-LABEL: @avx512_psrav_w_512_0(
1841 ; CHECK-NEXT: ret <32 x i16> %v
1843 %1 = tail call <32 x i16> @llvm.x86.avx512.psrav.w.512(<32 x i16> %v, <32 x i16> zeroinitializer)
1847 define <32 x i16> @avx512_psrav_w_512_var(<32 x i16> %v) {
1848 ; CHECK-LABEL: @avx512_psrav_w_512_var(
1849 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
1850 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
1852 %1 = tail call <32 x i16> @llvm.x86.avx512.psrav.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
1856 define <32 x i16> @avx512_psrav_w_512_allbig(<32 x i16> %v) {
1857 ; CHECK-LABEL: @avx512_psrav_w_512_allbig(
1858 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 undef, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 undef, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 undef, i16 15, i16 15, i16 undef, i16 15, i16 15>
1859 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
1861 %1 = tail call <32 x i16> @llvm.x86.avx512.psrav.w.512(<32 x i16> %v, <32 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 -7, i16 undef, i16 64, i16 -10, i16 128, i16 16, i16 28, i16 65535, i16 32767, i16 56, i16 -14, i16 undef, i16 16, i16 67, i16 567, i16 -32768, i16 4096, i16 8192, i16 -12345, i16 undef, i16 345, i16 123, i16 undef, i16 1024, i16 54321>)
1865 define <32 x i16> @avx512_psrav_w_512_undef(<32 x i16> %v) {
1866 ; CHECK-LABEL: @avx512_psrav_w_512_undef(
1867 ; CHECK-NEXT: [[TMP1:%.*]] = ashr <32 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
1868 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
1870 %1 = insertelement <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>, i16 undef, i64 0
1871 %2 = tail call <32 x i16> @llvm.x86.avx512.psrav.w.512(<32 x i16> %v, <32 x i16> %1)
1876 ; LSHR - Constant Per-Element Vector
1879 define <4 x i32> @avx2_psrlv_d_128_0(<4 x i32> %v) {
1880 ; CHECK-LABEL: @avx2_psrlv_d_128_0(
1881 ; CHECK-NEXT: ret <4 x i32> %v
1883 %1 = tail call <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32> %v, <4 x i32> zeroinitializer)
1887 define <8 x i32> @avx2_psrlv_d_256_0(<8 x i32> %v) {
1888 ; CHECK-LABEL: @avx2_psrlv_d_256_0(
1889 ; CHECK-NEXT: ret <8 x i32> %v
1891 %1 = tail call <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32> %v, <8 x i32> zeroinitializer)
1895 define <4 x i32> @avx2_psrlv_d_128_var(<4 x i32> %v) {
1896 ; CHECK-LABEL: @avx2_psrlv_d_128_var(
1897 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i32> %v, <i32 0, i32 8, i32 16, i32 31>
1898 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1900 %1 = tail call <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 31>)
1904 define <8 x i32> @avx2_psrlv_d_256_var(<8 x i32> %v) {
1905 ; CHECK-LABEL: @avx2_psrlv_d_256_var(
1906 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i32> %v, <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
1907 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1909 %1 = tail call <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>)
1913 define <4 x i32> @avx2_psrlv_d_128_big(<4 x i32> %v) {
1914 ; CHECK-LABEL: @avx2_psrlv_d_128_big(
1915 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 64>)
1916 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1918 %1 = tail call <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 64>)
1922 define <8 x i32> @avx2_psrlv_d_256_big(<8 x i32> %v) {
1923 ; CHECK-LABEL: @avx2_psrlv_d_256_big(
1924 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
1925 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1927 %1 = tail call <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
1931 define <4 x i32> @avx2_psrlv_d_128_allbig(<4 x i32> %v) {
1932 ; CHECK-LABEL: @avx2_psrlv_d_128_allbig(
1933 ; CHECK-NEXT: ret <4 x i32> <i32 0, i32 0, i32 0, i32 undef>
1935 %1 = tail call <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32> %v, <4 x i32> <i32 32, i32 100, i32 -255, i32 undef>)
1939 define <8 x i32> @avx2_psrlv_d_256_allbig(<8 x i32> %v) {
1940 ; CHECK-LABEL: @avx2_psrlv_d_256_allbig(
1941 ; CHECK-NEXT: ret <8 x i32> <i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
1943 %1 = tail call <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32> %v, <8 x i32> <i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555>)
1947 define <4 x i32> @avx2_psrlv_d_128_undef(<4 x i32> %v) {
1948 ; CHECK-LABEL: @avx2_psrlv_d_128_undef(
1949 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i32> %v, <i32 undef, i32 8, i32 16, i32 31>
1950 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
1952 %1 = insertelement <4 x i32> <i32 0, i32 8, i32 16, i32 31>, i32 undef, i32 0
1953 %2 = tail call <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32> %v, <4 x i32> %1)
1957 define <8 x i32> @avx2_psrlv_d_256_undef(<8 x i32> %v) {
1958 ; CHECK-LABEL: @avx2_psrlv_d_256_undef(
1959 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i32> %v, <i32 0, i32 undef, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>
1960 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
1962 %1 = insertelement <8 x i32> <i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>, i32 undef, i32 1
1963 %2 = tail call <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32> %v, <8 x i32> %1)
1967 define <2 x i64> @avx2_psrlv_q_128_0(<2 x i64> %v) {
1968 ; CHECK-LABEL: @avx2_psrlv_q_128_0(
1969 ; CHECK-NEXT: ret <2 x i64> %v
1971 %1 = tail call <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64> %v, <2 x i64> zeroinitializer)
1975 define <4 x i64> @avx2_psrlv_q_256_0(<4 x i64> %v) {
1976 ; CHECK-LABEL: @avx2_psrlv_q_256_0(
1977 ; CHECK-NEXT: ret <4 x i64> %v
1979 %1 = tail call <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64> %v, <4 x i64> zeroinitializer)
1983 define <2 x i64> @avx2_psrlv_q_128_var(<2 x i64> %v) {
1984 ; CHECK-LABEL: @avx2_psrlv_q_128_var(
1985 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <2 x i64> %v, <i64 0, i64 8>
1986 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
1988 %1 = tail call <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64> %v, <2 x i64> <i64 0, i64 8>)
1992 define <4 x i64> @avx2_psrlv_q_256_var(<4 x i64> %v) {
1993 ; CHECK-LABEL: @avx2_psrlv_q_256_var(
1994 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i64> %v, <i64 0, i64 8, i64 16, i64 31>
1995 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
1997 %1 = tail call <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 31>)
2001 define <2 x i64> @avx2_psrlv_q_128_big(<2 x i64> %v) {
2002 ; CHECK-LABEL: @avx2_psrlv_q_128_big(
2003 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64> %v, <2 x i64> <i64 0, i64 128>)
2004 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
2006 %1 = tail call <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64> %v, <2 x i64> <i64 0, i64 128>)
2010 define <4 x i64> @avx2_psrlv_q_256_big(<4 x i64> %v) {
2011 ; CHECK-LABEL: @avx2_psrlv_q_256_big(
2012 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 64>)
2013 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2015 %1 = tail call <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 64>)
2019 define <2 x i64> @avx2_psrlv_q_128_allbig(<2 x i64> %v) {
2020 ; CHECK-LABEL: @avx2_psrlv_q_128_allbig(
2021 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
2023 %1 = tail call <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64> %v, <2 x i64> <i64 128, i64 -64>)
2027 define <4 x i64> @avx2_psrlv_q_256_allbig(<4 x i64> %v) {
2028 ; CHECK-LABEL: @avx2_psrlv_q_256_allbig(
2029 ; CHECK-NEXT: ret <4 x i64> <i64 0, i64 undef, i64 0, i64 0>
2031 %1 = tail call <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64> %v, <4 x i64> <i64 64, i64 undef, i64 -128, i64 -60>)
2035 ; The shift amount is 0 (the undef lane could be 0), so we return the unshifted input.
2037 define <2 x i64> @avx2_psrlv_q_128_undef(<2 x i64> %v) {
2038 ; CHECK-LABEL: @avx2_psrlv_q_128_undef(
2039 ; CHECK-NEXT: ret <2 x i64> [[V:%.*]]
2041 %1 = insertelement <2 x i64> <i64 0, i64 8>, i64 undef, i64 1
2042 %2 = tail call <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64> %v, <2 x i64> %1)
2046 define <4 x i64> @avx2_psrlv_q_256_undef(<4 x i64> %v) {
2047 ; CHECK-LABEL: @avx2_psrlv_q_256_undef(
2048 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <4 x i64> %v, <i64 undef, i64 8, i64 16, i64 31>
2049 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2051 %1 = insertelement <4 x i64> <i64 0, i64 8, i64 16, i64 31>, i64 undef, i64 0
2052 %2 = tail call <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64> %v, <4 x i64> %1)
2056 define <16 x i32> @avx2_psrlv_d_512_0(<16 x i32> %v) {
2057 ; CHECK-LABEL: @avx2_psrlv_d_512_0(
2058 ; CHECK-NEXT: ret <16 x i32> %v
2060 %1 = tail call <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32> %v, <16 x i32> zeroinitializer)
2064 define <16 x i32> @avx512_psrlv_d_512_var(<16 x i32> %v) {
2065 ; CHECK-LABEL: @avx512_psrlv_d_512_var(
2066 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i32> %v, <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
2067 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2069 %1 = tail call <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>)
2073 define <16 x i32> @avx512_psrlv_d_512_big(<16 x i32> %v) {
2074 ; CHECK-LABEL: @avx512_psrlv_d_512_big(
2075 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
2076 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2078 %1 = tail call <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
2082 define <16 x i32> @avx512_psrlv_d_512_allbig(<16 x i32> %v) {
2083 ; CHECK-LABEL: @avx512_psrlv_d_512_allbig(
2084 ; CHECK-NEXT: ret <16 x i32> <i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
2086 %1 = tail call <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32> %v, <16 x i32> <i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555, i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555>)
2090 define <16 x i32> @avx512_psrlv_d_512_undef(<16 x i32> %v) {
2091 ; CHECK-LABEL: @avx512_psrlv_d_512_undef(
2092 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i32> %v, <i32 0, i32 undef, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>
2093 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2095 %1 = insertelement <16 x i32> <i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>, i32 undef, i32 1
2096 %2 = tail call <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32> %v, <16 x i32> %1)
2100 define <8 x i64> @avx512_psrlv_q_512_0(<8 x i64> %v) {
2101 ; CHECK-LABEL: @avx512_psrlv_q_512_0(
2102 ; CHECK-NEXT: ret <8 x i64> %v
2104 %1 = tail call <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64> %v, <8 x i64> zeroinitializer)
2108 define <8 x i64> @avx512_psrlv_q_512_var(<8 x i64> %v) {
2109 ; CHECK-LABEL: @avx512_psrlv_q_512_var(
2110 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i64> %v, <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>
2111 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2113 %1 = tail call <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>)
2117 define <8 x i64> @avx512_psrlv_q_512_big(<8 x i64> %v) {
2118 ; CHECK-LABEL: @avx512_psrlv_q_512_big(
2119 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 64, i64 0, i64 8, i64 16, i64 64>)
2120 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2122 %1 = tail call <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 64, i64 0, i64 8, i64 16, i64 64>)
2126 define <8 x i64> @avx512_psrlv_q_512_allbig(<8 x i64> %v) {
2127 ; CHECK-LABEL: @avx512_psrlv_q_512_allbig(
2128 ; CHECK-NEXT: ret <8 x i64> <i64 0, i64 undef, i64 0, i64 0, i64 0, i64 undef, i64 0, i64 0>
2130 %1 = tail call <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64> %v, <8 x i64> <i64 64, i64 undef, i64 -128, i64 -60, i64 64, i64 undef, i64 -128, i64 -60>)
2134 define <8 x i64> @avx512_psrlv_q_512_undef(<8 x i64> %v) {
2135 ; CHECK-LABEL: @avx512_psrlv_q_512_undef(
2136 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i64> %v, <i64 undef, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>
2137 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2139 %1 = insertelement <8 x i64> <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>, i64 undef, i64 0
2140 %2 = tail call <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64> %v, <8 x i64> %1)
2144 define <8 x i16> @avx512_psrlv_w_128_0(<8 x i16> %v) {
2145 ; CHECK-LABEL: @avx512_psrlv_w_128_0(
2146 ; CHECK-NEXT: ret <8 x i16> %v
2148 %1 = tail call <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16> %v, <8 x i16> zeroinitializer)
2152 define <8 x i16> @avx512_psrlv_w_128_var(<8 x i16> %v) {
2153 ; CHECK-LABEL: @avx512_psrlv_w_128_var(
2154 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
2155 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2157 %1 = tail call <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>)
2161 define <8 x i16> @avx512_psrlv_w_128_big(<8 x i16> %v) {
2162 ; CHECK-LABEL: @avx512_psrlv_w_128_big(
2163 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 16>)
2164 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2166 %1 = tail call <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 16>)
2170 define <8 x i16> @avx512_psrlv_w_128_allbig(<8 x i16> %v) {
2171 ; CHECK-LABEL: @avx512_psrlv_w_128_allbig(
2172 ; CHECK-NEXT: ret <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef>
2174 %1 = tail call <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16> %v, <8 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 undef>)
2178 define <8 x i16> @avx512_psrlv_w_128_undef(<8 x i16> %v) {
2179 ; CHECK-LABEL: @avx512_psrlv_w_128_undef(
2180 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <8 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
2181 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2183 %1 = insertelement <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>, i16 undef, i64 0
2184 %2 = tail call <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16> %v, <8 x i16> %1)
2188 define <16 x i16> @avx512_psrlv_w_256_0(<16 x i16> %v) {
2189 ; CHECK-LABEL: @avx512_psrlv_w_256_0(
2190 ; CHECK-NEXT: ret <16 x i16> %v
2192 %1 = tail call <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16> %v, <16 x i16> zeroinitializer)
2196 define <16 x i16> @avx512_psrlv_w_256_var(<16 x i16> %v) {
2197 ; CHECK-LABEL: @avx512_psrlv_w_256_var(
2198 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>
2199 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2201 %1 = tail call <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>)
2205 define <16 x i16> @avx512_psrlv_w_256_big(<16 x i16> %v) {
2206 ; CHECK-LABEL: @avx512_psrlv_w_256_big(
2207 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 16>)
2208 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2210 %1 = tail call <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 16>)
2214 define <16 x i16> @avx512_psrlv_w_256_allbig(<16 x i16> %v) {
2215 ; CHECK-LABEL: @avx512_psrlv_w_256_allbig(
2216 ; CHECK-NEXT: ret <16 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
2218 %1 = tail call <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16> %v, <16 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 -7, i16 undef, i16 64, i16 -10, i16 256, i16 16, i16 28, i16 65535, i16 32767>)
2222 define <16 x i16> @avx512_psrlv_w_256_undef(<16 x i16> %v) {
2223 ; CHECK-LABEL: @avx512_psrlv_w_256_undef(
2224 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <16 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>
2225 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2227 %1 = insertelement <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, i16 undef, i64 0
2228 %2 = tail call <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16> %v, <16 x i16> %1)
2232 define <32 x i16> @avx512_psrlv_w_512_0(<32 x i16> %v) {
2233 ; CHECK-LABEL: @avx512_psrlv_w_512_0(
2234 ; CHECK-NEXT: ret <32 x i16> %v
2236 %1 = tail call <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16> %v, <32 x i16> zeroinitializer)
2240 define <32 x i16> @avx512_psrlv_w_512_var(<32 x i16> %v) {
2241 ; CHECK-LABEL: @avx512_psrlv_w_512_var(
2242 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <32 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
2243 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2245 %1 = tail call <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
2249 define <32 x i16> @avx512_psrlv_w_512_big(<32 x i16> %v) {
2250 ; CHECK-LABEL: @avx512_psrlv_w_512_big(
2251 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 16, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
2252 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2254 %1 = tail call <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 16, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
2258 define <32 x i16> @avx512_psrlv_w_512_allbig(<32 x i16> %v) {
2259 ; CHECK-LABEL: @avx512_psrlv_w_512_allbig(
2260 ; CHECK-NEXT: ret <32 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 undef, i16 0, i16 0>
2262 %1 = tail call <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16> %v, <32 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 -7, i16 undef, i16 64, i16 -10, i16 128, i16 16, i16 28, i16 65535, i16 32767, i16 56, i16 -14, i16 undef, i16 16, i16 67, i16 567, i16 -32768, i16 4096, i16 8192, i16 -12345, i16 undef, i16 345, i16 123, i16 undef, i16 1024, i16 54321>)
2266 define <32 x i16> @avx512_psrlv_w_512_undef(<32 x i16> %v) {
2267 ; CHECK-LABEL: @avx512_psrlv_w_512_undef(
2268 ; CHECK-NEXT: [[TMP1:%.*]] = lshr <32 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
2269 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2271 %1 = insertelement <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>, i16 undef, i64 0
2272 %2 = tail call <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16> %v, <32 x i16> %1)
2277 ; SHL - Constant Per-Element Vector
2280 define <4 x i32> @avx2_psllv_d_128_0(<4 x i32> %v) {
2281 ; CHECK-LABEL: @avx2_psllv_d_128_0(
2282 ; CHECK-NEXT: ret <4 x i32> %v
2284 %1 = tail call <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32> %v, <4 x i32> zeroinitializer)
2288 define <8 x i32> @avx2_psllv_d_256_0(<8 x i32> %v) {
2289 ; CHECK-LABEL: @avx2_psllv_d_256_0(
2290 ; CHECK-NEXT: ret <8 x i32> %v
2292 %1 = tail call <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32> %v, <8 x i32> zeroinitializer)
2296 define <4 x i32> @avx2_psllv_d_128_var(<4 x i32> %v) {
2297 ; CHECK-LABEL: @avx2_psllv_d_128_var(
2298 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i32> %v, <i32 0, i32 8, i32 16, i32 31>
2299 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
2301 %1 = tail call <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 31>)
2305 define <8 x i32> @avx2_psllv_d_256_var(<8 x i32> %v) {
2306 ; CHECK-LABEL: @avx2_psllv_d_256_var(
2307 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i32> %v, <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
2308 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
2310 %1 = tail call <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>)
2314 define <4 x i32> @avx2_psllv_d_128_big(<4 x i32> %v) {
2315 ; CHECK-LABEL: @avx2_psllv_d_128_big(
2316 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 64>)
2317 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
2319 %1 = tail call <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32> %v, <4 x i32> <i32 0, i32 8, i32 16, i32 64>)
2323 define <8 x i32> @avx2_psllv_d_256_big(<8 x i32> %v) {
2324 ; CHECK-LABEL: @avx2_psllv_d_256_big(
2325 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
2326 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
2328 %1 = tail call <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32> %v, <8 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
2332 define <4 x i32> @avx2_psllv_d_128_allbig(<4 x i32> %v) {
2333 ; CHECK-LABEL: @avx2_psllv_d_128_allbig(
2334 ; CHECK-NEXT: ret <4 x i32> <i32 0, i32 0, i32 0, i32 undef>
2336 %1 = tail call <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32> %v, <4 x i32> <i32 32, i32 100, i32 -255, i32 undef>)
2340 define <8 x i32> @avx2_psllv_d_256_allbig(<8 x i32> %v) {
2341 ; CHECK-LABEL: @avx2_psllv_d_256_allbig(
2342 ; CHECK-NEXT: ret <8 x i32> <i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
2344 %1 = tail call <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32> %v, <8 x i32> <i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555>)
2348 define <4 x i32> @avx2_psllv_d_128_undef(<4 x i32> %v) {
2349 ; CHECK-LABEL: @avx2_psllv_d_128_undef(
2350 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i32> %v, <i32 undef, i32 8, i32 16, i32 31>
2351 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
2353 %1 = insertelement <4 x i32> <i32 0, i32 8, i32 16, i32 31>, i32 undef, i32 0
2354 %2 = tail call <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32> %v, <4 x i32> %1)
2358 define <8 x i32> @avx2_psllv_d_256_undef(<8 x i32> %v) {
2359 ; CHECK-LABEL: @avx2_psllv_d_256_undef(
2360 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i32> %v, <i32 0, i32 undef, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>
2361 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
2363 %1 = insertelement <8 x i32> <i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>, i32 undef, i32 1
2364 %2 = tail call <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32> %v, <8 x i32> %1)
2368 define <2 x i64> @avx2_psllv_q_128_0(<2 x i64> %v) {
2369 ; CHECK-LABEL: @avx2_psllv_q_128_0(
2370 ; CHECK-NEXT: ret <2 x i64> %v
2372 %1 = tail call <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64> %v, <2 x i64> zeroinitializer)
2376 define <4 x i64> @avx2_psllv_q_256_0(<4 x i64> %v) {
2377 ; CHECK-LABEL: @avx2_psllv_q_256_0(
2378 ; CHECK-NEXT: ret <4 x i64> %v
2380 %1 = tail call <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64> %v, <4 x i64> zeroinitializer)
2384 define <2 x i64> @avx2_psllv_q_128_var(<2 x i64> %v) {
2385 ; CHECK-LABEL: @avx2_psllv_q_128_var(
2386 ; CHECK-NEXT: [[TMP1:%.*]] = shl <2 x i64> %v, <i64 0, i64 8>
2387 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
2389 %1 = tail call <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64> %v, <2 x i64> <i64 0, i64 8>)
2393 define <4 x i64> @avx2_psllv_q_256_var(<4 x i64> %v) {
2394 ; CHECK-LABEL: @avx2_psllv_q_256_var(
2395 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i64> %v, <i64 0, i64 8, i64 16, i64 31>
2396 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2398 %1 = tail call <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 31>)
2402 define <2 x i64> @avx2_psllv_q_128_big(<2 x i64> %v) {
2403 ; CHECK-LABEL: @avx2_psllv_q_128_big(
2404 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64> %v, <2 x i64> <i64 0, i64 128>)
2405 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
2407 %1 = tail call <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64> %v, <2 x i64> <i64 0, i64 128>)
2411 define <4 x i64> @avx2_psllv_q_256_big(<4 x i64> %v) {
2412 ; CHECK-LABEL: @avx2_psllv_q_256_big(
2413 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 64>)
2414 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2416 %1 = tail call <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64> %v, <4 x i64> <i64 0, i64 8, i64 16, i64 64>)
2420 define <2 x i64> @avx2_psllv_q_128_allbig(<2 x i64> %v) {
2421 ; CHECK-LABEL: @avx2_psllv_q_128_allbig(
2422 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
2424 %1 = tail call <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64> %v, <2 x i64> <i64 128, i64 -64>)
2428 define <4 x i64> @avx2_psllv_q_256_allbig(<4 x i64> %v) {
2429 ; CHECK-LABEL: @avx2_psllv_q_256_allbig(
2430 ; CHECK-NEXT: ret <4 x i64> <i64 0, i64 undef, i64 0, i64 0>
2432 %1 = tail call <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64> %v, <4 x i64> <i64 64, i64 undef, i64 -128, i64 -60>)
2436 ; The shift amount is 0 (the undef lane could be 0), so we return the unshifted input.
2438 define <2 x i64> @avx2_psllv_q_128_undef(<2 x i64> %v) {
2439 ; CHECK-LABEL: @avx2_psllv_q_128_undef(
2440 ; CHECK-NEXT: ret <2 x i64> [[V:%.*]]
2442 %1 = insertelement <2 x i64> <i64 0, i64 8>, i64 undef, i64 1
2443 %2 = tail call <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64> %v, <2 x i64> %1)
2447 define <4 x i64> @avx2_psllv_q_256_undef(<4 x i64> %v) {
2448 ; CHECK-LABEL: @avx2_psllv_q_256_undef(
2449 ; CHECK-NEXT: [[TMP1:%.*]] = shl <4 x i64> %v, <i64 undef, i64 8, i64 16, i64 31>
2450 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2452 %1 = insertelement <4 x i64> <i64 0, i64 8, i64 16, i64 31>, i64 undef, i64 0
2453 %2 = tail call <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64> %v, <4 x i64> %1)
2457 define <16 x i32> @avx512_psllv_d_512_0(<16 x i32> %v) {
2458 ; CHECK-LABEL: @avx512_psllv_d_512_0(
2459 ; CHECK-NEXT: ret <16 x i32> %v
2461 %1 = tail call <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32> %v, <16 x i32> zeroinitializer)
2465 define <16 x i32> @avx512_psllv_d_512_var(<16 x i32> %v) {
2466 ; CHECK-LABEL: @avx512_psllv_d_512_var(
2467 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i32> %v, <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>
2468 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2470 %1 = tail call <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 24, i32 31, i32 24, i32 8, i32 0>)
2474 define <16 x i32> @avx512_psllv_d_512_big(<16 x i32> %v) {
2475 ; CHECK-LABEL: @avx512_psllv_d_512_big(
2476 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
2477 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2479 %1 = tail call <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32> %v, <16 x i32> <i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 64, i32 31, i32 24, i32 8, i32 0>)
2483 define <16 x i32> @avx512_psllv_d_512_allbig(<16 x i32> %v) {
2484 ; CHECK-LABEL: @avx512_psllv_d_512_allbig(
2485 ; CHECK-NEXT: ret <16 x i32> <i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 undef, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
2487 %1 = tail call <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32> %v, <16 x i32> <i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555, i32 undef, i32 100, i32 255, i32 55555, i32 -32, i32 -100, i32 -255, i32 -55555>)
2491 define <16 x i32> @avx512_psllv_d_512_undef(<16 x i32> %v) {
2492 ; CHECK-LABEL: @avx512_psllv_d_512_undef(
2493 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i32> %v, <i32 0, i32 undef, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>
2494 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2496 %1 = insertelement <16 x i32> <i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0, i32 0, i32 8, i32 16, i32 31, i32 31, i32 24, i32 8, i32 0>, i32 undef, i32 1
2497 %2 = tail call <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32> %v, <16 x i32> %1)
2501 define <8 x i64> @avx512_psllv_q_512_0(<8 x i64> %v) {
2502 ; CHECK-LABEL: @avx512_psllv_q_512_0(
2503 ; CHECK-NEXT: ret <8 x i64> %v
2505 %1 = tail call <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64> %v, <8 x i64> zeroinitializer)
2509 define <8 x i64> @avx512_psllv_q_512_var(<8 x i64> %v) {
2510 ; CHECK-LABEL: @avx512_psllv_q_512_var(
2511 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i64> %v, <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>
2512 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2514 %1 = tail call <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>)
2518 define <8 x i64> @avx512_psllv_q_512_big(<8 x i64> %v) {
2519 ; CHECK-LABEL: @avx512_psllv_q_512_big(
2520 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 64, i64 0, i64 8, i64 16, i64 64>)
2521 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2523 %1 = tail call <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64> %v, <8 x i64> <i64 0, i64 8, i64 16, i64 64, i64 0, i64 8, i64 16, i64 64>)
2527 define <8 x i64> @avx512_psllv_q_512_allbig(<8 x i64> %v) {
2528 ; CHECK-LABEL: @avx512_psllv_q_512_allbig(
2529 ; CHECK-NEXT: ret <8 x i64> <i64 0, i64 undef, i64 0, i64 0, i64 0, i64 undef, i64 0, i64 0>
2531 %1 = tail call <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64> %v, <8 x i64> <i64 64, i64 undef, i64 -128, i64 -60, i64 64, i64 undef, i64 -128, i64 -60>)
2535 define <8 x i64> @avx512_psllv_q_512_undef(<8 x i64> %v) {
2536 ; CHECK-LABEL: @avx512_psllv_q_512_undef(
2537 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i64> %v, <i64 undef, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>
2538 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2540 %1 = insertelement <8 x i64> <i64 0, i64 8, i64 16, i64 31, i64 0, i64 8, i64 16, i64 31>, i64 undef, i64 0
2541 %2 = tail call <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64> %v, <8 x i64> %1)
2545 define <8 x i16> @avx512_psllv_w_128_0(<8 x i16> %v) {
2546 ; CHECK-LABEL: @avx512_psllv_w_128_0(
2547 ; CHECK-NEXT: ret <8 x i16> %v
2549 %1 = tail call <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16> %v, <8 x i16> zeroinitializer)
2553 define <8 x i16> @avx512_psllv_w_128_var(<8 x i16> %v) {
2554 ; CHECK-LABEL: @avx512_psllv_w_128_var(
2555 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
2556 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2558 %1 = tail call <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>)
2562 define <8 x i16> @avx512_psllv_w_128_big(<8 x i16> %v) {
2563 ; CHECK-LABEL: @avx512_psllv_w_128_big(
2564 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 16>)
2565 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2567 %1 = tail call <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16> %v, <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 16>)
2571 define <8 x i16> @avx512_psllv_w_128_allbig(<8 x i16> %v) {
2572 ; CHECK-LABEL: @avx512_psllv_w_128_allbig(
2573 ; CHECK-NEXT: ret <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef>
2575 %1 = tail call <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16> %v, <8 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 undef>)
2579 define <8 x i16> @avx512_psllv_w_128_undef(<8 x i16> %v) {
2580 ; CHECK-LABEL: @avx512_psllv_w_128_undef(
2581 ; CHECK-NEXT: [[TMP1:%.*]] = shl <8 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>
2582 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2584 %1 = insertelement <8 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7>, i16 undef, i64 0
2585 %2 = tail call <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16> %v, <8 x i16> %1)
2589 define <16 x i16> @avx512_psllv_w_256_0(<16 x i16> %v) {
2590 ; CHECK-LABEL: @avx512_psllv_w_256_0(
2591 ; CHECK-NEXT: ret <16 x i16> %v
2593 %1 = tail call <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16> %v, <16 x i16> zeroinitializer)
2597 define <16 x i16> @avx512_psllv_w_256_var(<16 x i16> %v) {
2598 ; CHECK-LABEL: @avx512_psllv_w_256_var(
2599 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>
2600 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2602 %1 = tail call <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>)
2606 define <16 x i16> @avx512_psllv_w_256_big(<16 x i16> %v) {
2607 ; CHECK-LABEL: @avx512_psllv_w_256_big(
2608 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 16>)
2609 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2611 %1 = tail call <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16> %v, <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 16>)
2615 define <16 x i16> @avx512_psllv_w_256_allbig(<16 x i16> %v) {
2616 ; CHECK-LABEL: @avx512_psllv_w_256_allbig(
2617 ; CHECK-NEXT: ret <16 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0>
2619 %1 = tail call <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16> %v, <16 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 -7, i16 undef, i16 64, i16 -10, i16 256, i16 16, i16 28, i16 65535, i16 32767>)
2623 define <16 x i16> @avx512_psllv_w_256_undef(<16 x i16> %v) {
2624 ; CHECK-LABEL: @avx512_psllv_w_256_undef(
2625 ; CHECK-NEXT: [[TMP1:%.*]] = shl <16 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>
2626 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2628 %1 = insertelement <16 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15>, i16 undef, i64 0
2629 %2 = tail call <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16> %v, <16 x i16> %1)
2633 define <32 x i16> @avx512_psllv_w_512_0(<32 x i16> %v) {
2634 ; CHECK-LABEL: @avx512_psllv_w_512_0(
2635 ; CHECK-NEXT: ret <32 x i16> %v
2637 %1 = tail call <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16> %v, <32 x i16> zeroinitializer)
2641 define <32 x i16> @avx512_psllv_w_512_var(<32 x i16> %v) {
2642 ; CHECK-LABEL: @avx512_psllv_w_512_var(
2643 ; CHECK-NEXT: [[TMP1:%.*]] = shl <32 x i16> %v, <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
2644 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2646 %1 = tail call <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
2650 define <32 x i16> @avx512_psllv_w_512_big(<32 x i16> %v) {
2651 ; CHECK-LABEL: @avx512_psllv_w_512_big(
2652 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 16, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
2653 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2655 %1 = tail call <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16> %v, <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 16, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>)
2659 define <32 x i16> @avx512_psllv_w_512_allbig(<32 x i16> %v) {
2660 ; CHECK-LABEL: @avx512_psllv_w_512_allbig(
2661 ; CHECK-NEXT: ret <32 x i16> <i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 0, i16 undef, i16 0, i16 0, i16 undef, i16 0, i16 0>
2663 %1 = tail call <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16> %v, <32 x i16> <i16 20, i16 -1, i16 -2, i16 33, i16 44, i16 55, i16 66, i16 -7, i16 undef, i16 64, i16 -10, i16 128, i16 16, i16 28, i16 65535, i16 32767, i16 56, i16 -14, i16 undef, i16 16, i16 67, i16 567, i16 -32768, i16 4096, i16 8192, i16 -12345, i16 undef, i16 345, i16 123, i16 undef, i16 1024, i16 54321>)
2667 define <32 x i16> @avx512_psllv_w_512_undef(<32 x i16> %v) {
2668 ; CHECK-LABEL: @avx512_psllv_w_512_undef(
2669 ; CHECK-NEXT: [[TMP1:%.*]] = shl <32 x i16> %v, <i16 undef, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>
2670 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2672 %1 = insertelement <32 x i16> <i16 0, i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8, i16 9, i16 10, i16 11, i16 12, i16 13, i16 14, i16 15, i16 15, i16 14, i16 13, i16 12, i16 11, i16 10, i16 9, i16 8, i16 7, i16 6, i16 5, i16 4, i16 3, i16 2, i16 1, i16 0>, i16 undef, i64 0
2673 %2 = tail call <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16> %v, <32 x i16> %1)
2678 ; Vector Demanded Bits
2681 define <8 x i16> @sse2_psra_w_var(<8 x i16> %v, <8 x i16> %a) {
2682 ; CHECK-LABEL: @sse2_psra_w_var(
2683 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> %a)
2684 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2686 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2687 %2 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> %1)
2691 define <8 x i16> @sse2_psra_w_var_bc(<8 x i16> %v, <2 x i64> %a) {
2692 ; CHECK-LABEL: @sse2_psra_w_var_bc(
2693 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i64> %a to <8 x i16>
2694 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> [[TMP1]])
2695 ; CHECK-NEXT: ret <8 x i16> [[TMP2]]
2697 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2698 %2 = bitcast <2 x i64> %1 to <8 x i16>
2699 %3 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %v, <8 x i16> %2)
2703 define <4 x i32> @sse2_psra_d_var(<4 x i32> %v, <4 x i32> %a) {
2704 ; CHECK-LABEL: @sse2_psra_d_var(
2705 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> %a)
2706 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
2708 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2709 %2 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> %1)
2713 define <4 x i32> @sse2_psra_d_var_bc(<4 x i32> %v, <8 x i16> %a) {
2714 ; CHECK-LABEL: @sse2_psra_d_var_bc(
2715 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <8 x i16> %a to <4 x i32>
2716 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> [[TMP1]])
2717 ; CHECK-NEXT: ret <4 x i32> [[TMP2]]
2719 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2720 %2 = bitcast <8 x i16> %1 to <4 x i32>
2721 %3 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %v, <4 x i32> %2)
2725 define <16 x i16> @avx2_psra_w_var(<16 x i16> %v, <8 x i16> %a) {
2726 ; CHECK-LABEL: @avx2_psra_w_var(
2727 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %v, <8 x i16> %a)
2728 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2730 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2731 %2 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %v, <8 x i16> %1)
2735 define <8 x i32> @avx2_psra_d_var(<8 x i32> %v, <4 x i32> %a) {
2736 ; CHECK-LABEL: @avx2_psra_d_var(
2737 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %v, <4 x i32> %a)
2738 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
2740 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2741 %2 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %v, <4 x i32> %1)
2745 define <2 x i64> @avx512_psra_q_128_var(<2 x i64> %v, <2 x i64> %a) {
2746 ; CHECK-LABEL: @avx512_psra_q_128_var(
2747 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x i64> @llvm.x86.avx512.psra.q.128(<2 x i64> %v, <2 x i64> %a)
2748 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
2750 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2751 %2 = tail call <2 x i64> @llvm.x86.avx512.psra.q.128(<2 x i64> %v, <2 x i64> %1)
2755 define <4 x i64> @avx512_psra_q_256_var(<4 x i64> %v, <2 x i64> %a) {
2756 ; CHECK-LABEL: @avx512_psra_q_256_var(
2757 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i64> @llvm.x86.avx512.psra.q.256(<4 x i64> %v, <2 x i64> %a)
2758 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2760 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2761 %2 = tail call <4 x i64> @llvm.x86.avx512.psra.q.256(<4 x i64> %v, <2 x i64> %1)
2765 define <32 x i16> @avx512_psra_w_512_var(<32 x i16> %v, <8 x i16> %a) {
2766 ; CHECK-LABEL: @avx512_psra_w_512_var(
2767 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %v, <8 x i16> %a)
2768 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2770 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2771 %2 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %v, <8 x i16> %1)
2775 define <16 x i32> @avx512_psra_d_512_var(<16 x i32> %v, <4 x i32> %a) {
2776 ; CHECK-LABEL: @avx512_psra_d_512_var(
2777 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %v, <4 x i32> %a)
2778 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2780 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2781 %2 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %v, <4 x i32> %1)
2785 define <8 x i64> @avx512_psra_q_512_var(<8 x i64> %v, <2 x i64> %a) {
2786 ; CHECK-LABEL: @avx512_psra_q_512_var(
2787 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i64> @llvm.x86.avx512.psra.q.512(<8 x i64> %v, <2 x i64> %a)
2788 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2790 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2791 %2 = tail call <8 x i64> @llvm.x86.avx512.psra.q.512(<8 x i64> %v, <2 x i64> %1)
2795 define <8 x i16> @sse2_psrl_w_var(<8 x i16> %v, <8 x i16> %a) {
2796 ; CHECK-LABEL: @sse2_psrl_w_var(
2797 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %v, <8 x i16> %a)
2798 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2800 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2801 %2 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> %v, <8 x i16> %1)
2805 define <4 x i32> @sse2_psrl_d_var(<4 x i32> %v, <4 x i32> %a) {
2806 ; CHECK-LABEL: @sse2_psrl_d_var(
2807 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> %a)
2808 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
2810 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2811 %2 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %v, <4 x i32> %1)
2815 define <2 x i64> @sse2_psrl_q_var(<2 x i64> %v, <2 x i64> %a) {
2816 ; CHECK-LABEL: @sse2_psrl_q_var(
2817 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %v, <2 x i64> %a)
2818 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
2820 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2821 %2 = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %v, <2 x i64> %1)
2825 define <16 x i16> @avx2_psrl_w_var(<16 x i16> %v, <8 x i16> %a) {
2826 ; CHECK-LABEL: @avx2_psrl_w_var(
2827 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> %a)
2828 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2830 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2831 %2 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> %1)
2835 define <16 x i16> @avx2_psrl_w_var_bc(<16 x i16> %v, <16 x i8> %a) {
2836 ; CHECK-LABEL: @avx2_psrl_w_var_bc(
2837 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> %a to <8 x i16>
2838 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> [[TMP1]])
2839 ; CHECK-NEXT: ret <16 x i16> [[TMP2]]
2841 %1 = shufflevector <16 x i8> %a, <16 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2842 %2 = bitcast <16 x i8> %1 to <8 x i16>
2843 %3 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> %v, <8 x i16> %2)
2847 define <8 x i32> @avx2_psrl_d_var(<8 x i32> %v, <4 x i32> %a) {
2848 ; CHECK-LABEL: @avx2_psrl_d_var(
2849 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> %a)
2850 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
2852 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2853 %2 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> %1)
2857 define <8 x i32> @avx2_psrl_d_var_bc(<8 x i32> %v, <2 x i64> %a) {
2858 ; CHECK-LABEL: @avx2_psrl_d_var_bc(
2859 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i64> %a to <4 x i32>
2860 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> [[TMP1]])
2861 ; CHECK-NEXT: ret <8 x i32> [[TMP2]]
2863 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2864 %2 = bitcast <2 x i64> %1 to <4 x i32>
2865 %3 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %v, <4 x i32> %2)
2869 define <4 x i64> @avx2_psrl_q_var(<4 x i64> %v, <2 x i64> %a) {
2870 ; CHECK-LABEL: @avx2_psrl_q_var(
2871 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %v, <2 x i64> %a)
2872 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2874 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2875 %2 = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %v, <2 x i64> %1)
2879 define <32 x i16> @avx512_psrl_w_512_var(<32 x i16> %v, <8 x i16> %a) {
2880 ; CHECK-LABEL: @avx512_psrl_w_512_var(
2881 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> %a)
2882 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2884 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2885 %2 = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> %1)
2889 define <32 x i16> @avx512_psrl_w_512_var_bc(<32 x i16> %v, <16 x i8> %a) {
2890 ; CHECK-LABEL: @avx512_psrl_w_512_var_bc(
2891 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <16 x i8> %a to <8 x i16>
2892 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> [[TMP1]])
2893 ; CHECK-NEXT: ret <32 x i16> [[TMP2]]
2895 %1 = shufflevector <16 x i8> %a, <16 x i8> undef, <16 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2896 %2 = bitcast <16 x i8> %1 to <8 x i16>
2897 %3 = tail call <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16> %v, <8 x i16> %2)
2901 define <16 x i32> @avx512_psrl_d_512_var(<16 x i32> %v, <4 x i32> %a) {
2902 ; CHECK-LABEL: @avx512_psrl_d_512_var(
2903 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> %a)
2904 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
2906 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2907 %2 = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> %1)
2911 define <16 x i32> @avx512_psrl_d_512_var_bc(<16 x i32> %v, <2 x i64> %a) {
2912 ; CHECK-LABEL: @avx512_psrl_d_512_var_bc(
2913 ; CHECK-NEXT: [[TMP1:%.*]] = bitcast <2 x i64> %a to <4 x i32>
2914 ; CHECK-NEXT: [[TMP2:%.*]] = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> [[TMP1]])
2915 ; CHECK-NEXT: ret <16 x i32> [[TMP2]]
2917 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2918 %2 = bitcast <2 x i64> %1 to <4 x i32>
2919 %3 = tail call <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32> %v, <4 x i32> %2)
2923 define <8 x i64> @avx512_psrl_q_512_var(<8 x i64> %v, <2 x i64> %a) {
2924 ; CHECK-LABEL: @avx512_psrl_q_512_var(
2925 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i64> @llvm.x86.avx512.psrl.q.512(<8 x i64> %v, <2 x i64> %a)
2926 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
2928 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2929 %2 = tail call <8 x i64> @llvm.x86.avx512.psrl.q.512(<8 x i64> %v, <2 x i64> %1)
2933 define <8 x i16> @sse2_psll_w_var(<8 x i16> %v, <8 x i16> %a) {
2934 ; CHECK-LABEL: @sse2_psll_w_var(
2935 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %v, <8 x i16> %a)
2936 ; CHECK-NEXT: ret <8 x i16> [[TMP1]]
2938 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2939 %2 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> %v, <8 x i16> %1)
2943 define <4 x i32> @sse2_psll_d_var(<4 x i32> %v, <4 x i32> %a) {
2944 ; CHECK-LABEL: @sse2_psll_d_var(
2945 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %v, <4 x i32> %a)
2946 ; CHECK-NEXT: ret <4 x i32> [[TMP1]]
2948 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2949 %2 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %v, <4 x i32> %1)
2953 define <2 x i64> @sse2_psll_q_var(<2 x i64> %v, <2 x i64> %a) {
2954 ; CHECK-LABEL: @sse2_psll_q_var(
2955 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %v, <2 x i64> %a)
2956 ; CHECK-NEXT: ret <2 x i64> [[TMP1]]
2958 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2959 %2 = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %v, <2 x i64> %1)
2963 define <16 x i16> @avx2_psll_w_var(<16 x i16> %v, <8 x i16> %a) {
2964 ; CHECK-LABEL: @avx2_psll_w_var(
2965 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> %v, <8 x i16> %a)
2966 ; CHECK-NEXT: ret <16 x i16> [[TMP1]]
2968 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2969 %2 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> %v, <8 x i16> %1)
2973 define <8 x i32> @avx2_psll_d_var(<8 x i32> %v, <4 x i32> %a) {
2974 ; CHECK-LABEL: @avx2_psll_d_var(
2975 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %v, <4 x i32> %a)
2976 ; CHECK-NEXT: ret <8 x i32> [[TMP1]]
2978 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
2979 %2 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %v, <4 x i32> %1)
2983 define <4 x i64> @avx2_psll_q_var(<4 x i64> %v, <2 x i64> %a) {
2984 ; CHECK-LABEL: @avx2_psll_q_var(
2985 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %v, <2 x i64> %a)
2986 ; CHECK-NEXT: ret <4 x i64> [[TMP1]]
2988 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
2989 %2 = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %v, <2 x i64> %1)
2993 define <32 x i16> @avx512_psll_w_512_var(<32 x i16> %v, <8 x i16> %a) {
2994 ; CHECK-LABEL: @avx512_psll_w_512_var(
2995 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16> %v, <8 x i16> %a)
2996 ; CHECK-NEXT: ret <32 x i16> [[TMP1]]
2998 %1 = shufflevector <8 x i16> %a, <8 x i16> undef, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2999 %2 = tail call <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16> %v, <8 x i16> %1)
3003 define <16 x i32> @avx512_psll_d_512_var(<16 x i32> %v, <4 x i32> %a) {
3004 ; CHECK-LABEL: @avx512_psll_d_512_var(
3005 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32> %v, <4 x i32> %a)
3006 ; CHECK-NEXT: ret <16 x i32> [[TMP1]]
3008 %1 = shufflevector <4 x i32> %a, <4 x i32> undef, <4 x i32> <i32 0, i32 1, i32 0, i32 1>
3009 %2 = tail call <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32> %v, <4 x i32> %1)
3013 define <8 x i64> @avx512_psll_q_512_var(<8 x i64> %v, <2 x i64> %a) {
3014 ; CHECK-LABEL: @avx512_psll_q_512_var(
3015 ; CHECK-NEXT: [[TMP1:%.*]] = tail call <8 x i64> @llvm.x86.avx512.psll.q.512(<8 x i64> %v, <2 x i64> %a)
3016 ; CHECK-NEXT: ret <8 x i64> [[TMP1]]
3018 %1 = shufflevector <2 x i64> %a, <2 x i64> undef, <2 x i32> <i32 0, i32 0>
3019 %2 = tail call <8 x i64> @llvm.x86.avx512.psll.q.512(<8 x i64> %v, <2 x i64> %1)
3027 define <8 x i16> @test_sse2_psra_w_0(<8 x i16> %A) {
3028 ; CHECK-LABEL: @test_sse2_psra_w_0(
3029 ; CHECK-NEXT: ret <8 x i16> %A
3031 %1 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %A, i32 0)
3032 %2 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %1, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 7, i16 0, i16 0, i16 0>)
3033 %3 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %2, i32 0)
3037 define <8 x i16> @test_sse2_psra_w_8() {
3038 ; CHECK-LABEL: @test_sse2_psra_w_8(
3039 ; CHECK-NEXT: ret <8 x i16> <i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16>
3041 %1 = bitcast <2 x i64> <i64 1152956690052710400, i64 1152956690052710400> to <8 x i16>
3042 %2 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %1, i32 3)
3043 %3 = tail call <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16> %2, <8 x i16> <i16 3, i16 0, i16 0, i16 0, i16 7, i16 0, i16 0, i16 0>)
3044 %4 = tail call <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16> %3, i32 2)
3048 define <4 x i32> @test_sse2_psra_d_0(<4 x i32> %A) {
3049 ; CHECK-LABEL: @test_sse2_psra_d_0(
3050 ; CHECK-NEXT: ret <4 x i32> %A
3052 %1 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %A, i32 0)
3053 %2 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %1, <4 x i32> <i32 0, i32 0, i32 7, i32 0>)
3054 %3 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %1, i32 0)
3058 define <4 x i32> @sse2_psra_d_8() {
3059 ; CHECK-LABEL: @sse2_psra_d_8(
3060 ; CHECK-NEXT: ret <4 x i32> <i32 4194432, i32 1048608, i32 4194432, i32 1048608>
3062 %1 = bitcast <2 x i64> <i64 1152956690052710400, i64 1152956690052710400> to <4 x i32>
3063 %2 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %1, i32 3)
3064 %3 = tail call <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32> %2, <4 x i32> <i32 3, i32 0, i32 7, i32 0>)
3065 %4 = tail call <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32> %3, i32 2)
3069 define <16 x i16> @test_avx2_psra_w_0(<16 x i16> %A) {
3070 ; CHECK-LABEL: @test_avx2_psra_w_0(
3071 ; CHECK-NEXT: ret <16 x i16> %A
3073 %1 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %A, i32 0)
3074 %2 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %1, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 7, i16 0, i16 0, i16 0>)
3075 %3 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %2, i32 0)
3079 define <16 x i16> @test_avx2_psra_w_8(<16 x i16> %A) {
3080 ; CHECK-LABEL: @test_avx2_psra_w_8(
3081 ; CHECK-NEXT: ret <16 x i16> <i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16>
3083 %1 = bitcast <4 x i64> <i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400> to <16 x i16>
3084 %2 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %1, i32 3)
3085 %3 = tail call <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16> %2, <8 x i16> <i16 3, i16 0, i16 0, i16 0, i16 7, i16 0, i16 0, i16 0>)
3086 %4 = tail call <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16> %3, i32 2)
3090 define <8 x i32> @test_avx2_psra_d_0(<8 x i32> %A) {
3091 ; CHECK-LABEL: @test_avx2_psra_d_0(
3092 ; CHECK-NEXT: ret <8 x i32> %A
3094 %1 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %A, i32 0)
3095 %2 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %1, <4 x i32> <i32 0, i32 0, i32 7, i32 0>)
3096 %3 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %2, i32 0)
3100 define <8 x i32> @test_avx2_psra_d_8() {
3101 ; CHECK-LABEL: @test_avx2_psra_d_8(
3102 ; CHECK-NEXT: ret <8 x i32> <i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608>
3104 %1 = bitcast <4 x i64> <i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400> to <8 x i32>
3105 %2 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %1, i32 3)
3106 %3 = tail call <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32> %2, <4 x i32> <i32 3, i32 0, i32 7, i32 0>)
3107 %4 = tail call <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32> %3, i32 2)
3111 define <32 x i16> @test_avx512_psra_w_512_0(<32 x i16> %A) {
3112 ; CHECK-LABEL: @test_avx512_psra_w_512_0(
3113 ; CHECK-NEXT: ret <32 x i16> %A
3115 %1 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %A, i32 0)
3116 %2 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %1, <8 x i16> <i16 0, i16 0, i16 0, i16 0, i16 7, i16 0, i16 0, i16 0>)
3117 %3 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %2, i32 0)
3121 define <32 x i16> @test_avx512_psra_w_512_8(<32 x i16> %A) {
3122 ; CHECK-LABEL: @test_avx512_psra_w_512_8(
3123 ; CHECK-NEXT: ret <32 x i16> <i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16, i16 -128, i16 64, i16 32, i16 16>
3125 %1 = bitcast <8 x i64> <i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400> to <32 x i16>
3126 %2 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %1, i32 3)
3127 %3 = tail call <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16> %2, <8 x i16> <i16 3, i16 0, i16 0, i16 0, i16 7, i16 0, i16 0, i16 0>)
3128 %4 = tail call <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16> %3, i32 2)
3132 define <16 x i32> @test_avx512_psra_d_512_0(<16 x i32> %A) {
3133 ; CHECK-LABEL: @test_avx512_psra_d_512_0(
3134 ; CHECK-NEXT: ret <16 x i32> %A
3136 %1 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %A, i32 0)
3137 %2 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %1, <4 x i32> <i32 0, i32 0, i32 7, i32 0>)
3138 %3 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %2, i32 0)
3142 define <16 x i32> @test_avx512_psra_d_512_8() {
3143 ; CHECK-LABEL: @test_avx512_psra_d_512_8(
3144 ; CHECK-NEXT: ret <16 x i32> <i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608, i32 4194432, i32 1048608>
3146 %1 = bitcast <8 x i64> <i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400, i64 1152956690052710400> to <16 x i32>
3147 %2 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %1, i32 3)
3148 %3 = tail call <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32> %2, <4 x i32> <i32 3, i32 0, i32 7, i32 0>)
3149 %4 = tail call <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32> %3, i32 2)
3157 define <2 x i64> @test_sse2_1() {
3158 ; CHECK-LABEL: @test_sse2_1(
3159 ; CHECK-NEXT: ret <2 x i64> <i64 72058418680037440, i64 144117112246370624>
3161 %S = bitcast i32 1 to i32
3162 %1 = zext i32 %S to i64
3163 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3164 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3165 %4 = bitcast <2 x i64> %3 to <8 x i16>
3166 %5 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>, <8 x i16> %4)
3167 %6 = bitcast <8 x i16> %5 to <4 x i32>
3168 %7 = bitcast <2 x i64> %3 to <4 x i32>
3169 %8 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %6, <4 x i32> %7)
3170 %9 = bitcast <4 x i32> %8 to <2 x i64>
3171 %10 = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %9, <2 x i64> %3)
3172 %11 = bitcast <2 x i64> %10 to <8 x i16>
3173 %12 = tail call <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16> %11, i32 %S)
3174 %13 = bitcast <8 x i16> %12 to <4 x i32>
3175 %14 = tail call <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32> %13, i32 %S)
3176 %15 = bitcast <4 x i32> %14 to <2 x i64>
3177 %16 = tail call <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64> %15, i32 %S)
3181 define <4 x i64> @test_avx2_1() {
3182 ; CHECK-LABEL: @test_avx2_1(
3183 ; CHECK-NEXT: ret <4 x i64> <i64 64, i64 128, i64 192, i64 256>
3185 %S = bitcast i32 1 to i32
3186 %1 = zext i32 %S to i64
3187 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3188 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3189 %4 = bitcast <2 x i64> %3 to <8 x i16>
3190 %5 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> <i16 1, i16 0, i16 0, i16 0, i16 2, i16 0, i16 0, i16 0, i16 3, i16 0, i16 0, i16 0, i16 4, i16 0, i16 0, i16 0>, <8 x i16> %4)
3191 %6 = bitcast <16 x i16> %5 to <8 x i32>
3192 %7 = bitcast <2 x i64> %3 to <4 x i32>
3193 %8 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %6, <4 x i32> %7)
3194 %9 = bitcast <8 x i32> %8 to <4 x i64>
3195 %10 = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %9, <2 x i64> %3)
3196 %11 = bitcast <4 x i64> %10 to <16 x i16>
3197 %12 = tail call <16 x i16> @llvm.x86.avx2.pslli.w(<16 x i16> %11, i32 %S)
3198 %13 = bitcast <16 x i16> %12 to <8 x i32>
3199 %14 = tail call <8 x i32> @llvm.x86.avx2.pslli.d(<8 x i32> %13, i32 %S)
3200 %15 = bitcast <8 x i32> %14 to <4 x i64>
3201 %16 = tail call <4 x i64> @llvm.x86.avx2.pslli.q(<4 x i64> %15, i32 %S)
3205 define <2 x i64> @test_sse2_0() {
3206 ; CHECK-LABEL: @test_sse2_0(
3207 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
3209 %S = bitcast i32 128 to i32
3210 %1 = zext i32 %S to i64
3211 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3212 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3213 %4 = bitcast <2 x i64> %3 to <8 x i16>
3214 %5 = tail call <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16> <i16 1, i16 2, i16 3, i16 4, i16 5, i16 6, i16 7, i16 8>, <8 x i16> %4)
3215 %6 = bitcast <8 x i16> %5 to <4 x i32>
3216 %7 = bitcast <2 x i64> %3 to <4 x i32>
3217 %8 = tail call <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32> %6, <4 x i32> %7)
3218 %9 = bitcast <4 x i32> %8 to <2 x i64>
3219 %10 = tail call <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64> %9, <2 x i64> %3)
3220 %11 = bitcast <2 x i64> %10 to <8 x i16>
3221 %12 = tail call <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16> %11, i32 %S)
3222 %13 = bitcast <8 x i16> %12 to <4 x i32>
3223 %14 = tail call <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32> %13, i32 %S)
3224 %15 = bitcast <4 x i32> %14 to <2 x i64>
3225 %16 = tail call <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64> %15, i32 %S)
3229 define <4 x i64> @test_avx2_0() {
3230 ; CHECK-LABEL: @test_avx2_0(
3231 ; CHECK-NEXT: ret <4 x i64> zeroinitializer
3233 %S = bitcast i32 128 to i32
3234 %1 = zext i32 %S to i64
3235 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3236 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3237 %4 = bitcast <2 x i64> %3 to <8 x i16>
3238 %5 = tail call <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16> <i16 1, i16 0, i16 0, i16 0, i16 2, i16 0, i16 0, i16 0, i16 3, i16 0, i16 0, i16 0, i16 4, i16 0, i16 0, i16 0>, <8 x i16> %4)
3239 %6 = bitcast <16 x i16> %5 to <8 x i32>
3240 %7 = bitcast <2 x i64> %3 to <4 x i32>
3241 %8 = tail call <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32> %6, <4 x i32> %7)
3242 %9 = bitcast <8 x i32> %8 to <4 x i64>
3243 %10 = tail call <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64> %9, <2 x i64> %3)
3244 %11 = bitcast <4 x i64> %10 to <16 x i16>
3245 %12 = tail call <16 x i16> @llvm.x86.avx2.pslli.w(<16 x i16> %11, i32 %S)
3246 %13 = bitcast <16 x i16> %12 to <8 x i32>
3247 %14 = tail call <8 x i32> @llvm.x86.avx2.pslli.d(<8 x i32> %13, i32 %S)
3248 %15 = bitcast <8 x i32> %14 to <4 x i64>
3249 %16 = tail call <4 x i64> @llvm.x86.avx2.pslli.q(<4 x i64> %15, i32 %S)
3252 define <2 x i64> @test_sse2_psrl_1() {
3253 ; CHECK-LABEL: @test_sse2_psrl_1(
3254 ; CHECK-NEXT: ret <2 x i64> <i64 562954248421376, i64 9007267974742020>
3256 %S = bitcast i32 1 to i32
3257 %1 = zext i32 %S to i64
3258 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3259 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3260 %4 = bitcast <2 x i64> %3 to <8 x i16>
3261 %5 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> <i16 16, i16 32, i16 64, i16 128, i16 256, i16 512, i16 1024, i16 2048>, <8 x i16> %4)
3262 %6 = bitcast <8 x i16> %5 to <4 x i32>
3263 %7 = bitcast <2 x i64> %3 to <4 x i32>
3264 %8 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %6, <4 x i32> %7)
3265 %9 = bitcast <4 x i32> %8 to <2 x i64>
3266 %10 = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %9, <2 x i64> %3)
3267 %11 = bitcast <2 x i64> %10 to <8 x i16>
3268 %12 = tail call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %11, i32 %S)
3269 %13 = bitcast <8 x i16> %12 to <4 x i32>
3270 %14 = tail call <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32> %13, i32 %S)
3271 %15 = bitcast <4 x i32> %14 to <2 x i64>
3272 %16 = tail call <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64> %15, i32 %S)
3276 define <4 x i64> @test_avx2_psrl_1() {
3277 ; CHECK-LABEL: @test_avx2_psrl_1(
3278 ; CHECK-NEXT: ret <4 x i64> <i64 16, i64 32, i64 64, i64 128>
3280 %S = bitcast i32 1 to i32
3281 %1 = zext i32 %S to i64
3282 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3283 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3284 %4 = bitcast <2 x i64> %3 to <8 x i16>
3285 %5 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> <i16 1024, i16 0, i16 0, i16 0, i16 2048, i16 0, i16 0, i16 0, i16 4096, i16 0, i16 0, i16 0, i16 8192, i16 0, i16 0, i16 0>, <8 x i16> %4)
3286 %6 = bitcast <16 x i16> %5 to <8 x i32>
3287 %7 = bitcast <2 x i64> %3 to <4 x i32>
3288 %8 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %6, <4 x i32> %7)
3289 %9 = bitcast <8 x i32> %8 to <4 x i64>
3290 %10 = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %9, <2 x i64> %3)
3291 %11 = bitcast <4 x i64> %10 to <16 x i16>
3292 %12 = tail call <16 x i16> @llvm.x86.avx2.psrli.w(<16 x i16> %11, i32 %S)
3293 %13 = bitcast <16 x i16> %12 to <8 x i32>
3294 %14 = tail call <8 x i32> @llvm.x86.avx2.psrli.d(<8 x i32> %13, i32 %S)
3295 %15 = bitcast <8 x i32> %14 to <4 x i64>
3296 %16 = tail call <4 x i64> @llvm.x86.avx2.psrli.q(<4 x i64> %15, i32 %S)
3300 define <2 x i64> @test_sse2_psrl_0() {
3301 ; CHECK-LABEL: @test_sse2_psrl_0(
3302 ; CHECK-NEXT: ret <2 x i64> zeroinitializer
3304 %S = bitcast i32 128 to i32
3305 %1 = zext i32 %S to i64
3306 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3307 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3308 %4 = bitcast <2 x i64> %3 to <8 x i16>
3309 %5 = tail call <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16> <i16 32, i16 64, i16 128, i16 256, i16 512, i16 1024, i16 2048, i16 4096>, <8 x i16> %4)
3310 %6 = bitcast <8 x i16> %5 to <4 x i32>
3311 %7 = bitcast <2 x i64> %3 to <4 x i32>
3312 %8 = tail call <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32> %6, <4 x i32> %7)
3313 %9 = bitcast <4 x i32> %8 to <2 x i64>
3314 %10 = tail call <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64> %9, <2 x i64> %3)
3315 %11 = bitcast <2 x i64> %10 to <8 x i16>
3316 %12 = tail call <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16> %11, i32 %S)
3317 %13 = bitcast <8 x i16> %12 to <4 x i32>
3318 %14 = tail call <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32> %13, i32 %S)
3319 %15 = bitcast <4 x i32> %14 to <2 x i64>
3320 %16 = tail call <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64> %15, i32 %S)
3324 define <4 x i64> @test_avx2_psrl_0() {
3325 ; CHECK-LABEL: @test_avx2_psrl_0(
3326 ; CHECK-NEXT: ret <4 x i64> zeroinitializer
3328 %S = bitcast i32 128 to i32
3329 %1 = zext i32 %S to i64
3330 %2 = insertelement <2 x i64> undef, i64 %1, i32 0
3331 %3 = insertelement <2 x i64> %2, i64 0, i32 1
3332 %4 = bitcast <2 x i64> %3 to <8 x i16>
3333 %5 = tail call <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16> <i16 1024, i16 0, i16 0, i16 0, i16 2048, i16 0, i16 0, i16 0, i16 4096, i16 0, i16 0, i16 0, i16 8192, i16 0, i16 0, i16 0>, <8 x i16> %4)
3334 %6 = bitcast <16 x i16> %5 to <8 x i32>
3335 %7 = bitcast <2 x i64> %3 to <4 x i32>
3336 %8 = tail call <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32> %6, <4 x i32> %7)
3337 %9 = bitcast <8 x i32> %8 to <4 x i64>
3338 %10 = tail call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %9, <2 x i64> %3)
3339 %11 = bitcast <4 x i64> %10 to <16 x i16>
3340 %12 = tail call <16 x i16> @llvm.x86.avx2.psrli.w(<16 x i16> %11, i32 %S)
3341 %13 = bitcast <16 x i16> %12 to <8 x i32>
3342 %14 = tail call <8 x i32> @llvm.x86.avx2.psrli.d(<8 x i32> %13, i32 %S)
3343 %15 = bitcast <8 x i32> %14 to <4 x i64>
3344 %16 = tail call <4 x i64> @llvm.x86.avx2.psrli.q(<4 x i64> %15, i32 %S)
3348 declare <8 x i64> @llvm.x86.avx512.pslli.q.512(<8 x i64>, i32) #1
3349 declare <16 x i32> @llvm.x86.avx512.pslli.d.512(<16 x i32>, i32) #1
3350 declare <32 x i16> @llvm.x86.avx512.pslli.w.512(<32 x i16>, i32) #1
3351 declare <8 x i64> @llvm.x86.avx512.psll.q.512(<8 x i64>, <2 x i64>) #1
3352 declare <16 x i32> @llvm.x86.avx512.psll.d.512(<16 x i32>, <4 x i32>) #1
3353 declare <32 x i16> @llvm.x86.avx512.psll.w.512(<32 x i16>, <8 x i16>) #1
3354 declare <4 x i64> @llvm.x86.avx2.pslli.q(<4 x i64>, i32) #1
3355 declare <8 x i32> @llvm.x86.avx2.pslli.d(<8 x i32>, i32) #1
3356 declare <16 x i16> @llvm.x86.avx2.pslli.w(<16 x i16>, i32) #1
3357 declare <4 x i64> @llvm.x86.avx2.psll.q(<4 x i64>, <2 x i64>) #1
3358 declare <8 x i32> @llvm.x86.avx2.psll.d(<8 x i32>, <4 x i32>) #1
3359 declare <16 x i16> @llvm.x86.avx2.psll.w(<16 x i16>, <8 x i16>) #1
3360 declare <2 x i64> @llvm.x86.sse2.pslli.q(<2 x i64>, i32) #1
3361 declare <4 x i32> @llvm.x86.sse2.pslli.d(<4 x i32>, i32) #1
3362 declare <8 x i16> @llvm.x86.sse2.pslli.w(<8 x i16>, i32) #1
3363 declare <2 x i64> @llvm.x86.sse2.psll.q(<2 x i64>, <2 x i64>) #1
3364 declare <4 x i32> @llvm.x86.sse2.psll.d(<4 x i32>, <4 x i32>) #1
3365 declare <8 x i16> @llvm.x86.sse2.psll.w(<8 x i16>, <8 x i16>) #1
3367 declare <8 x i64> @llvm.x86.avx512.psrli.q.512(<8 x i64>, i32) #1
3368 declare <16 x i32> @llvm.x86.avx512.psrli.d.512(<16 x i32>, i32) #1
3369 declare <32 x i16> @llvm.x86.avx512.psrli.w.512(<32 x i16>, i32) #1
3370 declare <8 x i64> @llvm.x86.avx512.psrl.q.512(<8 x i64>, <2 x i64>) #1
3371 declare <16 x i32> @llvm.x86.avx512.psrl.d.512(<16 x i32>, <4 x i32>) #1
3372 declare <32 x i16> @llvm.x86.avx512.psrl.w.512(<32 x i16>, <8 x i16>) #1
3373 declare <4 x i64> @llvm.x86.avx2.psrli.q(<4 x i64>, i32) #1
3374 declare <8 x i32> @llvm.x86.avx2.psrli.d(<8 x i32>, i32) #1
3375 declare <16 x i16> @llvm.x86.avx2.psrli.w(<16 x i16>, i32) #1
3376 declare <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64>, <2 x i64>) #1
3377 declare <8 x i32> @llvm.x86.avx2.psrl.d(<8 x i32>, <4 x i32>) #1
3378 declare <16 x i16> @llvm.x86.avx2.psrl.w(<16 x i16>, <8 x i16>) #1
3379 declare <2 x i64> @llvm.x86.sse2.psrli.q(<2 x i64>, i32) #1
3380 declare <4 x i32> @llvm.x86.sse2.psrli.d(<4 x i32>, i32) #1
3381 declare <8 x i16> @llvm.x86.sse2.psrli.w(<8 x i16>, i32) #1
3382 declare <2 x i64> @llvm.x86.sse2.psrl.q(<2 x i64>, <2 x i64>) #1
3383 declare <4 x i32> @llvm.x86.sse2.psrl.d(<4 x i32>, <4 x i32>) #1
3384 declare <8 x i16> @llvm.x86.sse2.psrl.w(<8 x i16>, <8 x i16>) #1
3386 declare <8 x i64> @llvm.x86.avx512.psrai.q.512(<8 x i64>, i32) #1
3387 declare <16 x i32> @llvm.x86.avx512.psrai.d.512(<16 x i32>, i32) #1
3388 declare <32 x i16> @llvm.x86.avx512.psrai.w.512(<32 x i16>, i32) #1
3389 declare <8 x i64> @llvm.x86.avx512.psra.q.512(<8 x i64>, <2 x i64>) #1
3390 declare <16 x i32> @llvm.x86.avx512.psra.d.512(<16 x i32>, <4 x i32>) #1
3391 declare <32 x i16> @llvm.x86.avx512.psra.w.512(<32 x i16>, <8 x i16>) #1
3392 declare <4 x i64> @llvm.x86.avx512.psrai.q.256(<4 x i64>, i32) #1
3393 declare <8 x i32> @llvm.x86.avx2.psrai.d(<8 x i32>, i32) #1
3394 declare <16 x i16> @llvm.x86.avx2.psrai.w(<16 x i16>, i32) #1
3395 declare <4 x i64> @llvm.x86.avx512.psra.q.256(<4 x i64>, <2 x i64>) #1
3396 declare <8 x i32> @llvm.x86.avx2.psra.d(<8 x i32>, <4 x i32>) #1
3397 declare <16 x i16> @llvm.x86.avx2.psra.w(<16 x i16>, <8 x i16>) #1
3398 declare <2 x i64> @llvm.x86.avx512.psrai.q.128(<2 x i64>, i32) #1
3399 declare <4 x i32> @llvm.x86.sse2.psrai.d(<4 x i32>, i32) #1
3400 declare <8 x i16> @llvm.x86.sse2.psrai.w(<8 x i16>, i32) #1
3401 declare <2 x i64> @llvm.x86.avx512.psra.q.128(<2 x i64>, <2 x i64>) #1
3402 declare <4 x i32> @llvm.x86.sse2.psra.d(<4 x i32>, <4 x i32>) #1
3403 declare <8 x i16> @llvm.x86.sse2.psra.w(<8 x i16>, <8 x i16>) #1
3405 declare <4 x i32> @llvm.x86.avx2.psrav.d(<4 x i32>, <4 x i32>) #1
3406 declare <8 x i32> @llvm.x86.avx2.psrav.d.256(<8 x i32>, <8 x i32>) #1
3407 declare <16 x i32> @llvm.x86.avx512.psrav.d.512(<16 x i32>, <16 x i32>) #1
3408 declare <2 x i64> @llvm.x86.avx512.psrav.q.128(<2 x i64>, <2 x i64>) #1
3409 declare <4 x i64> @llvm.x86.avx512.psrav.q.256(<4 x i64>, <4 x i64>) #1
3410 declare <8 x i64> @llvm.x86.avx512.psrav.q.512(<8 x i64>, <8 x i64>) #1
3412 declare <4 x i32> @llvm.x86.avx2.psrlv.d(<4 x i32>, <4 x i32>) #1
3413 declare <8 x i32> @llvm.x86.avx2.psrlv.d.256(<8 x i32>, <8 x i32>) #1
3414 declare <2 x i64> @llvm.x86.avx2.psrlv.q(<2 x i64>, <2 x i64>) #1
3415 declare <4 x i64> @llvm.x86.avx2.psrlv.q.256(<4 x i64>, <4 x i64>) #1
3416 declare <16 x i32> @llvm.x86.avx512.psrlv.d.512(<16 x i32>, <16 x i32>) #1
3417 declare <8 x i64> @llvm.x86.avx512.psrlv.q.512(<8 x i64>, <8 x i64>) #1
3419 declare <4 x i32> @llvm.x86.avx2.psllv.d(<4 x i32>, <4 x i32>) #1
3420 declare <8 x i32> @llvm.x86.avx2.psllv.d.256(<8 x i32>, <8 x i32>) #1
3421 declare <2 x i64> @llvm.x86.avx2.psllv.q(<2 x i64>, <2 x i64>) #1
3422 declare <4 x i64> @llvm.x86.avx2.psllv.q.256(<4 x i64>, <4 x i64>) #1
3423 declare <16 x i32> @llvm.x86.avx512.psllv.d.512(<16 x i32>, <16 x i32>) #1
3424 declare <8 x i64> @llvm.x86.avx512.psllv.q.512(<8 x i64>, <8 x i64>) #1
3426 declare <8 x i16> @llvm.x86.avx512.psrav.w.128(<8 x i16>, <8 x i16>) #1
3427 declare <16 x i16> @llvm.x86.avx512.psrav.w.256(<16 x i16>, <16 x i16>) #1
3428 declare <32 x i16> @llvm.x86.avx512.psrav.w.512(<32 x i16>, <32 x i16>) #1
3429 declare <8 x i16> @llvm.x86.avx512.psrlv.w.128(<8 x i16>, <8 x i16>) #1
3430 declare <16 x i16> @llvm.x86.avx512.psrlv.w.256(<16 x i16>, <16 x i16>) #1
3431 declare <32 x i16> @llvm.x86.avx512.psrlv.w.512(<32 x i16>, <32 x i16>) #1
3432 declare <8 x i16> @llvm.x86.avx512.psllv.w.128(<8 x i16>, <8 x i16>) #1
3433 declare <16 x i16> @llvm.x86.avx512.psllv.w.256(<16 x i16>, <16 x i16>) #1
3434 declare <32 x i16> @llvm.x86.avx512.psllv.w.512(<32 x i16>, <32 x i16>) #1
3436 attributes #1 = { nounwind readnone }