1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 | FileCheck %s --check-prefixes=CHECK,CHECK-SKX
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server | FileCheck %s --check-prefixes=CHECK,CHECK-ICX
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64-v4 | FileCheck %s --check-prefixes=CHECK,CHECK-V4
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=znver4 | FileCheck %s --check-prefixes=CHECK,CHECK-ZNVER4
8 define <4 x i32> @shuf_rot_v4i32_1032(<4 x i32> %x) {
9 ; CHECK-SKX-LABEL: shuf_rot_v4i32_1032:
11 ; CHECK-SKX-NEXT: vpaddd %xmm0, %xmm0, %xmm0
12 ; CHECK-SKX-NEXT: vprolq $32, %xmm0, %xmm0
13 ; CHECK-SKX-NEXT: retq
15 ; CHECK-ICX-LABEL: shuf_rot_v4i32_1032:
17 ; CHECK-ICX-NEXT: vpaddd %xmm0, %xmm0, %xmm0
18 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,0,3,2]
19 ; CHECK-ICX-NEXT: retq
21 ; CHECK-V4-LABEL: shuf_rot_v4i32_1032:
23 ; CHECK-V4-NEXT: vpaddd %xmm0, %xmm0, %xmm0
24 ; CHECK-V4-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,0,3,2]
27 ; CHECK-ZNVER4-LABEL: shuf_rot_v4i32_1032:
28 ; CHECK-ZNVER4: # %bb.0:
29 ; CHECK-ZNVER4-NEXT: vpaddd %xmm0, %xmm0, %xmm0
30 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,0,3,2]
31 ; CHECK-ZNVER4-NEXT: retq
32 %x1 = add <4 x i32> %x, %x
33 %r = shufflevector <4 x i32> %x1, <4 x i32> zeroinitializer, <4 x i32> <i32 1, i32 0, i32 3, i32 2>
37 define <8 x i32> @shuf_rot_v8i32_10325476(<8 x i32> %x) {
38 ; CHECK-SKX-LABEL: shuf_rot_v8i32_10325476:
40 ; CHECK-SKX-NEXT: vpaddd %ymm0, %ymm0, %ymm0
41 ; CHECK-SKX-NEXT: vprolq $32, %ymm0, %ymm0
42 ; CHECK-SKX-NEXT: retq
44 ; CHECK-ICX-LABEL: shuf_rot_v8i32_10325476:
46 ; CHECK-ICX-NEXT: vpaddd %ymm0, %ymm0, %ymm0
47 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[1,0,3,2,5,4,7,6]
48 ; CHECK-ICX-NEXT: retq
50 ; CHECK-V4-LABEL: shuf_rot_v8i32_10325476:
52 ; CHECK-V4-NEXT: vpaddd %ymm0, %ymm0, %ymm0
53 ; CHECK-V4-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[1,0,3,2,5,4,7,6]
56 ; CHECK-ZNVER4-LABEL: shuf_rot_v8i32_10325476:
57 ; CHECK-ZNVER4: # %bb.0:
58 ; CHECK-ZNVER4-NEXT: vpaddd %ymm0, %ymm0, %ymm0
59 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[1,0,3,2,5,4,7,6]
60 ; CHECK-ZNVER4-NEXT: retq
61 %x1 = add <8 x i32> %x, %x
62 %r = shufflevector <8 x i32> %x1, <8 x i32> zeroinitializer, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
66 define <16 x i32> @shuf_rot_v16i32_1032547698111013121514(<16 x i32> %x) {
67 ; CHECK-SKX-LABEL: shuf_rot_v16i32_1032547698111013121514:
69 ; CHECK-SKX-NEXT: vpaddd %zmm0, %zmm0, %zmm0
70 ; CHECK-SKX-NEXT: vprolq $32, %zmm0, %zmm0
71 ; CHECK-SKX-NEXT: retq
73 ; CHECK-ICX-LABEL: shuf_rot_v16i32_1032547698111013121514:
75 ; CHECK-ICX-NEXT: vpaddd %zmm0, %zmm0, %zmm0
76 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[1,0,3,2,5,4,7,6,9,8,11,10,13,12,15,14]
77 ; CHECK-ICX-NEXT: retq
79 ; CHECK-V4-LABEL: shuf_rot_v16i32_1032547698111013121514:
81 ; CHECK-V4-NEXT: vpaddd %zmm0, %zmm0, %zmm0
82 ; CHECK-V4-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[1,0,3,2,5,4,7,6,9,8,11,10,13,12,15,14]
85 ; CHECK-ZNVER4-LABEL: shuf_rot_v16i32_1032547698111013121514:
86 ; CHECK-ZNVER4: # %bb.0:
87 ; CHECK-ZNVER4-NEXT: vpaddd %zmm0, %zmm0, %zmm0
88 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[1,0,3,2,5,4,7,6,9,8,11,10,13,12,15,14]
89 ; CHECK-ZNVER4-NEXT: retq
90 %x1 = add <16 x i32> %x, %x
91 %r = shufflevector <16 x i32> %x1, <16 x i32> zeroinitializer, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
95 define <8 x i16> @shuf_rot_v8i16_10325476(<8 x i16> %x) {
96 ; CHECK-LABEL: shuf_rot_v8i16_10325476:
98 ; CHECK-NEXT: vpaddw %xmm0, %xmm0, %xmm0
99 ; CHECK-NEXT: vprold $16, %xmm0, %xmm0
101 %x1 = add <8 x i16> %x, %x
102 %r = shufflevector <8 x i16> %x1, <8 x i16> zeroinitializer, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
106 define <16 x i16> @shuf_rot_v16i16_1032547698111013121514(<16 x i16> %x) {
107 ; CHECK-LABEL: shuf_rot_v16i16_1032547698111013121514:
109 ; CHECK-NEXT: vpaddw %ymm0, %ymm0, %ymm0
110 ; CHECK-NEXT: vprold $16, %ymm0, %ymm0
112 %x1 = add <16 x i16> %x, %x
113 %r = shufflevector <16 x i16> %x1, <16 x i16> zeroinitializer, <16 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6, i32 9, i32 8, i32 11, i32 10, i32 13, i32 12, i32 15, i32 14>
117 define <32 x i16> @shuf_rot_v32i16_1234056749101181314151217181916212223202527272429303128(<32 x i16> %x) {
118 ; CHECK-LABEL: shuf_rot_v32i16_1234056749101181314151217181916212223202527272429303128:
120 ; CHECK-NEXT: vpaddw %zmm0, %zmm0, %zmm0
121 ; CHECK-NEXT: vprolq $48, %zmm0, %zmm0
123 %x1 = add <32 x i16> %x, %x
124 %r = shufflevector <32 x i16> %x1, <32 x i16> zeroinitializer, <32 x i32> <i32 1,i32 2,i32 3,i32 0,i32 5,i32 6,i32 7,i32 4,i32 9,i32 10,i32 11,i32 8,i32 13,i32 14,i32 15,i32 12,i32 17,i32 18,i32 19,i32 16,i32 21,i32 22,i32 23,i32 20,i32 25,i32 26,i32 27,i32 24,i32 29,i32 30,i32 31,i32 28>
128 define <16 x i8> @shuf_rot_v16i8_2301674510118914151213(<16 x i8> %x) {
129 ; CHECK-LABEL: shuf_rot_v16i8_2301674510118914151213:
131 ; CHECK-NEXT: vpaddb %xmm0, %xmm0, %xmm0
132 ; CHECK-NEXT: vprold $16, %xmm0, %xmm0
134 %x1 = add <16 x i8> %x, %x
135 %r = shufflevector <16 x i8> %x1, <16 x i8> zeroinitializer, <16 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9, i32 14, i32 15, i32 12, i32 13>
139 define <32 x i8> @shuf_rot_v32i8_230167451011891415121318191617222320212627242530312829(<32 x i8> %x) {
140 ; CHECK-LABEL: shuf_rot_v32i8_230167451011891415121318191617222320212627242530312829:
142 ; CHECK-NEXT: vpaddb %ymm0, %ymm0, %ymm0
143 ; CHECK-NEXT: vprold $16, %ymm0, %ymm0
145 %x1 = add <32 x i8> %x, %x
146 %r = shufflevector <32 x i8> %x1, <32 x i8> zeroinitializer, <32 x i32> <i32 2, i32 3, i32 0, i32 1, i32 6, i32 7, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9, i32 14, i32 15, i32 12, i32 13, i32 18, i32 19, i32 16, i32 17, i32 22, i32 23, i32 20, i32 21, i32 26, i32 27, i32 24, i32 25, i32 30, i32 31, i32 28, i32 29>
150 define <64 x i8> @shuf_rot_v64i8_3012745611891015121314191617182320212227242526312829303532333439363738434041424744454651484950555253545956575863606162(<64 x i8> %x) {
151 ; CHECK-LABEL: shuf_rot_v64i8_3012745611891015121314191617182320212227242526312829303532333439363738434041424744454651484950555253545956575863606162:
153 ; CHECK-NEXT: vpaddb %zmm0, %zmm0, %zmm0
154 ; CHECK-NEXT: vprold $8, %zmm0, %zmm0
156 %x1 = add <64 x i8> %x, %x
157 %r = shufflevector <64 x i8> %x1, <64 x i8> zeroinitializer, <64 x i32> <i32 3,i32 0,i32 1,i32 2,i32 7,i32 4,i32 5,i32 6,i32 11,i32 8,i32 9,i32 10,i32 15,i32 12,i32 13,i32 14,i32 19,i32 16,i32 17,i32 18,i32 23,i32 20,i32 21,i32 22,i32 27,i32 24,i32 25,i32 26,i32 31,i32 28,i32 29,i32 30,i32 35,i32 32,i32 33,i32 34,i32 39,i32 36,i32 37,i32 38,i32 43,i32 40,i32 41,i32 42,i32 47,i32 44,i32 45,i32 46,i32 51,i32 48,i32 49,i32 50,i32 55,i32 52,i32 53,i32 54,i32 59,i32 56,i32 57,i32 58,i32 63,i32 60,i32 61,i32 62>
161 define <4 x i32> @shuf_shr_v4i32_1U3U(<4 x i32> %x) {
162 ; CHECK-SKX-LABEL: shuf_shr_v4i32_1U3U:
163 ; CHECK-SKX: # %bb.0:
164 ; CHECK-SKX-NEXT: vpaddd %xmm0, %xmm0, %xmm0
165 ; CHECK-SKX-NEXT: vpsrlq $32, %xmm0, %xmm0
166 ; CHECK-SKX-NEXT: retq
168 ; CHECK-ICX-LABEL: shuf_shr_v4i32_1U3U:
169 ; CHECK-ICX: # %bb.0:
170 ; CHECK-ICX-NEXT: vpaddd %xmm0, %xmm0, %xmm0
171 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
172 ; CHECK-ICX-NEXT: retq
174 ; CHECK-V4-LABEL: shuf_shr_v4i32_1U3U:
176 ; CHECK-V4-NEXT: vpaddd %xmm0, %xmm0, %xmm0
177 ; CHECK-V4-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
178 ; CHECK-V4-NEXT: retq
180 ; CHECK-ZNVER4-LABEL: shuf_shr_v4i32_1U3U:
181 ; CHECK-ZNVER4: # %bb.0:
182 ; CHECK-ZNVER4-NEXT: vpaddd %xmm0, %xmm0, %xmm0
183 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[1,1,3,3]
184 ; CHECK-ZNVER4-NEXT: retq
185 %x1 = add <4 x i32> %x, %x
186 %r = shufflevector <4 x i32> %x1, <4 x i32> zeroinitializer, <4 x i32> <i32 1, i32 undef, i32 3, i32 undef>
190 define <8 x i32> @shuf_shr_v8i32_1U3U5U7U(<8 x i32> %x) {
191 ; CHECK-SKX-LABEL: shuf_shr_v8i32_1U3U5U7U:
192 ; CHECK-SKX: # %bb.0:
193 ; CHECK-SKX-NEXT: vpaddd %ymm0, %ymm0, %ymm0
194 ; CHECK-SKX-NEXT: vpsrlq $32, %ymm0, %ymm0
195 ; CHECK-SKX-NEXT: retq
197 ; CHECK-ICX-LABEL: shuf_shr_v8i32_1U3U5U7U:
198 ; CHECK-ICX: # %bb.0:
199 ; CHECK-ICX-NEXT: vpaddd %ymm0, %ymm0, %ymm0
200 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[1,1,3,3,5,5,7,7]
201 ; CHECK-ICX-NEXT: retq
203 ; CHECK-V4-LABEL: shuf_shr_v8i32_1U3U5U7U:
205 ; CHECK-V4-NEXT: vpaddd %ymm0, %ymm0, %ymm0
206 ; CHECK-V4-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[1,1,3,3,5,5,7,7]
207 ; CHECK-V4-NEXT: retq
209 ; CHECK-ZNVER4-LABEL: shuf_shr_v8i32_1U3U5U7U:
210 ; CHECK-ZNVER4: # %bb.0:
211 ; CHECK-ZNVER4-NEXT: vpaddd %ymm0, %ymm0, %ymm0
212 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[1,1,3,3,5,5,7,7]
213 ; CHECK-ZNVER4-NEXT: retq
214 %x1 = add <8 x i32> %x, %x
215 %r = shufflevector <8 x i32> %x1, <8 x i32> zeroinitializer, <8 x i32> <i32 1, i32 undef, i32 3, i32 undef, i32 5, i32 undef, i32 7, i32 undef>
219 define <16 x i32> @shuf_shr_v16i32_U3U5U7U9U11U13U15(<16 x i32> %x) {
220 ; CHECK-SKX-LABEL: shuf_shr_v16i32_U3U5U7U9U11U13U15:
221 ; CHECK-SKX: # %bb.0:
222 ; CHECK-SKX-NEXT: vpaddd %zmm0, %zmm0, %zmm0
223 ; CHECK-SKX-NEXT: vpsrlq $32, %zmm0, %zmm0
224 ; CHECK-SKX-NEXT: retq
226 ; CHECK-ICX-LABEL: shuf_shr_v16i32_U3U5U7U9U11U13U15:
227 ; CHECK-ICX: # %bb.0:
228 ; CHECK-ICX-NEXT: vpaddd %zmm0, %zmm0, %zmm0
229 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15]
230 ; CHECK-ICX-NEXT: retq
232 ; CHECK-V4-LABEL: shuf_shr_v16i32_U3U5U7U9U11U13U15:
234 ; CHECK-V4-NEXT: vpaddd %zmm0, %zmm0, %zmm0
235 ; CHECK-V4-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15]
236 ; CHECK-V4-NEXT: retq
238 ; CHECK-ZNVER4-LABEL: shuf_shr_v16i32_U3U5U7U9U11U13U15:
239 ; CHECK-ZNVER4: # %bb.0:
240 ; CHECK-ZNVER4-NEXT: vpaddd %zmm0, %zmm0, %zmm0
241 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[1,1,3,3,5,5,7,7,9,9,11,11,13,13,15,15]
242 ; CHECK-ZNVER4-NEXT: retq
243 %x1 = add <16 x i32> %x, %x
244 %r = shufflevector <16 x i32> %x1, <16 x i32> zeroinitializer, <16 x i32> <i32 1, i32 undef, i32 3, i32 undef, i32 5, i32 undef, i32 7, i32 undef, i32 9, i32 undef, i32 11, i32 undef, i32 13, i32 undef, i32 15, i32 undef>
248 define <8 x i16> @shuf_shr_v8i16_123U567U(<8 x i16> %x) {
249 ; CHECK-LABEL: shuf_shr_v8i16_123U567U:
251 ; CHECK-NEXT: vpaddw %xmm0, %xmm0, %xmm0
252 ; CHECK-NEXT: vpsrlq $16, %xmm0, %xmm0
254 %x1 = add <8 x i16> %x, %x
255 %r = shufflevector <8 x i16> %x1, <8 x i16> zeroinitializer, <8 x i32> <i32 1, i32 2, i32 3, i32 undef, i32 5, i32 6, i32 7, i32 undef>
259 define <32 x i16> @shuf_shr_v32i16_1U3U5U7U9U11U13U15U17U19U21U23U25U27U29U31U(<32 x i16> %x) {
260 ; CHECK-LABEL: shuf_shr_v32i16_1U3U5U7U9U11U13U15U17U19U21U23U25U27U29U31U:
262 ; CHECK-NEXT: vpaddw %zmm0, %zmm0, %zmm0
263 ; CHECK-NEXT: vpsrld $16, %zmm0, %zmm0
265 %x1 = add <32 x i16> %x, %x
266 %r = shufflevector <32 x i16> %x1, <32 x i16> zeroinitializer, <32 x i32> <i32 1, i32 undef, i32 3, i32 undef, i32 5, i32 undef, i32 7, i32 undef, i32 9, i32 undef, i32 11, i32 undef, i32 13, i32 undef, i32 15, i32 undef, i32 17, i32 undef, i32 19, i32 undef, i32 21, i32 undef, i32 23, i32 undef, i32 25, i32 undef, i32 27, i32 undef, i32 29, i32 undef, i32 31, i32 undef>
270 define <32 x i8> @shuf_shr_v32i8_1U3U5U7U9U11U13U15U17U19U21U23U25U27U29U31U(<32 x i8> %x) {
271 ; CHECK-LABEL: shuf_shr_v32i8_1U3U5U7U9U11U13U15U17U19U21U23U25U27U29U31U:
273 ; CHECK-NEXT: vpaddb %ymm0, %ymm0, %ymm0
274 ; CHECK-NEXT: vpsrlw $8, %ymm0, %ymm0
276 %x1 = add <32 x i8> %x, %x
277 %r = shufflevector <32 x i8> %x1, <32 x i8> zeroinitializer, <32 x i32> <i32 1, i32 undef, i32 3, i32 undef, i32 5, i32 undef, i32 7, i32 undef, i32 9, i32 undef, i32 11, i32 undef, i32 13, i32 undef, i32 15, i32 undef, i32 17, i32 undef, i32 19, i32 undef, i32 21, i32 undef, i32 23, i32 undef, i32 25, i32 undef, i32 27, i32 undef, i32 29, i32 undef, i32 31, i32 undef>
281 define <4 x i32> @shuf_shl_v4i32_U0U2(<4 x i32> %x) {
282 ; CHECK-SKX-LABEL: shuf_shl_v4i32_U0U2:
283 ; CHECK-SKX: # %bb.0:
284 ; CHECK-SKX-NEXT: vpaddd %xmm0, %xmm0, %xmm0
285 ; CHECK-SKX-NEXT: vpsllq $32, %xmm0, %xmm0
286 ; CHECK-SKX-NEXT: retq
288 ; CHECK-ICX-LABEL: shuf_shl_v4i32_U0U2:
289 ; CHECK-ICX: # %bb.0:
290 ; CHECK-ICX-NEXT: vpaddd %xmm0, %xmm0, %xmm0
291 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,0,2,2]
292 ; CHECK-ICX-NEXT: retq
294 ; CHECK-V4-LABEL: shuf_shl_v4i32_U0U2:
296 ; CHECK-V4-NEXT: vpaddd %xmm0, %xmm0, %xmm0
297 ; CHECK-V4-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,0,2,2]
298 ; CHECK-V4-NEXT: retq
300 ; CHECK-ZNVER4-LABEL: shuf_shl_v4i32_U0U2:
301 ; CHECK-ZNVER4: # %bb.0:
302 ; CHECK-ZNVER4-NEXT: vpaddd %xmm0, %xmm0, %xmm0
303 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} xmm0 = xmm0[0,0,2,2]
304 ; CHECK-ZNVER4-NEXT: retq
305 %x1 = add <4 x i32> %x, %x
306 %r = shufflevector <4 x i32> %x1, <4 x i32> zeroinitializer, <4 x i32> <i32 undef, i32 0, i32 undef, i32 2>
310 define <8 x i32> @shuf_shl_v8i32_U0U2U4U6(<8 x i32> %x) {
311 ; CHECK-SKX-LABEL: shuf_shl_v8i32_U0U2U4U6:
312 ; CHECK-SKX: # %bb.0:
313 ; CHECK-SKX-NEXT: vpaddd %ymm0, %ymm0, %ymm0
314 ; CHECK-SKX-NEXT: vpsllq $32, %ymm0, %ymm0
315 ; CHECK-SKX-NEXT: retq
317 ; CHECK-ICX-LABEL: shuf_shl_v8i32_U0U2U4U6:
318 ; CHECK-ICX: # %bb.0:
319 ; CHECK-ICX-NEXT: vpaddd %ymm0, %ymm0, %ymm0
320 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[0,0,2,2,4,4,6,6]
321 ; CHECK-ICX-NEXT: retq
323 ; CHECK-V4-LABEL: shuf_shl_v8i32_U0U2U4U6:
325 ; CHECK-V4-NEXT: vpaddd %ymm0, %ymm0, %ymm0
326 ; CHECK-V4-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[0,0,2,2,4,4,6,6]
327 ; CHECK-V4-NEXT: retq
329 ; CHECK-ZNVER4-LABEL: shuf_shl_v8i32_U0U2U4U6:
330 ; CHECK-ZNVER4: # %bb.0:
331 ; CHECK-ZNVER4-NEXT: vpaddd %ymm0, %ymm0, %ymm0
332 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} ymm0 = ymm0[0,0,2,2,4,4,6,6]
333 ; CHECK-ZNVER4-NEXT: retq
334 %x1 = add <8 x i32> %x, %x
335 %r = shufflevector <8 x i32> %x1, <8 x i32> zeroinitializer, <8 x i32> <i32 undef, i32 0, i32 undef, i32 2, i32 undef, i32 4, i32 undef, i32 6>
339 define <16 x i32> @shuf_shl_v16i32_U0U2U4U6U8U10U12U14(<16 x i32> %x) {
340 ; CHECK-SKX-LABEL: shuf_shl_v16i32_U0U2U4U6U8U10U12U14:
341 ; CHECK-SKX: # %bb.0:
342 ; CHECK-SKX-NEXT: vpaddd %zmm0, %zmm0, %zmm0
343 ; CHECK-SKX-NEXT: vpsllq $32, %zmm0, %zmm0
344 ; CHECK-SKX-NEXT: retq
346 ; CHECK-ICX-LABEL: shuf_shl_v16i32_U0U2U4U6U8U10U12U14:
347 ; CHECK-ICX: # %bb.0:
348 ; CHECK-ICX-NEXT: vpaddd %zmm0, %zmm0, %zmm0
349 ; CHECK-ICX-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[0,0,2,2,4,4,6,6,8,8,10,10,12,12,14,14]
350 ; CHECK-ICX-NEXT: retq
352 ; CHECK-V4-LABEL: shuf_shl_v16i32_U0U2U4U6U8U10U12U14:
354 ; CHECK-V4-NEXT: vpaddd %zmm0, %zmm0, %zmm0
355 ; CHECK-V4-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[0,0,2,2,4,4,6,6,8,8,10,10,12,12,14,14]
356 ; CHECK-V4-NEXT: retq
358 ; CHECK-ZNVER4-LABEL: shuf_shl_v16i32_U0U2U4U6U8U10U12U14:
359 ; CHECK-ZNVER4: # %bb.0:
360 ; CHECK-ZNVER4-NEXT: vpaddd %zmm0, %zmm0, %zmm0
361 ; CHECK-ZNVER4-NEXT: vpshufd {{.*#+}} zmm0 = zmm0[0,0,2,2,4,4,6,6,8,8,10,10,12,12,14,14]
362 ; CHECK-ZNVER4-NEXT: retq
363 %x1 = add <16 x i32> %x, %x
364 %r = shufflevector <16 x i32> %x1, <16 x i32> zeroinitializer, <16 x i32> <i32 undef, i32 0, i32 undef, i32 2, i32 undef, i32 4, i32 undef, i32 6, i32 undef, i32 8, i32 undef, i32 10, i32 undef, i32 12, i32 undef, i32 14>
368 define <16 x i16> @shuf_shl_v16i16_U0U2U4U6U8U10U12U14(<16 x i16> %x) {
369 ; CHECK-LABEL: shuf_shl_v16i16_U0U2U4U6U8U10U12U14:
371 ; CHECK-NEXT: vpaddw %ymm0, %ymm0, %ymm0
372 ; CHECK-NEXT: vpslld $16, %ymm0, %ymm0
374 %x1 = add <16 x i16> %x, %x
375 %r = shufflevector <16 x i16> %x1, <16 x i16> zeroinitializer, <16 x i32> <i32 undef, i32 0, i32 undef, i32 2, i32 undef, i32 4, i32 undef, i32 6, i32 undef, i32 8, i32 undef, i32 10, i32 undef, i32 12, i32 undef, i32 14>
379 define <16 x i8> @shuf_shl_v16i8_U0U2U4U6U8U10U12U14(<16 x i8> %x) {
380 ; CHECK-LABEL: shuf_shl_v16i8_U0U2U4U6U8U10U12U14:
382 ; CHECK-NEXT: vpaddb %xmm0, %xmm0, %xmm0
383 ; CHECK-NEXT: vpsllw $8, %xmm0, %xmm0
385 %x1 = add <16 x i8> %x, %x
386 %r = shufflevector <16 x i8> %x1, <16 x i8> zeroinitializer, <16 x i32> <i32 undef, i32 0, i32 undef, i32 2, i32 undef, i32 4, i32 undef, i32 6, i32 undef, i32 8, i32 undef, i32 10, i32 undef, i32 12, i32 undef, i32 14>
390 define <64 x i8> @shuf_shl_v64i8_U0U2U4U6U8U10U12U14U16U18U20U22U24U26U28U30U32U34U36U38U40U42U44U46U48U50U52U54U56U58U60U62(<64 x i8> %x) {
391 ; CHECK-LABEL: shuf_shl_v64i8_U0U2U4U6U8U10U12U14U16U18U20U22U24U26U28U30U32U34U36U38U40U42U44U46U48U50U52U54U56U58U60U62:
393 ; CHECK-NEXT: vpaddb %zmm0, %zmm0, %zmm0
394 ; CHECK-NEXT: vpsllw $8, %zmm0, %zmm0
396 %x1 = add <64 x i8> %x, %x
397 %r = shufflevector <64 x i8> %x1, <64 x i8> zeroinitializer, <64 x i32> <i32 undef, i32 0, i32 undef, i32 2, i32 undef, i32 4, i32 undef, i32 6, i32 undef, i32 8, i32 undef, i32 10, i32 undef, i32 12, i32 undef, i32 14, i32 undef, i32 16, i32 undef, i32 18, i32 undef, i32 20, i32 undef, i32 22, i32 undef, i32 24, i32 undef, i32 26, i32 undef, i32 28, i32 undef, i32 30, i32 undef, i32 32, i32 undef, i32 34, i32 undef, i32 36, i32 undef, i32 38, i32 undef, i32 40, i32 undef, i32 42, i32 undef, i32 44, i32 undef, i32 46, i32 undef, i32 48, i32 undef, i32 50, i32 undef, i32 52, i32 undef, i32 54, i32 undef, i32 56, i32 undef, i32 58, i32 undef, i32 60, i32 undef, i32 62>