1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mattr=+avx512f | FileCheck %s --check-prefix=ALL --check-prefix=AVX512F
3 ; RUN: llc < %s -mtriple=i386-unknown-linux-gnu -mattr=+avx512f | FileCheck %s --check-prefix=ALL --check-prefix=AVX512F-32
5 define <8 x double> @shuffle_v8f64_00000000(<8 x double> %a, <8 x double> %b) {
6 ; ALL-LABEL: shuffle_v8f64_00000000:
8 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
9 ; ALL-NEXT: ret{{[l|q]}}
10 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
11 ret <8 x double> %shuffle
14 define <8 x double> @shuffle_v8f64_22222222(<8 x double> %a, <8 x double> %b) {
15 ; ALL-LABEL: shuffle_v8f64_22222222:
17 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
18 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
19 ; ALL-NEXT: ret{{[l|q]}}
20 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
21 ret <8 x double> %shuffle
24 define <8 x double> @shuffle_v8f64_44444444(<8 x double> %a, <8 x double> %b) {
25 ; ALL-LABEL: shuffle_v8f64_44444444:
27 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm0
28 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
29 ; ALL-NEXT: ret{{[l|q]}}
30 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
31 ret <8 x double> %shuffle
34 define <8 x double> @shuffle_v8f64_44444444_bc(<8 x i64> %a, <8 x i64> %b) {
35 ; ALL-LABEL: shuffle_v8f64_44444444_bc:
37 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm0
38 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
39 ; ALL-NEXT: ret{{[l|q]}}
40 %tmp0 = bitcast <8 x i64> %a to <8 x double>
41 %tmp1 = bitcast <8 x i64> %b to <8 x double>
42 %shuffle = shufflevector <8 x double> %tmp0, <8 x double> %tmp1, <8 x i32> <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
43 ret <8 x double> %shuffle
46 define <8 x double> @shuffle_v8f64_00000010(<8 x double> %a, <8 x double> %b) {
47 ; AVX512F-LABEL: shuffle_v8f64_00000010:
49 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0]
50 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
53 ; AVX512F-32-LABEL: shuffle_v8f64_00000010:
54 ; AVX512F-32: # %bb.0:
55 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]
56 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
57 ; AVX512F-32-NEXT: retl
58 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0>
59 ret <8 x double> %shuffle
62 define <8 x double> @shuffle_v8f64_00000200(<8 x double> %a, <8 x double> %b) {
63 ; AVX512F-LABEL: shuffle_v8f64_00000200:
65 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,2,0,0]
66 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
69 ; AVX512F-32-LABEL: shuffle_v8f64_00000200:
70 ; AVX512F-32: # %bb.0:
71 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0]
72 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
73 ; AVX512F-32-NEXT: retl
74 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0>
75 ret <8 x double> %shuffle
78 define <8 x double> @shuffle_v8f64_00003000(<8 x double> %a, <8 x double> %b) {
79 ; AVX512F-LABEL: shuffle_v8f64_00003000:
81 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,3,0,0,0]
82 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
85 ; AVX512F-32-LABEL: shuffle_v8f64_00003000:
86 ; AVX512F-32: # %bb.0:
87 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0]
88 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
89 ; AVX512F-32-NEXT: retl
90 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0>
91 ret <8 x double> %shuffle
94 define <8 x double> @shuffle_v8f64_00040000(<8 x double> %a, <8 x double> %b) {
95 ; AVX512F-LABEL: shuffle_v8f64_00040000:
97 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,4,0,0,0,0]
98 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
101 ; AVX512F-32-LABEL: shuffle_v8f64_00040000:
102 ; AVX512F-32: # %bb.0:
103 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0]
104 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
105 ; AVX512F-32-NEXT: retl
106 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0>
107 ret <8 x double> %shuffle
110 define <8 x double> @shuffle_v8f64_00500000(<8 x double> %a, <8 x double> %b) {
111 ; AVX512F-LABEL: shuffle_v8f64_00500000:
113 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,5,0,0,0,0,0]
114 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
117 ; AVX512F-32-LABEL: shuffle_v8f64_00500000:
118 ; AVX512F-32: # %bb.0:
119 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0]
120 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
121 ; AVX512F-32-NEXT: retl
122 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0>
123 ret <8 x double> %shuffle
126 define <8 x double> @shuffle_v8f64_06000000(<8 x double> %a, <8 x double> %b) {
127 ; AVX512F-LABEL: shuffle_v8f64_06000000:
129 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,6,0,0,0,0,0,0]
130 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
133 ; AVX512F-32-LABEL: shuffle_v8f64_06000000:
134 ; AVX512F-32: # %bb.0:
135 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0]
136 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
137 ; AVX512F-32-NEXT: retl
138 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
139 ret <8 x double> %shuffle
142 define <8 x double> @shuffle_v8f64_70000000(<8 x double> %a, <8 x double> %b) {
143 ; AVX512F-LABEL: shuffle_v8f64_70000000:
145 ; AVX512F-NEXT: movl $7, %eax
146 ; AVX512F-NEXT: vmovq %rax, %xmm1
147 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
150 ; AVX512F-32-LABEL: shuffle_v8f64_70000000:
151 ; AVX512F-32: # %bb.0:
152 ; AVX512F-32-NEXT: movl $7, %eax
153 ; AVX512F-32-NEXT: vmovd %eax, %xmm1
154 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
155 ; AVX512F-32-NEXT: retl
156 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
157 ret <8 x double> %shuffle
160 define <8 x double> @shuffle_v8f64_01014545(<8 x double> %a, <8 x double> %b) {
161 ; ALL-LABEL: shuffle_v8f64_01014545:
163 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5]
164 ; ALL-NEXT: ret{{[l|q]}}
165 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 4, i32 5, i32 4, i32 5>
166 ret <8 x double> %shuffle
169 define <8 x double> @shuffle_v8f64_00112233(<8 x double> %a, <8 x double> %b) {
170 ; AVX512F-LABEL: shuffle_v8f64_00112233:
172 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,1,2,2,3,3]
173 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
176 ; AVX512F-32-LABEL: shuffle_v8f64_00112233:
177 ; AVX512F-32: # %bb.0:
178 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0]
179 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
180 ; AVX512F-32-NEXT: retl
181 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3>
182 ret <8 x double> %shuffle
185 define <8 x double> @shuffle_v8f64_00001111(<8 x double> %a, <8 x double> %b) {
186 ; AVX512F-LABEL: shuffle_v8f64_00001111:
188 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,1,1,1]
189 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
192 ; AVX512F-32-LABEL: shuffle_v8f64_00001111:
193 ; AVX512F-32: # %bb.0:
194 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0]
195 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
196 ; AVX512F-32-NEXT: retl
197 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1>
198 ret <8 x double> %shuffle
201 define <8 x double> @shuffle_v8f64_81a3c5e7(<8 x double> %a, <8 x double> %b) {
203 ; ALL-LABEL: shuffle_v8f64_81a3c5e7:
205 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm1[0],zmm0[1],zmm1[2],zmm0[3],zmm1[4],zmm0[5],zmm1[6],zmm0[7]
206 ; ALL-NEXT: ret{{[l|q]}}
207 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7>
208 ret <8 x double> %shuffle
211 define <8 x double> @shuffle_v8f64_08080808(<8 x double> %a, <8 x double> %b) {
213 ; AVX512F-LABEL: shuffle_v8f64_08080808:
215 ; AVX512F-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,8,0,8,0,8,0,8]
216 ; AVX512F-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
217 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
220 ; AVX512F-32-LABEL: shuffle_v8f64_08080808:
221 ; AVX512F-32: # %bb.0:
222 ; AVX512F-32-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,0,0,8,0,0,0,8,0]
223 ; AVX512F-32-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
224 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
225 ; AVX512F-32-NEXT: retl
226 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 0, i32 8, i32 0, i32 8>
227 ret <8 x double> %shuffle
230 define <8 x double> @shuffle_v8f64_08084c4c(<8 x double> %a, <8 x double> %b) {
232 ; AVX512F-LABEL: shuffle_v8f64_08084c4c:
234 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,8,0,8,4,12,4,12]
235 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
238 ; AVX512F-32-LABEL: shuffle_v8f64_08084c4c:
239 ; AVX512F-32: # %bb.0:
240 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,4,0,12,0,4,0,12,0]
241 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
242 ; AVX512F-32-NEXT: retl
243 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 4, i32 12, i32 4, i32 12>
244 ret <8 x double> %shuffle
247 define <8 x double> @shuffle_v8f64_8823cc67(<8 x double> %a, <8 x double> %b) {
249 ; AVX512F-LABEL: shuffle_v8f64_8823cc67:
251 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,10,11,4,4,14,15]
252 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
253 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
256 ; AVX512F-32-LABEL: shuffle_v8f64_8823cc67:
257 ; AVX512F-32: # %bb.0:
258 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,0,0,10,0,11,0,4,0,4,0,14,0,15,0]
259 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
260 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
261 ; AVX512F-32-NEXT: retl
262 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 8, i32 8, i32 2, i32 3, i32 12, i32 12, i32 6, i32 7>
263 ret <8 x double> %shuffle
266 define <8 x double> @shuffle_v8f64_9832dc76(<8 x double> %a, <8 x double> %b) {
268 ; AVX512F-LABEL: shuffle_v8f64_9832dc76:
270 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,11,10,5,4,15,14]
271 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
272 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
275 ; AVX512F-32-LABEL: shuffle_v8f64_9832dc76:
276 ; AVX512F-32: # %bb.0:
277 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,0,0,11,0,10,0,5,0,4,0,15,0,14,0]
278 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
279 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
280 ; AVX512F-32-NEXT: retl
281 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 9, i32 8, i32 3, i32 2, i32 13, i32 12, i32 7, i32 6>
282 ret <8 x double> %shuffle
285 define <8 x double> @shuffle_v8f64_9810dc54(<8 x double> %a, <8 x double> %b) {
287 ; AVX512F-LABEL: shuffle_v8f64_9810dc54:
289 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,9,8,5,4,13,12]
290 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
291 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
294 ; AVX512F-32-LABEL: shuffle_v8f64_9810dc54:
295 ; AVX512F-32: # %bb.0:
296 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,0,0,9,0,8,0,5,0,4,0,13,0,12,0]
297 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
298 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
299 ; AVX512F-32-NEXT: retl
300 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 9, i32 8, i32 1, i32 0, i32 13, i32 12, i32 5, i32 4>
301 ret <8 x double> %shuffle
304 define <8 x double> @shuffle_v8f64_08194c5d(<8 x double> %a, <8 x double> %b) {
306 ; AVX512F-LABEL: shuffle_v8f64_08194c5d:
308 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,8,1,9,4,12,5,13]
309 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
312 ; AVX512F-32-LABEL: shuffle_v8f64_08194c5d:
313 ; AVX512F-32: # %bb.0:
314 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,4,0,12,0,5,0,13,0]
315 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
316 ; AVX512F-32-NEXT: retl
317 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
318 ret <8 x double> %shuffle
321 define <8 x double> @shuffle_v8f64_2a3b6e7f(<8 x double> %a, <8 x double> %b) {
323 ; AVX512F-LABEL: shuffle_v8f64_2a3b6e7f:
325 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [2,10,3,11,6,14,7,15]
326 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
329 ; AVX512F-32-LABEL: shuffle_v8f64_2a3b6e7f:
330 ; AVX512F-32: # %bb.0:
331 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [2,0,10,0,3,0,11,0,6,0,14,0,7,0,15,0]
332 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
333 ; AVX512F-32-NEXT: retl
334 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
335 ret <8 x double> %shuffle
338 define <8 x double> @shuffle_v8f64_08192a3b(<8 x double> %a, <8 x double> %b) {
340 ; AVX512F-LABEL: shuffle_v8f64_08192a3b:
342 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,8,1,9,2,10,3,11]
343 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
346 ; AVX512F-32-LABEL: shuffle_v8f64_08192a3b:
347 ; AVX512F-32: # %bb.0:
348 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,2,0,10,0,3,0,11,0]
349 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
350 ; AVX512F-32-NEXT: retl
351 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
352 ret <8 x double> %shuffle
355 define <8 x double> @shuffle_v8f64_08991abb(<8 x double> %a, <8 x double> %b) {
357 ; AVX512F-LABEL: shuffle_v8f64_08991abb:
359 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [8,0,1,1,9,2,3,3]
360 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
361 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
364 ; AVX512F-32-LABEL: shuffle_v8f64_08991abb:
365 ; AVX512F-32: # %bb.0:
366 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [8,0,0,0,1,0,1,0,9,0,2,0,3,0,3,0]
367 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
368 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
369 ; AVX512F-32-NEXT: retl
370 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 8, i32 9, i32 9, i32 1, i32 10, i32 11, i32 11>
371 ret <8 x double> %shuffle
374 define <8 x double> @shuffle_v8f64_091b2d3f(<8 x double> %a, <8 x double> %b) {
376 ; AVX512F-LABEL: shuffle_v8f64_091b2d3f:
378 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,9,1,11,2,13,3,15]
379 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
382 ; AVX512F-32-LABEL: shuffle_v8f64_091b2d3f:
383 ; AVX512F-32: # %bb.0:
384 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,9,0,1,0,11,0,2,0,13,0,3,0,15,0]
385 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
386 ; AVX512F-32-NEXT: retl
387 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 9, i32 1, i32 11, i32 2, i32 13, i32 3, i32 15>
388 ret <8 x double> %shuffle
391 define <8 x double> @shuffle_v8f64_09ab1def(<8 x double> %a, <8 x double> %b) {
393 ; AVX512F-LABEL: shuffle_v8f64_09ab1def:
395 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [8,1,2,3,9,5,6,7]
396 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
397 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
400 ; AVX512F-32-LABEL: shuffle_v8f64_09ab1def:
401 ; AVX512F-32: # %bb.0:
402 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [8,0,1,0,2,0,3,0,9,0,5,0,6,0,7,0]
403 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
404 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
405 ; AVX512F-32-NEXT: retl
406 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 9, i32 10, i32 11, i32 1, i32 13, i32 14, i32 15>
407 ret <8 x double> %shuffle
410 define <8 x double> @shuffle_v8f64_00014445(<8 x double> %a, <8 x double> %b) {
412 ; ALL-LABEL: shuffle_v8f64_00014445:
414 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,0,1,4,4,4,5]
415 ; ALL-NEXT: ret{{[l|q]}}
416 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 4, i32 4, i32 4, i32 5>
417 ret <8 x double> %shuffle
420 define <8 x double> @shuffle_v8f64_00204464(<8 x double> %a, <8 x double> %b) {
422 ; ALL-LABEL: shuffle_v8f64_00204464:
424 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,0,4,4,6,4]
425 ; ALL-NEXT: ret{{[l|q]}}
426 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 4, i32 6, i32 4>
427 ret <8 x double> %shuffle
430 define <8 x double> @shuffle_v8f64_03004744(<8 x double> %a, <8 x double> %b) {
432 ; ALL-LABEL: shuffle_v8f64_03004744:
434 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,3,0,0,4,7,4,4]
435 ; ALL-NEXT: ret{{[l|q]}}
436 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 7, i32 4, i32 4>
437 ret <8 x double> %shuffle
440 define <8 x double> @shuffle_v8f64_10005444(<8 x double> %a, <8 x double> %b) {
442 ; ALL-LABEL: shuffle_v8f64_10005444:
444 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,0,0,5,4,4,4]
445 ; ALL-NEXT: ret{{[l|q]}}
446 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 5, i32 4, i32 4, i32 4>
447 ret <8 x double> %shuffle
450 define <8 x double> @shuffle_v8f64_22006644(<8 x double> %a, <8 x double> %b) {
452 ; ALL-LABEL: shuffle_v8f64_22006644:
454 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[2,2,0,0,6,6,4,4]
455 ; ALL-NEXT: ret{{[l|q]}}
456 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 6, i32 4, i32 4>
457 ret <8 x double> %shuffle
460 define <8 x double> @shuffle_v8f64_33307774(<8 x double> %a, <8 x double> %b) {
462 ; ALL-LABEL: shuffle_v8f64_33307774:
464 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,3,3,0,7,7,7,4]
465 ; ALL-NEXT: ret{{[l|q]}}
466 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 7, i32 7, i32 4>
467 ret <8 x double> %shuffle
470 define <8 x double> @shuffle_v8f64_32107654(<8 x double> %a, <8 x double> %b) {
472 ; ALL-LABEL: shuffle_v8f64_32107654:
474 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,2,1,0,7,6,5,4]
475 ; ALL-NEXT: ret{{[l|q]}}
476 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
477 ret <8 x double> %shuffle
480 define <8 x double> @shuffle_v8f64_00234467(<8 x double> %a, <8 x double> %b) {
482 ; ALL-LABEL: shuffle_v8f64_00234467:
484 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,7]
485 ; ALL-NEXT: ret{{[l|q]}}
486 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 4, i32 4, i32 6, i32 7>
487 ret <8 x double> %shuffle
490 define <8 x double> @shuffle_v8f64_00224466(<8 x double> %a, <8 x double> %b) {
492 ; ALL-LABEL: shuffle_v8f64_00224466:
494 ; ALL-NEXT: vmovddup {{.*#+}} zmm0 = zmm0[0,0,2,2,4,4,6,6]
495 ; ALL-NEXT: ret{{[l|q]}}
496 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6>
497 ret <8 x double> %shuffle
500 define <8 x double> @shuffle_v8f64_10325476(<8 x double> %a, <8 x double> %b) {
502 ; ALL-LABEL: shuffle_v8f64_10325476:
504 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,0,3,2,5,4,7,6]
505 ; ALL-NEXT: ret{{[l|q]}}
506 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
507 ret <8 x double> %shuffle
510 define <8 x double> @shuffle_v8f64_11335577(<8 x double> %a, <8 x double> %b) {
512 ; ALL-LABEL: shuffle_v8f64_11335577:
514 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,1,3,3,5,5,7,7]
515 ; ALL-NEXT: ret{{[l|q]}}
516 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7>
517 ret <8 x double> %shuffle
520 define <8 x double> @shuffle_v8f64_10235467(<8 x double> %a, <8 x double> %b) {
522 ; ALL-LABEL: shuffle_v8f64_10235467:
524 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,0,2,3,5,4,6,7]
525 ; ALL-NEXT: ret{{[l|q]}}
526 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7>
527 ret <8 x double> %shuffle
530 define <8 x double> @shuffle_v8f64_10225466(<8 x double> %a, <8 x double> %b) {
532 ; ALL-LABEL: shuffle_v8f64_10225466:
534 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,0,2,2,5,4,6,6]
535 ; ALL-NEXT: ret{{[l|q]}}
536 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 2, i32 5, i32 4, i32 6, i32 6>
537 ret <8 x double> %shuffle
540 define <8 x double> @shuffle_v8f64_00015444(<8 x double> %a, <8 x double> %b) {
542 ; AVX512F-LABEL: shuffle_v8f64_00015444:
544 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,1,5,4,4,4]
545 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
548 ; AVX512F-32-LABEL: shuffle_v8f64_00015444:
549 ; AVX512F-32: # %bb.0:
550 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0,5,0,4,0,4,0,4,0]
551 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
552 ; AVX512F-32-NEXT: retl
553 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 5, i32 4, i32 4, i32 4>
554 ret <8 x double> %shuffle
557 define <8 x double> @shuffle_v8f64_00204644(<8 x double> %a, <8 x double> %b) {
559 ; AVX512F-LABEL: shuffle_v8f64_00204644:
561 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,0,4,6,4,4]
562 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
565 ; AVX512F-32-LABEL: shuffle_v8f64_00204644:
566 ; AVX512F-32: # %bb.0:
567 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,0,0,4,0,6,0,4,0,4,0]
568 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
569 ; AVX512F-32-NEXT: retl
570 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 6, i32 4, i32 4>
571 ret <8 x double> %shuffle
574 define <8 x double> @shuffle_v8f64_03004474(<8 x double> %a, <8 x double> %b) {
576 ; AVX512F-LABEL: shuffle_v8f64_03004474:
578 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,3,0,0,4,4,7,4]
579 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
582 ; AVX512F-32-LABEL: shuffle_v8f64_03004474:
583 ; AVX512F-32: # %bb.0:
584 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,3,0,0,0,0,0,4,0,4,0,7,0,4,0]
585 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
586 ; AVX512F-32-NEXT: retl
587 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 4, i32 7, i32 4>
588 ret <8 x double> %shuffle
591 define <8 x double> @shuffle_v8f64_10004444(<8 x double> %a, <8 x double> %b) {
593 ; AVX512F-LABEL: shuffle_v8f64_10004444:
595 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,4,4,4,4]
596 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
599 ; AVX512F-32-LABEL: shuffle_v8f64_10004444:
600 ; AVX512F-32: # %bb.0:
601 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,0,0,0,0,4,0,4,0,4,0,4,0]
602 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
603 ; AVX512F-32-NEXT: retl
604 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
605 ret <8 x double> %shuffle
608 define <8 x double> @shuffle_v8f64_22006446(<8 x double> %a, <8 x double> %b) {
610 ; AVX512F-LABEL: shuffle_v8f64_22006446:
612 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [2,2,0,0,6,4,4,6]
613 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
616 ; AVX512F-32-LABEL: shuffle_v8f64_22006446:
617 ; AVX512F-32: # %bb.0:
618 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [2,0,2,0,0,0,0,0,6,0,4,0,4,0,6,0]
619 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
620 ; AVX512F-32-NEXT: retl
621 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 4, i32 4, i32 6>
622 ret <8 x double> %shuffle
625 define <8 x double> @shuffle_v8f64_33307474(<8 x double> %a, <8 x double> %b) {
627 ; AVX512F-LABEL: shuffle_v8f64_33307474:
629 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,3,3,0,7,4,7,4]
630 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
633 ; AVX512F-32-LABEL: shuffle_v8f64_33307474:
634 ; AVX512F-32: # %bb.0:
635 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,3,0,3,0,0,0,7,0,4,0,7,0,4,0]
636 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
637 ; AVX512F-32-NEXT: retl
638 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 4, i32 7, i32 4>
639 ret <8 x double> %shuffle
642 define <8 x double> @shuffle_v8f64_32104567(<8 x double> %a, <8 x double> %b) {
644 ; AVX512F-LABEL: shuffle_v8f64_32104567:
646 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,2,1,0,4,5,6,7]
647 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
650 ; AVX512F-32-LABEL: shuffle_v8f64_32104567:
651 ; AVX512F-32: # %bb.0:
652 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,2,0,1,0,0,0,4,0,5,0,6,0,7,0]
653 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
654 ; AVX512F-32-NEXT: retl
655 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 4, i32 5, i32 6, i32 7>
656 ret <8 x double> %shuffle
659 define <8 x double> @shuffle_v8f64_00236744(<8 x double> %a, <8 x double> %b) {
661 ; AVX512F-LABEL: shuffle_v8f64_00236744:
663 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,3,6,7,4,4]
664 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
667 ; AVX512F-32-LABEL: shuffle_v8f64_00236744:
668 ; AVX512F-32: # %bb.0:
669 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,3,0,6,0,7,0,4,0,4,0]
670 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
671 ; AVX512F-32-NEXT: retl
672 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 6, i32 7, i32 4, i32 4>
673 ret <8 x double> %shuffle
676 define <8 x double> @shuffle_v8f64_00226644(<8 x double> %a, <8 x double> %b) {
678 ; AVX512F-LABEL: shuffle_v8f64_00226644:
680 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,2,6,6,4,4]
681 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
684 ; AVX512F-32-LABEL: shuffle_v8f64_00226644:
685 ; AVX512F-32: # %bb.0:
686 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,2,0,6,0,6,0,4,0,4,0]
687 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
688 ; AVX512F-32-NEXT: retl
689 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 6, i32 6, i32 4, i32 4>
690 ret <8 x double> %shuffle
693 define <8 x double> @shuffle_v8f64_10324567(<8 x double> %a, <8 x double> %b) {
695 ; ALL-LABEL: shuffle_v8f64_10324567:
697 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,0,3,2,4,5,6,7]
698 ; ALL-NEXT: ret{{[l|q]}}
699 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 6, i32 7>
700 ret <8 x double> %shuffle
703 define <8 x double> @shuffle_v8f64_11334567(<8 x double> %a, <8 x double> %b) {
705 ; ALL-LABEL: shuffle_v8f64_11334567:
707 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,1,3,3,4,5,6,7]
708 ; ALL-NEXT: ret{{[l|q]}}
709 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 4, i32 5, i32 6, i32 7>
710 ret <8 x double> %shuffle
713 define <8 x double> @shuffle_v8f64_01235467(<8 x double> %a, <8 x double> %b) {
715 ; ALL-LABEL: shuffle_v8f64_01235467:
717 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,1,2,3,5,4,6,7]
718 ; ALL-NEXT: ret{{[l|q]}}
719 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7>
720 ret <8 x double> %shuffle
723 define <8 x double> @shuffle_v8f64_01235466(<8 x double> %a, <8 x double> %b) {
725 ; ALL-LABEL: shuffle_v8f64_01235466:
727 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,1,2,3,5,4,6,6]
728 ; ALL-NEXT: ret{{[l|q]}}
729 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 6>
730 ret <8 x double> %shuffle
733 define <8 x double> @shuffle_v8f64_002u6u44(<8 x double> %a, <8 x double> %b) {
735 ; AVX512F-LABEL: shuffle_v8f64_002u6u44:
737 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,2,u,6,u,4,4>
738 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
741 ; AVX512F-32-LABEL: shuffle_v8f64_002u6u44:
742 ; AVX512F-32: # %bb.0:
743 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,0,0,2,0,u,u,6,0,u,u,4,0,4,0>
744 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
745 ; AVX512F-32-NEXT: retl
746 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 undef, i32 6, i32 undef, i32 4, i32 4>
747 ret <8 x double> %shuffle
750 define <8 x double> @shuffle_v8f64_00uu66uu(<8 x double> %a, <8 x double> %b) {
752 ; AVX512F-LABEL: shuffle_v8f64_00uu66uu:
754 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,u,u,6,6,u,u>
755 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
758 ; AVX512F-32-LABEL: shuffle_v8f64_00uu66uu:
759 ; AVX512F-32: # %bb.0:
760 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,0,0,u,u,u,u,6,0,6,0,u,u,u,u>
761 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
762 ; AVX512F-32-NEXT: retl
763 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 0, i32 undef, i32 undef, i32 6, i32 6, i32 undef, i32 undef>
764 ret <8 x double> %shuffle
767 define <8 x double> @shuffle_v8f64_103245uu(<8 x double> %a, <8 x double> %b) {
769 ; ALL-LABEL: shuffle_v8f64_103245uu:
771 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,0,3,2,4,5,6,6]
772 ; ALL-NEXT: ret{{[l|q]}}
773 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 undef, i32 undef>
774 ret <8 x double> %shuffle
777 define <8 x double> @shuffle_v8f64_1133uu67(<8 x double> %a, <8 x double> %b) {
779 ; ALL-LABEL: shuffle_v8f64_1133uu67:
781 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[1,1,3,3,4,4,6,7]
782 ; ALL-NEXT: ret{{[l|q]}}
783 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 undef, i32 undef, i32 6, i32 7>
784 ret <8 x double> %shuffle
787 define <8 x double> @shuffle_v8f64_0uu354uu(<8 x double> %a, <8 x double> %b) {
789 ; ALL-LABEL: shuffle_v8f64_0uu354uu:
791 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,0,2,3,5,4,6,6]
792 ; ALL-NEXT: ret{{[l|q]}}
793 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 undef, i32 undef, i32 3, i32 5, i32 4, i32 undef, i32 undef>
794 ret <8 x double> %shuffle
797 define <8 x double> @shuffle_v8f64_uuu3uu66(<8 x double> %a, <8 x double> %b) {
799 ; ALL-LABEL: shuffle_v8f64_uuu3uu66:
801 ; ALL-NEXT: vpermilpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,6]
802 ; ALL-NEXT: ret{{[l|q]}}
803 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 3, i32 undef, i32 undef, i32 6, i32 6>
804 ret <8 x double> %shuffle
807 define <8 x double> @shuffle_v8f64_c348cda0(<8 x double> %a, <8 x double> %b) {
809 ; AVX512F-LABEL: shuffle_v8f64_c348cda0:
811 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [4,11,12,0,4,5,2,8]
812 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
813 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
816 ; AVX512F-32-LABEL: shuffle_v8f64_c348cda0:
817 ; AVX512F-32: # %bb.0:
818 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [4,0,11,0,12,0,0,0,4,0,5,0,2,0,8,0]
819 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
820 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
821 ; AVX512F-32-NEXT: retl
822 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 12, i32 3, i32 4, i32 8, i32 12, i32 13, i32 10, i32 0>
823 ret <8 x double> %shuffle
826 define <8 x double> @shuffle_v8f64_f511235a(<8 x double> %a, <8 x double> %b) {
828 ; AVX512F-LABEL: shuffle_v8f64_f511235a:
830 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [15,5,1,1,2,3,5,10]
831 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
834 ; AVX512F-32-LABEL: shuffle_v8f64_f511235a:
835 ; AVX512F-32: # %bb.0:
836 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [15,0,5,0,1,0,1,0,2,0,3,0,5,0,10,0]
837 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
838 ; AVX512F-32-NEXT: retl
839 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 15, i32 5, i32 1, i32 1, i32 2, i32 3, i32 5, i32 10>
840 ret <8 x double> %shuffle
843 define <8 x double> @shuffle_v8f64_1z2z5z6z(<8 x double> %a, <8 x double> %b) {
844 ; AVX512F-LABEL: shuffle_v8f64_1z2z5z6z:
846 ; AVX512F-NEXT: vxorpd %xmm1, %xmm1, %xmm1
847 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [1,8,2,8,5,8,6,8]
848 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
851 ; AVX512F-32-LABEL: shuffle_v8f64_1z2z5z6z:
852 ; AVX512F-32: # %bb.0:
853 ; AVX512F-32-NEXT: vxorpd %xmm1, %xmm1, %xmm1
854 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,8,0,2,0,8,0,5,0,8,0,6,0,8,0]
855 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
856 ; AVX512F-32-NEXT: retl
857 %shuffle = shufflevector <8 x double> %a, <8 x double> <double 0.000000e+00, double undef, double undef, double undef, double undef, double undef, double undef, double undef>, <8 x i32> <i32 1, i32 8, i32 2, i32 8, i32 5, i32 8, i32 6, i32 8>
858 ret <8 x double> %shuffle
861 define <8 x i64> @shuffle_v8i64_00000000(<8 x i64> %a, <8 x i64> %b) {
863 ; ALL-LABEL: shuffle_v8i64_00000000:
865 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
866 ; ALL-NEXT: ret{{[l|q]}}
867 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
868 ret <8 x i64> %shuffle
871 define <8 x i64> @shuffle_v8i64_44444444(<8 x i64> %a, <8 x i64> %b) {
872 ; ALL-LABEL: shuffle_v8i64_44444444:
874 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm0
875 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
876 ; ALL-NEXT: ret{{[l|q]}}
877 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4, i32 4>
878 ret <8 x i64> %shuffle
881 define <8 x i64> @shuffle_v8i64_66666666(<8 x i64> %a, <8 x i64> %b) {
882 ; ALL-LABEL: shuffle_v8i64_66666666:
884 ; ALL-NEXT: vextractf32x4 $3, %zmm0, %xmm0
885 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
886 ; ALL-NEXT: ret{{[l|q]}}
887 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6, i32 6>
888 ret <8 x i64> %shuffle
891 define <8 x i64> @shuffle_v8i64_00000010(<8 x i64> %a, <8 x i64> %b) {
893 ; AVX512F-LABEL: shuffle_v8i64_00000010:
895 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0]
896 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
899 ; AVX512F-32-LABEL: shuffle_v8i64_00000010:
900 ; AVX512F-32: # %bb.0:
901 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]
902 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
903 ; AVX512F-32-NEXT: retl
904 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0>
905 ret <8 x i64> %shuffle
908 define <8 x i64> @shuffle_v8i64_00000200(<8 x i64> %a, <8 x i64> %b) {
910 ; AVX512F-LABEL: shuffle_v8i64_00000200:
912 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,2,0,0]
913 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
916 ; AVX512F-32-LABEL: shuffle_v8i64_00000200:
917 ; AVX512F-32: # %bb.0:
918 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0]
919 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
920 ; AVX512F-32-NEXT: retl
921 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0>
922 ret <8 x i64> %shuffle
925 define <8 x i64> @shuffle_v8i64_00003000(<8 x i64> %a, <8 x i64> %b) {
927 ; AVX512F-LABEL: shuffle_v8i64_00003000:
929 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,3,0,0,0]
930 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
933 ; AVX512F-32-LABEL: shuffle_v8i64_00003000:
934 ; AVX512F-32: # %bb.0:
935 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0]
936 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
937 ; AVX512F-32-NEXT: retl
938 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0>
939 ret <8 x i64> %shuffle
942 define <8 x i64> @shuffle_v8i64_00040000(<8 x i64> %a, <8 x i64> %b) {
944 ; AVX512F-LABEL: shuffle_v8i64_00040000:
946 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,4,0,0,0,0]
947 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
950 ; AVX512F-32-LABEL: shuffle_v8i64_00040000:
951 ; AVX512F-32: # %bb.0:
952 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0]
953 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
954 ; AVX512F-32-NEXT: retl
955 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0>
956 ret <8 x i64> %shuffle
959 define <8 x i64> @shuffle_v8i64_00500000(<8 x i64> %a, <8 x i64> %b) {
961 ; AVX512F-LABEL: shuffle_v8i64_00500000:
963 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,5,0,0,0,0,0]
964 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
967 ; AVX512F-32-LABEL: shuffle_v8i64_00500000:
968 ; AVX512F-32: # %bb.0:
969 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0]
970 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
971 ; AVX512F-32-NEXT: retl
972 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0>
973 ret <8 x i64> %shuffle
976 define <8 x i64> @shuffle_v8i64_06000000(<8 x i64> %a, <8 x i64> %b) {
978 ; AVX512F-LABEL: shuffle_v8i64_06000000:
980 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,6,0,0,0,0,0,0]
981 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
984 ; AVX512F-32-LABEL: shuffle_v8i64_06000000:
985 ; AVX512F-32: # %bb.0:
986 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0]
987 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
988 ; AVX512F-32-NEXT: retl
989 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
990 ret <8 x i64> %shuffle
993 define <8 x i64> @shuffle_v8i64_70000000(<8 x i64> %a, <8 x i64> %b) {
995 ; AVX512F-LABEL: shuffle_v8i64_70000000:
997 ; AVX512F-NEXT: movl $7, %eax
998 ; AVX512F-NEXT: vmovq %rax, %xmm1
999 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
1000 ; AVX512F-NEXT: retq
1002 ; AVX512F-32-LABEL: shuffle_v8i64_70000000:
1003 ; AVX512F-32: # %bb.0:
1004 ; AVX512F-32-NEXT: movl $7, %eax
1005 ; AVX512F-32-NEXT: vmovd %eax, %xmm1
1006 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
1007 ; AVX512F-32-NEXT: retl
1008 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
1009 ret <8 x i64> %shuffle
1012 define <8 x i64> @shuffle_v8i64_01014545(<8 x i64> %a, <8 x i64> %b) {
1013 ; ALL-LABEL: shuffle_v8i64_01014545:
1015 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5]
1016 ; ALL-NEXT: ret{{[l|q]}}
1018 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 4, i32 5, i32 4, i32 5>
1019 ret <8 x i64> %shuffle
1022 define <8 x i64> @shuffle_v8i64_01014545_mem(<8 x i64>* %ptr, <8 x i64> %b) {
1023 ; AVX512F-LABEL: shuffle_v8i64_01014545_mem:
1025 ; AVX512F-NEXT: vpermpd {{.*#+}} zmm0 = mem[0,1,0,1,4,5,4,5]
1026 ; AVX512F-NEXT: retq
1028 ; AVX512F-32-LABEL: shuffle_v8i64_01014545_mem:
1029 ; AVX512F-32: # %bb.0:
1030 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1031 ; AVX512F-32-NEXT: vpermpd {{.*#+}} zmm0 = mem[0,1,0,1,4,5,4,5]
1032 ; AVX512F-32-NEXT: retl
1034 %a = load <8 x i64>, <8 x i64>* %ptr
1035 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 4, i32 5, i32 4, i32 5>
1036 ret <8 x i64> %shuffle
1039 define <8 x i64> @shuffle_v8i64_00112233(<8 x i64> %a, <8 x i64> %b) {
1041 ; AVX512F-LABEL: shuffle_v8i64_00112233:
1043 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,1,2,2,3,3]
1044 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1045 ; AVX512F-NEXT: retq
1047 ; AVX512F-32-LABEL: shuffle_v8i64_00112233:
1048 ; AVX512F-32: # %bb.0:
1049 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0]
1050 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1051 ; AVX512F-32-NEXT: retl
1052 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3>
1053 ret <8 x i64> %shuffle
1056 define <8 x i64> @shuffle_v8i64_00001111(<8 x i64> %a, <8 x i64> %b) {
1058 ; AVX512F-LABEL: shuffle_v8i64_00001111:
1060 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,1,1,1]
1061 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1062 ; AVX512F-NEXT: retq
1064 ; AVX512F-32-LABEL: shuffle_v8i64_00001111:
1065 ; AVX512F-32: # %bb.0:
1066 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0]
1067 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1068 ; AVX512F-32-NEXT: retl
1069 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1>
1070 ret <8 x i64> %shuffle
1073 define <8 x i64> @shuffle_v8i64_81a3c5e7(<8 x i64> %a, <8 x i64> %b) {
1075 ; ALL-LABEL: shuffle_v8i64_81a3c5e7:
1077 ; ALL-NEXT: movb $-86, %al
1078 ; ALL-NEXT: kmovw %eax, %k1
1079 ; ALL-NEXT: vpblendmq %zmm0, %zmm1, %zmm0 {%k1}
1080 ; ALL-NEXT: ret{{[l|q]}}
1081 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7>
1082 ret <8 x i64> %shuffle
1085 define <8 x i64> @shuffle_v8i64_08080808(<8 x i64> %a, <8 x i64> %b) {
1087 ; AVX512F-LABEL: shuffle_v8i64_08080808:
1089 ; AVX512F-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,8,0,8,0,8,0,8]
1090 ; AVX512F-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1091 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1092 ; AVX512F-NEXT: retq
1094 ; AVX512F-32-LABEL: shuffle_v8i64_08080808:
1095 ; AVX512F-32: # %bb.0:
1096 ; AVX512F-32-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,0,0,8,0,0,0,8,0]
1097 ; AVX512F-32-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1098 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1099 ; AVX512F-32-NEXT: retl
1100 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 0, i32 8, i32 0, i32 8>
1101 ret <8 x i64> %shuffle
1104 define <8 x i64> @shuffle_v8i64_08084c4c(<8 x i64> %a, <8 x i64> %b) {
1106 ; AVX512F-LABEL: shuffle_v8i64_08084c4c:
1108 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,0,8,4,12,4,12]
1109 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1110 ; AVX512F-NEXT: retq
1112 ; AVX512F-32-LABEL: shuffle_v8i64_08084c4c:
1113 ; AVX512F-32: # %bb.0:
1114 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,4,0,12,0,4,0,12,0]
1115 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1116 ; AVX512F-32-NEXT: retl
1117 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 4, i32 12, i32 4, i32 12>
1118 ret <8 x i64> %shuffle
1121 define <8 x i64> @shuffle_v8i64_8823cc67(<8 x i64> %a, <8 x i64> %b) {
1123 ; AVX512F-LABEL: shuffle_v8i64_8823cc67:
1125 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,10,11,4,4,14,15]
1126 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1127 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1128 ; AVX512F-NEXT: retq
1130 ; AVX512F-32-LABEL: shuffle_v8i64_8823cc67:
1131 ; AVX512F-32: # %bb.0:
1132 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,0,0,10,0,11,0,4,0,4,0,14,0,15,0]
1133 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1134 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1135 ; AVX512F-32-NEXT: retl
1136 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 8, i32 8, i32 2, i32 3, i32 12, i32 12, i32 6, i32 7>
1137 ret <8 x i64> %shuffle
1140 define <8 x i64> @shuffle_v8i64_9832dc76(<8 x i64> %a, <8 x i64> %b) {
1142 ; AVX512F-LABEL: shuffle_v8i64_9832dc76:
1144 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,11,10,5,4,15,14]
1145 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1146 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1147 ; AVX512F-NEXT: retq
1149 ; AVX512F-32-LABEL: shuffle_v8i64_9832dc76:
1150 ; AVX512F-32: # %bb.0:
1151 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,0,0,11,0,10,0,5,0,4,0,15,0,14,0]
1152 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1153 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1154 ; AVX512F-32-NEXT: retl
1155 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 9, i32 8, i32 3, i32 2, i32 13, i32 12, i32 7, i32 6>
1156 ret <8 x i64> %shuffle
1159 define <8 x i64> @shuffle_v8i64_9810dc54(<8 x i64> %a, <8 x i64> %b) {
1161 ; AVX512F-LABEL: shuffle_v8i64_9810dc54:
1163 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,9,8,5,4,13,12]
1164 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1165 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1166 ; AVX512F-NEXT: retq
1168 ; AVX512F-32-LABEL: shuffle_v8i64_9810dc54:
1169 ; AVX512F-32: # %bb.0:
1170 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,0,0,9,0,8,0,5,0,4,0,13,0,12,0]
1171 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1172 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1173 ; AVX512F-32-NEXT: retl
1174 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 9, i32 8, i32 1, i32 0, i32 13, i32 12, i32 5, i32 4>
1175 ret <8 x i64> %shuffle
1178 define <8 x i64> @shuffle_v8i64_08194c5d(<8 x i64> %a, <8 x i64> %b) {
1180 ; AVX512F-LABEL: shuffle_v8i64_08194c5d:
1182 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,1,9,4,12,5,13]
1183 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1184 ; AVX512F-NEXT: retq
1186 ; AVX512F-32-LABEL: shuffle_v8i64_08194c5d:
1187 ; AVX512F-32: # %bb.0:
1188 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,4,0,12,0,5,0,13,0]
1189 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1190 ; AVX512F-32-NEXT: retl
1191 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
1192 ret <8 x i64> %shuffle
1195 define <8 x i64> @shuffle_v8i64_2a3b6e7f(<8 x i64> %a, <8 x i64> %b) {
1197 ; AVX512F-LABEL: shuffle_v8i64_2a3b6e7f:
1199 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [2,10,3,11,6,14,7,15]
1200 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1201 ; AVX512F-NEXT: retq
1203 ; AVX512F-32-LABEL: shuffle_v8i64_2a3b6e7f:
1204 ; AVX512F-32: # %bb.0:
1205 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [2,0,10,0,3,0,11,0,6,0,14,0,7,0,15,0]
1206 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1207 ; AVX512F-32-NEXT: retl
1208 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
1209 ret <8 x i64> %shuffle
1212 define <8 x i64> @shuffle_v8i64_08192a3b(<8 x i64> %a, <8 x i64> %b) {
1214 ; AVX512F-LABEL: shuffle_v8i64_08192a3b:
1216 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,1,9,2,10,3,11]
1217 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1218 ; AVX512F-NEXT: retq
1220 ; AVX512F-32-LABEL: shuffle_v8i64_08192a3b:
1221 ; AVX512F-32: # %bb.0:
1222 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,2,0,10,0,3,0,11,0]
1223 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1224 ; AVX512F-32-NEXT: retl
1225 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
1226 ret <8 x i64> %shuffle
1229 define <8 x i64> @shuffle_v8i64_08991abb(<8 x i64> %a, <8 x i64> %b) {
1231 ; AVX512F-LABEL: shuffle_v8i64_08991abb:
1233 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,0,1,1,9,2,3,3]
1234 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1235 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1236 ; AVX512F-NEXT: retq
1238 ; AVX512F-32-LABEL: shuffle_v8i64_08991abb:
1239 ; AVX512F-32: # %bb.0:
1240 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,0,0,0,1,0,1,0,9,0,2,0,3,0,3,0]
1241 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1242 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1243 ; AVX512F-32-NEXT: retl
1244 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 8, i32 9, i32 9, i32 1, i32 10, i32 11, i32 11>
1245 ret <8 x i64> %shuffle
1248 define <8 x i64> @shuffle_v8i64_091b2d3f(<8 x i64> %a, <8 x i64> %b) {
1250 ; AVX512F-LABEL: shuffle_v8i64_091b2d3f:
1252 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,9,1,11,2,13,3,15]
1253 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1254 ; AVX512F-NEXT: retq
1256 ; AVX512F-32-LABEL: shuffle_v8i64_091b2d3f:
1257 ; AVX512F-32: # %bb.0:
1258 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,9,0,1,0,11,0,2,0,13,0,3,0,15,0]
1259 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1260 ; AVX512F-32-NEXT: retl
1261 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 9, i32 1, i32 11, i32 2, i32 13, i32 3, i32 15>
1262 ret <8 x i64> %shuffle
1265 define <8 x i64> @shuffle_v8i64_09ab1def(<8 x i64> %a, <8 x i64> %b) {
1267 ; AVX512F-LABEL: shuffle_v8i64_09ab1def:
1269 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,1,2,3,9,5,6,7]
1270 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1271 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1272 ; AVX512F-NEXT: retq
1274 ; AVX512F-32-LABEL: shuffle_v8i64_09ab1def:
1275 ; AVX512F-32: # %bb.0:
1276 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,0,1,0,2,0,3,0,9,0,5,0,6,0,7,0]
1277 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1278 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1279 ; AVX512F-32-NEXT: retl
1280 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 9, i32 10, i32 11, i32 1, i32 13, i32 14, i32 15>
1281 ret <8 x i64> %shuffle
1284 define <8 x i64> @shuffle_v8i64_00014445(<8 x i64> %a, <8 x i64> %b) {
1286 ; ALL-LABEL: shuffle_v8i64_00014445:
1288 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,0,1,4,4,4,5]
1289 ; ALL-NEXT: ret{{[l|q]}}
1290 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 4, i32 4, i32 4, i32 5>
1291 ret <8 x i64> %shuffle
1294 define <8 x i64> @shuffle_v8i64_00204464(<8 x i64> %a, <8 x i64> %b) {
1296 ; ALL-LABEL: shuffle_v8i64_00204464:
1298 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,0,4,4,6,4]
1299 ; ALL-NEXT: ret{{[l|q]}}
1300 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 4, i32 6, i32 4>
1301 ret <8 x i64> %shuffle
1304 define <8 x i64> @shuffle_v8i64_03004744(<8 x i64> %a, <8 x i64> %b) {
1306 ; ALL-LABEL: shuffle_v8i64_03004744:
1308 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,3,0,0,4,7,4,4]
1309 ; ALL-NEXT: ret{{[l|q]}}
1310 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 7, i32 4, i32 4>
1311 ret <8 x i64> %shuffle
1314 define <8 x i64> @shuffle_v8i64_10005444(<8 x i64> %a, <8 x i64> %b) {
1316 ; ALL-LABEL: shuffle_v8i64_10005444:
1318 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,0,0,5,4,4,4]
1319 ; ALL-NEXT: ret{{[l|q]}}
1320 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 5, i32 4, i32 4, i32 4>
1321 ret <8 x i64> %shuffle
1324 define <8 x i64> @shuffle_v8i64_22006644(<8 x i64> %a, <8 x i64> %b) {
1326 ; ALL-LABEL: shuffle_v8i64_22006644:
1328 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[2,2,0,0,6,6,4,4]
1329 ; ALL-NEXT: ret{{[l|q]}}
1330 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 6, i32 4, i32 4>
1331 ret <8 x i64> %shuffle
1334 define <8 x i64> @shuffle_v8i64_33307774(<8 x i64> %a, <8 x i64> %b) {
1336 ; ALL-LABEL: shuffle_v8i64_33307774:
1338 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,3,3,0,7,7,7,4]
1339 ; ALL-NEXT: ret{{[l|q]}}
1340 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 7, i32 7, i32 4>
1341 ret <8 x i64> %shuffle
1344 define <8 x i64> @shuffle_v8i64_32107654(<8 x i64> %a, <8 x i64> %b) {
1346 ; ALL-LABEL: shuffle_v8i64_32107654:
1348 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,2,1,0,7,6,5,4]
1349 ; ALL-NEXT: ret{{[l|q]}}
1350 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
1351 ret <8 x i64> %shuffle
1354 define <8 x i64> @shuffle_v8i64_00234467(<8 x i64> %a, <8 x i64> %b) {
1356 ; ALL-LABEL: shuffle_v8i64_00234467:
1358 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,7]
1359 ; ALL-NEXT: ret{{[l|q]}}
1360 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 4, i32 4, i32 6, i32 7>
1361 ret <8 x i64> %shuffle
1364 define <8 x i64> @shuffle_v8i64_00224466(<8 x i64> %a, <8 x i64> %b) {
1366 ; ALL-LABEL: shuffle_v8i64_00224466:
1368 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5,8,9,8,9,12,13,12,13]
1369 ; ALL-NEXT: ret{{[l|q]}}
1370 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6>
1371 ret <8 x i64> %shuffle
1374 define <8 x i64> @shuffle_v8i64_10325476(<8 x i64> %a, <8 x i64> %b) {
1376 ; ALL-LABEL: shuffle_v8i64_10325476:
1378 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[2,3,0,1,6,7,4,5,10,11,8,9,14,15,12,13]
1379 ; ALL-NEXT: ret{{[l|q]}}
1380 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
1381 ret <8 x i64> %shuffle
1384 define <8 x i64> @shuffle_v8i64_11335577(<8 x i64> %a, <8 x i64> %b) {
1386 ; ALL-LABEL: shuffle_v8i64_11335577:
1388 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[2,3,2,3,6,7,6,7,10,11,10,11,14,15,14,15]
1389 ; ALL-NEXT: ret{{[l|q]}}
1390 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7>
1391 ret <8 x i64> %shuffle
1394 define <8 x i64> @shuffle_v8i64_10235467(<8 x i64> %a, <8 x i64> %b) {
1396 ; ALL-LABEL: shuffle_v8i64_10235467:
1398 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,2,3,5,4,6,7]
1399 ; ALL-NEXT: ret{{[l|q]}}
1400 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7>
1401 ret <8 x i64> %shuffle
1404 define <8 x i64> @shuffle_v8i64_10225466(<8 x i64> %a, <8 x i64> %b) {
1406 ; ALL-LABEL: shuffle_v8i64_10225466:
1408 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,2,2,5,4,6,6]
1409 ; ALL-NEXT: ret{{[l|q]}}
1410 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 2, i32 5, i32 4, i32 6, i32 6>
1411 ret <8 x i64> %shuffle
1414 define <8 x i64> @shuffle_v8i64_00015444(<8 x i64> %a, <8 x i64> %b) {
1416 ; AVX512F-LABEL: shuffle_v8i64_00015444:
1418 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,1,5,4,4,4]
1419 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1420 ; AVX512F-NEXT: retq
1422 ; AVX512F-32-LABEL: shuffle_v8i64_00015444:
1423 ; AVX512F-32: # %bb.0:
1424 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0,5,0,4,0,4,0,4,0]
1425 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1426 ; AVX512F-32-NEXT: retl
1427 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 5, i32 4, i32 4, i32 4>
1428 ret <8 x i64> %shuffle
1431 define <8 x i64> @shuffle_v8i64_00204644(<8 x i64> %a, <8 x i64> %b) {
1433 ; AVX512F-LABEL: shuffle_v8i64_00204644:
1435 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,0,4,6,4,4]
1436 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1437 ; AVX512F-NEXT: retq
1439 ; AVX512F-32-LABEL: shuffle_v8i64_00204644:
1440 ; AVX512F-32: # %bb.0:
1441 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,0,0,4,0,6,0,4,0,4,0]
1442 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1443 ; AVX512F-32-NEXT: retl
1444 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 6, i32 4, i32 4>
1445 ret <8 x i64> %shuffle
1448 define <8 x i64> @shuffle_v8i64_03004474(<8 x i64> %a, <8 x i64> %b) {
1450 ; AVX512F-LABEL: shuffle_v8i64_03004474:
1452 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,3,0,0,4,4,7,4]
1453 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1454 ; AVX512F-NEXT: retq
1456 ; AVX512F-32-LABEL: shuffle_v8i64_03004474:
1457 ; AVX512F-32: # %bb.0:
1458 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,3,0,0,0,0,0,4,0,4,0,7,0,4,0]
1459 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1460 ; AVX512F-32-NEXT: retl
1461 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 4, i32 7, i32 4>
1462 ret <8 x i64> %shuffle
1465 define <8 x i64> @shuffle_v8i64_10004444(<8 x i64> %a, <8 x i64> %b) {
1467 ; AVX512F-LABEL: shuffle_v8i64_10004444:
1469 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,4,4,4,4]
1470 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1471 ; AVX512F-NEXT: retq
1473 ; AVX512F-32-LABEL: shuffle_v8i64_10004444:
1474 ; AVX512F-32: # %bb.0:
1475 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,0,0,0,0,4,0,4,0,4,0,4,0]
1476 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1477 ; AVX512F-32-NEXT: retl
1478 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 4, i32 4, i32 4, i32 4>
1479 ret <8 x i64> %shuffle
1482 define <8 x i64> @shuffle_v8i64_22006446(<8 x i64> %a, <8 x i64> %b) {
1484 ; AVX512F-LABEL: shuffle_v8i64_22006446:
1486 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [2,2,0,0,6,4,4,6]
1487 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1488 ; AVX512F-NEXT: retq
1490 ; AVX512F-32-LABEL: shuffle_v8i64_22006446:
1491 ; AVX512F-32: # %bb.0:
1492 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [2,0,2,0,0,0,0,0,6,0,4,0,4,0,6,0]
1493 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1494 ; AVX512F-32-NEXT: retl
1495 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 4, i32 4, i32 6>
1496 ret <8 x i64> %shuffle
1499 define <8 x i64> @shuffle_v8i64_33307474(<8 x i64> %a, <8 x i64> %b) {
1501 ; AVX512F-LABEL: shuffle_v8i64_33307474:
1503 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,3,3,0,7,4,7,4]
1504 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1505 ; AVX512F-NEXT: retq
1507 ; AVX512F-32-LABEL: shuffle_v8i64_33307474:
1508 ; AVX512F-32: # %bb.0:
1509 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,3,0,3,0,0,0,7,0,4,0,7,0,4,0]
1510 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1511 ; AVX512F-32-NEXT: retl
1512 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 4, i32 7, i32 4>
1513 ret <8 x i64> %shuffle
1516 define <8 x i64> @shuffle_v8i64_32104567(<8 x i64> %a, <8 x i64> %b) {
1518 ; AVX512F-LABEL: shuffle_v8i64_32104567:
1520 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,2,1,0,4,5,6,7]
1521 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1522 ; AVX512F-NEXT: retq
1524 ; AVX512F-32-LABEL: shuffle_v8i64_32104567:
1525 ; AVX512F-32: # %bb.0:
1526 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,2,0,1,0,0,0,4,0,5,0,6,0,7,0]
1527 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1528 ; AVX512F-32-NEXT: retl
1529 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 4, i32 5, i32 6, i32 7>
1530 ret <8 x i64> %shuffle
1533 define <8 x i64> @shuffle_v8i64_00236744(<8 x i64> %a, <8 x i64> %b) {
1535 ; AVX512F-LABEL: shuffle_v8i64_00236744:
1537 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,3,6,7,4,4]
1538 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1539 ; AVX512F-NEXT: retq
1541 ; AVX512F-32-LABEL: shuffle_v8i64_00236744:
1542 ; AVX512F-32: # %bb.0:
1543 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,3,0,6,0,7,0,4,0,4,0]
1544 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1545 ; AVX512F-32-NEXT: retl
1546 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 6, i32 7, i32 4, i32 4>
1547 ret <8 x i64> %shuffle
1550 define <8 x i64> @shuffle_v8i64_00226644(<8 x i64> %a, <8 x i64> %b) {
1552 ; AVX512F-LABEL: shuffle_v8i64_00226644:
1554 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,2,6,6,4,4]
1555 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1556 ; AVX512F-NEXT: retq
1558 ; AVX512F-32-LABEL: shuffle_v8i64_00226644:
1559 ; AVX512F-32: # %bb.0:
1560 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,2,0,6,0,6,0,4,0,4,0]
1561 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1562 ; AVX512F-32-NEXT: retl
1563 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 6, i32 6, i32 4, i32 4>
1564 ret <8 x i64> %shuffle
1567 define <8 x i64> @shuffle_v8i64_10324567(<8 x i64> %a, <8 x i64> %b) {
1569 ; AVX512F-LABEL: shuffle_v8i64_10324567:
1571 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,3,2,4,5,6,7]
1572 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1573 ; AVX512F-NEXT: retq
1575 ; AVX512F-32-LABEL: shuffle_v8i64_10324567:
1576 ; AVX512F-32: # %bb.0:
1577 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,3,0,2,0,4,0,5,0,6,0,7,0]
1578 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1579 ; AVX512F-32-NEXT: retl
1580 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 6, i32 7>
1581 ret <8 x i64> %shuffle
1584 define <8 x i64> @shuffle_v8i64_11334567(<8 x i64> %a, <8 x i64> %b) {
1586 ; AVX512F-LABEL: shuffle_v8i64_11334567:
1588 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,1,3,3,4,5,6,7]
1589 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1590 ; AVX512F-NEXT: retq
1592 ; AVX512F-32-LABEL: shuffle_v8i64_11334567:
1593 ; AVX512F-32: # %bb.0:
1594 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,1,0,3,0,3,0,4,0,5,0,6,0,7,0]
1595 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1596 ; AVX512F-32-NEXT: retl
1597 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 4, i32 5, i32 6, i32 7>
1598 ret <8 x i64> %shuffle
1601 define <8 x i64> @shuffle_v8i64_01235467(<8 x i64> %a, <8 x i64> %b) {
1603 ; AVX512F-LABEL: shuffle_v8i64_01235467:
1605 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,1,2,3,5,4,6,7]
1606 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1607 ; AVX512F-NEXT: retq
1609 ; AVX512F-32-LABEL: shuffle_v8i64_01235467:
1610 ; AVX512F-32: # %bb.0:
1611 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,0,2,0,3,0,5,0,4,0,6,0,7,0]
1612 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1613 ; AVX512F-32-NEXT: retl
1614 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7>
1615 ret <8 x i64> %shuffle
1618 define <8 x i64> @shuffle_v8i64_01235466(<8 x i64> %a, <8 x i64> %b) {
1620 ; AVX512F-LABEL: shuffle_v8i64_01235466:
1622 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,1,2,3,5,4,6,6]
1623 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1624 ; AVX512F-NEXT: retq
1626 ; AVX512F-32-LABEL: shuffle_v8i64_01235466:
1627 ; AVX512F-32: # %bb.0:
1628 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,0,2,0,3,0,5,0,4,0,6,0,6,0]
1629 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1630 ; AVX512F-32-NEXT: retl
1631 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 5, i32 4, i32 6, i32 6>
1632 ret <8 x i64> %shuffle
1635 define <8 x i64> @shuffle_v8i64_002u6u44(<8 x i64> %a, <8 x i64> %b) {
1637 ; AVX512F-LABEL: shuffle_v8i64_002u6u44:
1639 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,2,u,6,u,4,4>
1640 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1641 ; AVX512F-NEXT: retq
1643 ; AVX512F-32-LABEL: shuffle_v8i64_002u6u44:
1644 ; AVX512F-32: # %bb.0:
1645 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,0,0,2,0,u,u,6,0,u,u,4,0,4,0>
1646 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1647 ; AVX512F-32-NEXT: retl
1648 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 undef, i32 6, i32 undef, i32 4, i32 4>
1649 ret <8 x i64> %shuffle
1652 define <8 x i64> @shuffle_v8i64_00uu66uu(<8 x i64> %a, <8 x i64> %b) {
1654 ; AVX512F-LABEL: shuffle_v8i64_00uu66uu:
1656 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,u,u,6,6,u,u>
1657 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1658 ; AVX512F-NEXT: retq
1660 ; AVX512F-32-LABEL: shuffle_v8i64_00uu66uu:
1661 ; AVX512F-32: # %bb.0:
1662 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,0,0,u,u,u,u,6,0,6,0,u,u,u,u>
1663 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1664 ; AVX512F-32-NEXT: retl
1665 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 0, i32 undef, i32 undef, i32 6, i32 6, i32 undef, i32 undef>
1666 ret <8 x i64> %shuffle
1669 define <8 x i64> @shuffle_v8i64_103245uu(<8 x i64> %a, <8 x i64> %b) {
1671 ; AVX512F-LABEL: shuffle_v8i64_103245uu:
1673 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <1,0,3,2,4,5,u,u>
1674 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1675 ; AVX512F-NEXT: retq
1677 ; AVX512F-32-LABEL: shuffle_v8i64_103245uu:
1678 ; AVX512F-32: # %bb.0:
1679 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <1,0,0,0,3,0,2,0,4,0,5,0,u,u,u,u>
1680 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1681 ; AVX512F-32-NEXT: retl
1682 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 undef, i32 undef>
1683 ret <8 x i64> %shuffle
1686 define <8 x i64> @shuffle_v8i64_1133uu67(<8 x i64> %a, <8 x i64> %b) {
1688 ; AVX512F-LABEL: shuffle_v8i64_1133uu67:
1690 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <1,1,3,3,u,u,6,7>
1691 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1692 ; AVX512F-NEXT: retq
1694 ; AVX512F-32-LABEL: shuffle_v8i64_1133uu67:
1695 ; AVX512F-32: # %bb.0:
1696 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <1,0,1,0,3,0,3,0,u,u,u,u,6,0,7,0>
1697 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1698 ; AVX512F-32-NEXT: retl
1699 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 undef, i32 undef, i32 6, i32 7>
1700 ret <8 x i64> %shuffle
1703 define <8 x i64> @shuffle_v8i64_0uu354uu(<8 x i64> %a, <8 x i64> %b) {
1705 ; AVX512F-LABEL: shuffle_v8i64_0uu354uu:
1707 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,u,u,3,5,4,u,u>
1708 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1709 ; AVX512F-NEXT: retq
1711 ; AVX512F-32-LABEL: shuffle_v8i64_0uu354uu:
1712 ; AVX512F-32: # %bb.0:
1713 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,u,u,u,u,3,0,5,0,4,0,u,u,u,u>
1714 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1715 ; AVX512F-32-NEXT: retl
1716 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 undef, i32 undef, i32 3, i32 5, i32 4, i32 undef, i32 undef>
1717 ret <8 x i64> %shuffle
1720 define <8 x i64> @shuffle_v8i64_uuu3uu66(<8 x i64> %a, <8 x i64> %b) {
1722 ; AVX512F-LABEL: shuffle_v8i64_uuu3uu66:
1724 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <u,u,u,3,u,u,6,6>
1725 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1726 ; AVX512F-NEXT: retq
1728 ; AVX512F-32-LABEL: shuffle_v8i64_uuu3uu66:
1729 ; AVX512F-32: # %bb.0:
1730 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <u,u,u,u,u,u,3,0,u,u,u,u,6,0,6,0>
1731 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1732 ; AVX512F-32-NEXT: retl
1733 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 3, i32 undef, i32 undef, i32 6, i32 6>
1734 ret <8 x i64> %shuffle
1737 define <8 x i64> @shuffle_v8i64_6caa87e5(<8 x i64> %a, <8 x i64> %b) {
1739 ; AVX512F-LABEL: shuffle_v8i64_6caa87e5:
1741 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [14,4,2,2,0,15,6,13]
1742 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1743 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1744 ; AVX512F-NEXT: retq
1746 ; AVX512F-32-LABEL: shuffle_v8i64_6caa87e5:
1747 ; AVX512F-32: # %bb.0:
1748 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [14,0,4,0,2,0,2,0,0,0,15,0,6,0,13,0]
1749 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1750 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1751 ; AVX512F-32-NEXT: retl
1752 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 6, i32 12, i32 10, i32 10, i32 8, i32 7, i32 14, i32 5>
1753 ret <8 x i64> %shuffle
1756 define <8 x double> @shuffle_v8f64_082a4c6e(<8 x double> %a, <8 x double> %b) {
1758 ; ALL-LABEL: shuffle_v8f64_082a4c6e:
1760 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1761 ; ALL-NEXT: ret{{[l|q]}}
1762 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32><i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1763 ret <8 x double> %shuffle
1766 define <8 x double> @shuffle_v8f64_0z2z4z6z(<8 x double> %a, <8 x double> %b) {
1768 ; ALL-LABEL: shuffle_v8f64_0z2z4z6z:
1770 ; ALL-NEXT: vxorps %xmm1, %xmm1, %xmm1
1771 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1772 ; ALL-NEXT: ret{{[l|q]}}
1773 %shuffle = shufflevector <8 x double> %a, <8 x double> zeroinitializer, <8 x i32><i32 0, i32 8, i32 2, i32 8, i32 4, i32 8, i32 6, i32 8>
1774 ret <8 x double> %shuffle
1777 define <8 x i64> @shuffle_v8i64_082a4c6e(<8 x i64> %a, <8 x i64> %b) {
1779 ; ALL-LABEL: shuffle_v8i64_082a4c6e:
1781 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1782 ; ALL-NEXT: ret{{[l|q]}}
1783 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32><i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
1784 ret <8 x i64> %shuffle
1787 define <8 x i64> @shuffle_v8i64_z8zazcze(<8 x i64> %a, <8 x i64> %b) {
1789 ; ALL-LABEL: shuffle_v8i64_z8zazcze:
1791 ; ALL-NEXT: vxorps %xmm0, %xmm0, %xmm0
1792 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1793 ; ALL-NEXT: ret{{[l|q]}}
1794 %shuffle = shufflevector <8 x i64> zeroinitializer, <8 x i64> %b, <8 x i32><i32 7, i32 8, i32 5, i32 10, i32 3, i32 12, i32 1, i32 14>
1795 ret <8 x i64> %shuffle
1798 define <8 x double> @shuffle_v8f64_193b5d7f(<8 x double> %a, <8 x double> %b) {
1800 ; ALL-LABEL: shuffle_v8f64_193b5d7f:
1802 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1803 ; ALL-NEXT: ret{{[l|q]}}
1804 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32><i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1805 ret <8 x double> %shuffle
1808 define <8 x double> @shuffle_v8f64_z9zbzdzf(<8 x double> %a, <8 x double> %b) {
1810 ; ALL-LABEL: shuffle_v8f64_z9zbzdzf:
1812 ; ALL-NEXT: vxorps %xmm0, %xmm0, %xmm0
1813 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1814 ; ALL-NEXT: ret{{[l|q]}}
1815 %shuffle = shufflevector <8 x double> zeroinitializer, <8 x double> %b, <8 x i32><i32 0, i32 9, i32 0, i32 11, i32 0, i32 13, i32 0, i32 15>
1816 ret <8 x double> %shuffle
1819 define <8 x i64> @shuffle_v8i64_193b5d7f(<8 x i64> %a, <8 x i64> %b) {
1821 ; ALL-LABEL: shuffle_v8i64_193b5d7f:
1823 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1824 ; ALL-NEXT: ret{{[l|q]}}
1825 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32><i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
1826 ret <8 x i64> %shuffle
1829 define <8 x i64> @shuffle_v8i64_1z3z5z7z(<8 x i64> %a, <8 x i64> %b) {
1831 ; ALL-LABEL: shuffle_v8i64_1z3z5z7z:
1833 ; ALL-NEXT: vxorps %xmm1, %xmm1, %xmm1
1834 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1835 ; ALL-NEXT: ret{{[l|q]}}
1836 %shuffle = shufflevector <8 x i64> %a, <8 x i64> zeroinitializer, <8 x i32><i32 1, i32 8, i32 3, i32 15, i32 5, i32 8, i32 7, i32 15>
1837 ret <8 x i64> %shuffle
1840 define <8 x double> @test_vshuff64x2_512(<8 x double> %x, <8 x double> %x1) nounwind {
1841 ; ALL-LABEL: test_vshuff64x2_512:
1843 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],zmm1[2,3,0,1]
1844 ; ALL-NEXT: ret{{[l|q]}}
1845 %res = shufflevector <8 x double> %x, <8 x double> %x1, <8 x i32> <i32 0, i32 1, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9>
1846 ret <8 x double> %res
1849 define <8 x double> @test_vshuff64x2_512_maskz(<8 x double> %x, <8 x double> %x1, <8 x i1> %mask) nounwind {
1850 ; ALL-LABEL: test_vshuff64x2_512_maskz:
1852 ; ALL-NEXT: vpmovsxwq %xmm2, %zmm2
1853 ; ALL-NEXT: vpsllq $63, %zmm2, %zmm2
1854 ; ALL-NEXT: vptestmq %zmm2, %zmm2, %k1
1855 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],zmm1[2,3,0,1]
1856 ; ALL-NEXT: ret{{[l|q]}}
1857 %y = shufflevector <8 x double> %x, <8 x double> %x1, <8 x i32> <i32 0, i32 1, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9>
1858 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> zeroinitializer
1859 ret <8 x double> %res
1862 define <8 x i64> @test_vshufi64x2_512_mask(<8 x i64> %x, <8 x i64> %x1, <8 x i1> %mask) nounwind {
1863 ; ALL-LABEL: test_vshufi64x2_512_mask:
1865 ; ALL-NEXT: vpmovsxwq %xmm2, %zmm2
1866 ; ALL-NEXT: vpsllq $63, %zmm2, %zmm2
1867 ; ALL-NEXT: vptestmq %zmm2, %zmm2, %k1
1868 ; ALL-NEXT: vshufi64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],zmm1[2,3,0,1]
1869 ; ALL-NEXT: ret{{[l|q]}}
1870 %y = shufflevector <8 x i64> %x, <8 x i64> %x1, <8 x i32> <i32 0, i32 1, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9>
1871 %res = select <8 x i1> %mask, <8 x i64> %y, <8 x i64> %x
1875 define <8 x double> @test_vshuff64x2_512_mem(<8 x double> %x, <8 x double> *%ptr) nounwind {
1876 ; AVX512F-LABEL: test_vshuff64x2_512_mem:
1878 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],mem[2,3,0,1]
1879 ; AVX512F-NEXT: retq
1881 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem:
1882 ; AVX512F-32: # %bb.0:
1883 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1884 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],mem[2,3,0,1]
1885 ; AVX512F-32-NEXT: retl
1886 %x1 = load <8 x double>,<8 x double> *%ptr,align 1
1887 %res = shufflevector <8 x double> %x, <8 x double> %x1, <8 x i32> <i32 0, i32 1, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9>
1888 ret <8 x double> %res
1891 define <8 x double> @test_vshuff64x2_512_mem_mask(<8 x double> %x, <8 x double> *%ptr, <8 x i1> %mask) nounwind {
1892 ; AVX512F-LABEL: test_vshuff64x2_512_mem_mask:
1894 ; AVX512F-NEXT: vpmovsxwq %xmm1, %zmm1
1895 ; AVX512F-NEXT: vpsllq $63, %zmm1, %zmm1
1896 ; AVX512F-NEXT: vptestmq %zmm1, %zmm1, %k1
1897 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],mem[2,3,0,1]
1898 ; AVX512F-NEXT: retq
1900 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem_mask:
1901 ; AVX512F-32: # %bb.0:
1902 ; AVX512F-32-NEXT: vpmovsxwq %xmm1, %zmm1
1903 ; AVX512F-32-NEXT: vpsllq $63, %zmm1, %zmm1
1904 ; AVX512F-32-NEXT: vptestmq %zmm1, %zmm1, %k1
1905 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1906 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],mem[2,3,0,1]
1907 ; AVX512F-32-NEXT: retl
1908 %x1 = load <8 x double>,<8 x double> *%ptr,align 1
1909 %y = shufflevector <8 x double> %x, <8 x double> %x1, <8 x i32> <i32 0, i32 1, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9>
1910 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> %x
1911 ret <8 x double> %res
1914 define <8 x double> @test_vshuff64x2_512_mem_maskz(<8 x double> %x, <8 x double> *%ptr, <8 x i1> %mask) nounwind {
1915 ; AVX512F-LABEL: test_vshuff64x2_512_mem_maskz:
1917 ; AVX512F-NEXT: vpmovsxwq %xmm1, %zmm1
1918 ; AVX512F-NEXT: vpsllq $63, %zmm1, %zmm1
1919 ; AVX512F-NEXT: vptestmq %zmm1, %zmm1, %k1
1920 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],mem[2,3,0,1]
1921 ; AVX512F-NEXT: retq
1923 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem_maskz:
1924 ; AVX512F-32: # %bb.0:
1925 ; AVX512F-32-NEXT: vpmovsxwq %xmm1, %zmm1
1926 ; AVX512F-32-NEXT: vpsllq $63, %zmm1, %zmm1
1927 ; AVX512F-32-NEXT: vptestmq %zmm1, %zmm1, %k1
1928 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1929 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],mem[2,3,0,1]
1930 ; AVX512F-32-NEXT: retl
1931 %x1 = load <8 x double>,<8 x double> *%ptr,align 1
1932 %y = shufflevector <8 x double> %x, <8 x double> %x1, <8 x i32> <i32 0, i32 1, i32 4, i32 5, i32 10, i32 11, i32 8, i32 9>
1933 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> zeroinitializer
1934 ret <8 x double> %res
1937 define <8 x double> @shuffle_v8f64_23014567(<8 x double> %a0, <8 x double> %a1) {
1938 ; ALL-LABEL: shuffle_v8f64_23014567:
1940 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[2,3,0,1,4,5,6,7]
1941 ; ALL-NEXT: ret{{[l|q]}}
1942 %1 = shufflevector <8 x double> %a1, <8 x double> undef, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 4, i32 5, i32 6, i32 7>
1946 define <8 x double> @shuffle_v8f64_2301uu67(<8 x double> %a0, <8 x double> %a1) {
1947 ; ALL-LABEL: shuffle_v8f64_2301uu67:
1949 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[2,3,0,1,0,1,6,7]
1950 ; ALL-NEXT: ret{{[l|q]}}
1951 %1 = shufflevector <8 x double> %a1, <8 x double> undef, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 undef, i32 undef, i32 6, i32 7>
1955 define <8 x double> @shuffle_v8f64_2301uuuu(<8 x double> %a0, <8 x double> %a1) {
1956 ; ALL-LABEL: shuffle_v8f64_2301uuuu:
1958 ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm1[2,3,0,1]
1959 ; ALL-NEXT: ret{{[l|q]}}
1960 %1 = shufflevector <8 x double> %a1, <8 x double> undef, <8 x i32> <i32 2, i32 3, i32 0, i32 1, i32 undef, i32 undef, i32 undef, i32 undef>
1964 define <8 x double> @shuffle_v8f64_uuu2301(<8 x double> %a0, <8 x double> %a1) {
1965 ; ALL-LABEL: shuffle_v8f64_uuu2301:
1967 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,0,1],zmm1[2,3,0,1]
1968 ; ALL-NEXT: ret{{[l|q]}}
1969 %1 = shufflevector <8 x double> %a1, <8 x double> undef, <8 x i32> <i32 undef, i32 undef, i32 undef, i32 undef, i32 2, i32 3, i32 0, i32 1>
1973 define <8 x i64> @shuffle_v8i64_0zzzzzzz(<8 x i64> %a) {
1974 ; ALL-LABEL: shuffle_v8i64_0zzzzzzz:
1976 ; ALL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1977 ; ALL-NEXT: ret{{[l|q]}}
1978 %shuffle = shufflevector <8 x i64> %a, <8 x i64> zeroinitializer, <8 x i32> <i32 0, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
1979 ret <8 x i64> %shuffle
1982 define <8 x double> @shuffle_v8f64_0zzzzzzz(<8 x double> %a) {
1983 ; ALL-LABEL: shuffle_v8f64_0zzzzzzz:
1985 ; ALL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1986 ; ALL-NEXT: ret{{[l|q]}}
1987 %shuffle = shufflevector <8 x double> %a, <8 x double> zeroinitializer, <8 x i32> <i32 0, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
1988 ret <8 x double> %shuffle
1991 define <8 x i64> @shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b) {
1993 ; ALL-LABEL: shuffle_v8i64_12345678:
1995 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[1,2,3,4,5,6,7],zmm1[0]
1996 ; ALL-NEXT: ret{{[l|q]}}
1997 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
1998 ret <8 x i64> %shuffle
2001 define <8 x i64> @shuffle_v8i64_12345670(<8 x i64> %a) {
2003 ; ALL-LABEL: shuffle_v8i64_12345670:
2005 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[1,2,3,4,5,6,7,0]
2006 ; ALL-NEXT: ret{{[l|q]}}
2007 %shuffle = shufflevector <8 x i64> %a, <8 x i64> undef, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0>
2008 ret <8 x i64> %shuffle
2011 define <8 x i64> @mask_shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b, <8 x i64> %passthru, i8 %mask) {
2013 ; AVX512F-LABEL: mask_shuffle_v8i64_12345678:
2015 ; AVX512F-NEXT: kmovw %edi, %k1
2016 ; AVX512F-NEXT: valignq {{.*#+}} zmm2 {%k1} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2017 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
2018 ; AVX512F-NEXT: retq
2020 ; AVX512F-32-LABEL: mask_shuffle_v8i64_12345678:
2021 ; AVX512F-32: # %bb.0:
2022 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2023 ; AVX512F-32-NEXT: kmovw %eax, %k1
2024 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm2 {%k1} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2025 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
2026 ; AVX512F-32-NEXT: retl
2027 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
2028 %mask.cast = bitcast i8 %mask to <8 x i1>
2029 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> %passthru
2033 define <8 x i64> @mask_shuffle_v8i64_12345670(<8 x i64> %a, <8 x i64> %passthru, i8 %mask) {
2035 ; AVX512F-LABEL: mask_shuffle_v8i64_12345670:
2037 ; AVX512F-NEXT: kmovw %edi, %k1
2038 ; AVX512F-NEXT: valignq {{.*#+}} zmm1 {%k1} = zmm0[1,2,3,4,5,6,7,0]
2039 ; AVX512F-NEXT: vmovdqa64 %zmm1, %zmm0
2040 ; AVX512F-NEXT: retq
2042 ; AVX512F-32-LABEL: mask_shuffle_v8i64_12345670:
2043 ; AVX512F-32: # %bb.0:
2044 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2045 ; AVX512F-32-NEXT: kmovw %eax, %k1
2046 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm1 {%k1} = zmm0[1,2,3,4,5,6,7,0]
2047 ; AVX512F-32-NEXT: vmovdqa64 %zmm1, %zmm0
2048 ; AVX512F-32-NEXT: retl
2049 %shuffle = shufflevector <8 x i64> %a, <8 x i64> undef, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0>
2050 %mask.cast = bitcast i8 %mask to <8 x i1>
2051 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> %passthru
2055 define <8 x i64> @maskz_shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b, i8 %mask) {
2057 ; AVX512F-LABEL: maskz_shuffle_v8i64_12345678:
2059 ; AVX512F-NEXT: kmovw %edi, %k1
2060 ; AVX512F-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2061 ; AVX512F-NEXT: retq
2063 ; AVX512F-32-LABEL: maskz_shuffle_v8i64_12345678:
2064 ; AVX512F-32: # %bb.0:
2065 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2066 ; AVX512F-32-NEXT: kmovw %eax, %k1
2067 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2068 ; AVX512F-32-NEXT: retl
2069 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8>
2070 %mask.cast = bitcast i8 %mask to <8 x i1>
2071 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> zeroinitializer
2075 define <8 x i64> @maskz_shuffle_v8i64_12345670(<8 x i64> %a, i8 %mask) {
2077 ; AVX512F-LABEL: maskz_shuffle_v8i64_12345670:
2079 ; AVX512F-NEXT: kmovw %edi, %k1
2080 ; AVX512F-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7,0]
2081 ; AVX512F-NEXT: retq
2083 ; AVX512F-32-LABEL: maskz_shuffle_v8i64_12345670:
2084 ; AVX512F-32: # %bb.0:
2085 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2086 ; AVX512F-32-NEXT: kmovw %eax, %k1
2087 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7,0]
2088 ; AVX512F-32-NEXT: retl
2089 %shuffle = shufflevector <8 x i64> %a, <8 x i64> undef, <8 x i32> <i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 0>
2090 %mask.cast = bitcast i8 %mask to <8 x i1>
2091 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> zeroinitializer
2095 define <8 x double> @shuffle_v8f64_012389AB(<8 x double> %a, <8 x double> %b) {
2096 ; ALL-LABEL: shuffle_v8f64_012389AB:
2098 ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
2099 ; ALL-NEXT: ret{{[l|q]}}
2100 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>
2101 ret <8 x double> %shuffle
2104 define <8 x double> @shuffle_v8f64_89AB0123(<8 x double> %a, <8 x double> %b) {
2105 ; ALL-LABEL: shuffle_v8f64_89AB0123:
2107 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
2108 ; ALL-NEXT: ret{{[l|q]}}
2109 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 0, i32 1, i32 2, i32 3>
2110 ret <8 x double> %shuffle
2113 define <8 x double> @shuffle_v8f64_01230123(<8 x double> %a, <8 x double> %b) {
2114 ; ALL-LABEL: shuffle_v8f64_01230123:
2116 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2117 ; ALL-NEXT: ret{{[l|q]}}
2118 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2119 ret <8 x double> %shuffle
2122 define <8 x i64> @shuffle_v8i64_012389AB(<8 x i64> %a, <8 x i64> %b) {
2123 ; ALL-LABEL: shuffle_v8i64_012389AB:
2125 ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
2126 ; ALL-NEXT: ret{{[l|q]}}
2127 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 10, i32 11>
2128 ret <8 x i64> %shuffle
2131 define <8 x i64> @shuffle_v8i64_89AB0123(<8 x i64> %a, <8 x i64> %b) {
2132 ; ALL-LABEL: shuffle_v8i64_89AB0123:
2134 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
2135 ; ALL-NEXT: ret{{[l|q]}}
2136 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 8, i32 9, i32 10, i32 11, i32 0, i32 1, i32 2, i32 3>
2137 ret <8 x i64> %shuffle
2140 define <8 x i64> @shuffle_v8i64_01230123(<8 x i64> %a, <8 x i64> %b) {
2141 ; ALL-LABEL: shuffle_v8i64_01230123:
2143 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2144 ; ALL-NEXT: ret{{[l|q]}}
2145 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 0, i32 1, i32 2, i32 3>
2146 ret <8 x i64> %shuffle
2149 define <8 x double> @shuffle_v8f64_89234567(<8 x double> %a, <8 x double> %b) {
2150 ; ALL-LABEL: shuffle_v8f64_89234567:
2152 ; ALL-NEXT: vinsertf32x4 $0, %xmm1, %zmm0, %zmm0
2153 ; ALL-NEXT: ret{{[l|q]}}
2154 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 8, i32 9, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2155 ret <8 x double> %shuffle
2158 define <8 x double> @shuffle_v8f64_01894567(<8 x double> %a, <8 x double> %b) {
2159 ; ALL-LABEL: shuffle_v8f64_01894567:
2161 ; ALL-NEXT: vinsertf32x4 $1, %xmm1, %zmm0, %zmm0
2162 ; ALL-NEXT: ret{{[l|q]}}
2163 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 4, i32 5, i32 6, i32 7>
2164 ret <8 x double> %shuffle
2167 define <8 x double> @shuffle_v8f64_01238967(<8 x double> %a, <8 x double> %b) {
2168 ; ALL-LABEL: shuffle_v8f64_01238967:
2170 ; ALL-NEXT: vinsertf32x4 $2, %xmm1, %zmm0, %zmm0
2171 ; ALL-NEXT: ret{{[l|q]}}
2172 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 6, i32 7>
2173 ret <8 x double> %shuffle
2176 define <8 x double> @shuffle_v8f64_01234589(<8 x double> %a, <8 x double> %b) {
2177 ; ALL-LABEL: shuffle_v8f64_01234589:
2179 ; ALL-NEXT: vinsertf32x4 $3, %xmm1, %zmm0, %zmm0
2180 ; ALL-NEXT: ret{{[l|q]}}
2181 %shuffle = shufflevector <8 x double> %a, <8 x double> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 8, i32 9>
2182 ret <8 x double> %shuffle
2185 define <8 x i64> @shuffle_v8i64_89234567(<8 x i64> %a, <8 x i64> %b) {
2186 ; ALL-LABEL: shuffle_v8i64_89234567:
2188 ; ALL-NEXT: vinsertf32x4 $0, %xmm1, %zmm0, %zmm0
2189 ; ALL-NEXT: ret{{[l|q]}}
2190 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 8, i32 9, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7>
2191 ret <8 x i64> %shuffle
2194 define <8 x i64> @shuffle_v8i64_01894567(<8 x i64> %a, <8 x i64> %b) {
2195 ; ALL-LABEL: shuffle_v8i64_01894567:
2197 ; ALL-NEXT: vinsertf32x4 $1, %xmm1, %zmm0, %zmm0
2198 ; ALL-NEXT: ret{{[l|q]}}
2199 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 4, i32 5, i32 6, i32 7>
2200 ret <8 x i64> %shuffle
2203 define <8 x i64> @shuffle_v8i64_01238967(<8 x i64> %a, <8 x i64> %b) {
2204 ; ALL-LABEL: shuffle_v8i64_01238967:
2206 ; ALL-NEXT: vinsertf32x4 $2, %xmm1, %zmm0, %zmm0
2207 ; ALL-NEXT: ret{{[l|q]}}
2208 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 6, i32 7>
2209 ret <8 x i64> %shuffle
2212 define <8 x i64> @shuffle_v8i64_01234589(<8 x i64> %a, <8 x i64> %b) {
2213 ; ALL-LABEL: shuffle_v8i64_01234589:
2215 ; ALL-NEXT: vinsertf32x4 $3, %xmm1, %zmm0, %zmm0
2216 ; ALL-NEXT: ret{{[l|q]}}
2217 %shuffle = shufflevector <8 x i64> %a, <8 x i64> %b, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 8, i32 9>
2218 ret <8 x i64> %shuffle
2221 define <8 x double> @shuffle_v4f64_v8f64_22222222(<4 x double> %a) {
2222 ; ALL-LABEL: shuffle_v4f64_v8f64_22222222:
2224 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2225 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
2226 ; ALL-NEXT: ret{{[l|q]}}
2227 %shuffle = shufflevector <4 x double> %a, <4 x double> undef, <8 x i32> <i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2, i32 2>
2228 ret <8 x double> %shuffle
2231 define <8 x i64> @shuffle_v2i64_v8i64_01010101(<2 x i64> %a) {
2232 ; ALL-LABEL: shuffle_v2i64_v8i64_01010101:
2234 ; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2235 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
2236 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2237 ; ALL-NEXT: ret{{[l|q]}}
2238 %shuffle = shufflevector <2 x i64> %a, <2 x i64> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
2239 ret <8 x i64> %shuffle
2242 define <8 x double> @shuffle_v2f64_v8f64_01010101(<2 x double> %a) {
2243 ; ALL-LABEL: shuffle_v2f64_v8f64_01010101:
2245 ; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2246 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
2247 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2248 ; ALL-NEXT: ret{{[l|q]}}
2249 %shuffle = shufflevector <2 x double> %a, <2 x double> undef, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 1>
2250 ret <8 x double> %shuffle
2254 define <4 x double> @test_v8f64_2346 (<8 x double> %v) {
2255 ; AVX512F-LABEL: test_v8f64_2346:
2257 ; AVX512F-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [2,3,4,6,2,3,4,6]
2258 ; AVX512F-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2259 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
2260 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2261 ; AVX512F-NEXT: retq
2263 ; AVX512F-32-LABEL: test_v8f64_2346:
2264 ; AVX512F-32: # %bb.0:
2265 ; AVX512F-32-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [2,0,3,0,4,0,6,0,2,0,3,0,4,0,6,0]
2266 ; AVX512F-32-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2267 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
2268 ; AVX512F-32-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2269 ; AVX512F-32-NEXT: retl
2270 %res = shufflevector <8 x double> %v, <8 x double> undef, <4 x i32> <i32 2, i32 3, i32 4, i32 6>
2271 ret <4 x double> %res
2275 define <2 x double> @test_v8f64_34 (<8 x double> %v) {
2276 ; ALL-LABEL: test_v8f64_34:
2278 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm1
2279 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2280 ; ALL-NEXT: vshufpd {{.*#+}} xmm0 = xmm0[1],xmm1[0]
2281 ; ALL-NEXT: vzeroupper
2282 ; ALL-NEXT: ret{{[l|q]}}
2283 %res = shufflevector <8 x double> %v, <8 x double> undef, <2 x i32> <i32 3, i32 4>
2284 ret <2 x double> %res
2288 define <4 x i64> @test_v8i64_1257 (<8 x i64> %v) {
2289 ; AVX512F-LABEL: test_v8i64_1257:
2291 ; AVX512F-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [1,2,5,7,1,2,5,7]
2292 ; AVX512F-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2293 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
2294 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2295 ; AVX512F-NEXT: retq
2297 ; AVX512F-32-LABEL: test_v8i64_1257:
2298 ; AVX512F-32: # %bb.0:
2299 ; AVX512F-32-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [1,0,2,0,5,0,7,0,1,0,2,0,5,0,7,0]
2300 ; AVX512F-32-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2301 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
2302 ; AVX512F-32-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2303 ; AVX512F-32-NEXT: retl
2304 %res = shufflevector <8 x i64> %v, <8 x i64> undef, <4 x i32> <i32 1, i32 2, i32 5, i32 7>
2308 define <2 x i64> @test_v8i64_2_5 (<8 x i64> %v) {
2309 ; ALL-LABEL: test_v8i64_2_5:
2311 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm1
2312 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2313 ; ALL-NEXT: vblendps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3]
2314 ; ALL-NEXT: vzeroupper
2315 ; ALL-NEXT: ret{{[l|q]}}
2316 %res = shufflevector <8 x i64> %v, <8 x i64> undef, <2 x i32> <i32 2, i32 5>
2320 define <8 x i64> @test_v8i64_insert_zero_128(<8 x i64> %a) {
2321 ; ALL-LABEL: test_v8i64_insert_zero_128:
2323 ; ALL-NEXT: movb $3, %al
2324 ; ALL-NEXT: kmovw %eax, %k1
2325 ; ALL-NEXT: vpexpandq %zmm0, %zmm0 {%k1} {z}
2326 ; ALL-NEXT: ret{{[l|q]}}
2327 %res = shufflevector <8 x i64> %a, <8 x i64> <i64 0, i64 0, i64 0, i64 0, i64 undef, i64 undef, i64 undef, i64 undef>, <8 x i32> <i32 0, i32 1, i32 8, i32 9, i32 8, i32 9, i32 8, i32 9>
2331 define <8 x i64> @test_v8i64_insert_zero_256(<8 x i64> %a) {
2332 ; ALL-LABEL: test_v8i64_insert_zero_256:
2334 ; ALL-NEXT: vmovaps %ymm0, %ymm0
2335 ; ALL-NEXT: ret{{[l|q]}}
2336 %res = shufflevector <8 x i64> %a, <8 x i64> <i64 0, i64 0, i64 0, i64 0, i64 undef, i64 undef, i64 undef, i64 undef>, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 8, i32 9>