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 ; ALL-LABEL: shuffle_v8f64_1z2z5z6z:
846 ; ALL-NEXT: vxorpd %xmm1, %xmm1, %xmm1
847 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1],zmm1[0],zmm0[2],zmm1[2],zmm0[5],zmm1[4],zmm0[6],zmm1[6]
848 ; ALL-NEXT: ret{{[l|q]}}
849 %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>
850 ret <8 x double> %shuffle
853 define <8 x i64> @shuffle_v8i64_00000000(<8 x i64> %a, <8 x i64> %b) {
855 ; ALL-LABEL: shuffle_v8i64_00000000:
857 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
858 ; ALL-NEXT: ret{{[l|q]}}
859 %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>
860 ret <8 x i64> %shuffle
863 define <8 x i64> @shuffle_v8i64_44444444(<8 x i64> %a, <8 x i64> %b) {
864 ; ALL-LABEL: shuffle_v8i64_44444444:
866 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm0
867 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
868 ; ALL-NEXT: ret{{[l|q]}}
869 %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>
870 ret <8 x i64> %shuffle
873 define <8 x i64> @shuffle_v8i64_66666666(<8 x i64> %a, <8 x i64> %b) {
874 ; ALL-LABEL: shuffle_v8i64_66666666:
876 ; ALL-NEXT: vextractf32x4 $3, %zmm0, %xmm0
877 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
878 ; ALL-NEXT: ret{{[l|q]}}
879 %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>
880 ret <8 x i64> %shuffle
883 define <8 x i64> @shuffle_v8i64_00000010(<8 x i64> %a, <8 x i64> %b) {
885 ; AVX512F-LABEL: shuffle_v8i64_00000010:
887 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0]
888 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
891 ; AVX512F-32-LABEL: shuffle_v8i64_00000010:
892 ; AVX512F-32: # %bb.0:
893 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]
894 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
895 ; AVX512F-32-NEXT: retl
896 %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>
897 ret <8 x i64> %shuffle
900 define <8 x i64> @shuffle_v8i64_00000200(<8 x i64> %a, <8 x i64> %b) {
902 ; AVX512F-LABEL: shuffle_v8i64_00000200:
904 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,2,0,0]
905 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
908 ; AVX512F-32-LABEL: shuffle_v8i64_00000200:
909 ; AVX512F-32: # %bb.0:
910 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0]
911 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
912 ; AVX512F-32-NEXT: retl
913 %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>
914 ret <8 x i64> %shuffle
917 define <8 x i64> @shuffle_v8i64_00003000(<8 x i64> %a, <8 x i64> %b) {
919 ; AVX512F-LABEL: shuffle_v8i64_00003000:
921 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,3,0,0,0]
922 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
925 ; AVX512F-32-LABEL: shuffle_v8i64_00003000:
926 ; AVX512F-32: # %bb.0:
927 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0]
928 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
929 ; AVX512F-32-NEXT: retl
930 %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>
931 ret <8 x i64> %shuffle
934 define <8 x i64> @shuffle_v8i64_00040000(<8 x i64> %a, <8 x i64> %b) {
936 ; AVX512F-LABEL: shuffle_v8i64_00040000:
938 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,4,0,0,0,0]
939 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
942 ; AVX512F-32-LABEL: shuffle_v8i64_00040000:
943 ; AVX512F-32: # %bb.0:
944 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0]
945 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
946 ; AVX512F-32-NEXT: retl
947 %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>
948 ret <8 x i64> %shuffle
951 define <8 x i64> @shuffle_v8i64_00500000(<8 x i64> %a, <8 x i64> %b) {
953 ; AVX512F-LABEL: shuffle_v8i64_00500000:
955 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,5,0,0,0,0,0]
956 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
959 ; AVX512F-32-LABEL: shuffle_v8i64_00500000:
960 ; AVX512F-32: # %bb.0:
961 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0]
962 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
963 ; AVX512F-32-NEXT: retl
964 %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>
965 ret <8 x i64> %shuffle
968 define <8 x i64> @shuffle_v8i64_06000000(<8 x i64> %a, <8 x i64> %b) {
970 ; AVX512F-LABEL: shuffle_v8i64_06000000:
972 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,6,0,0,0,0,0,0]
973 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
976 ; AVX512F-32-LABEL: shuffle_v8i64_06000000:
977 ; AVX512F-32: # %bb.0:
978 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0]
979 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
980 ; AVX512F-32-NEXT: retl
981 %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>
982 ret <8 x i64> %shuffle
985 define <8 x i64> @shuffle_v8i64_70000000(<8 x i64> %a, <8 x i64> %b) {
987 ; AVX512F-LABEL: shuffle_v8i64_70000000:
989 ; AVX512F-NEXT: movl $7, %eax
990 ; AVX512F-NEXT: vmovq %rax, %xmm1
991 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
994 ; AVX512F-32-LABEL: shuffle_v8i64_70000000:
995 ; AVX512F-32: # %bb.0:
996 ; AVX512F-32-NEXT: movl $7, %eax
997 ; AVX512F-32-NEXT: vmovd %eax, %xmm1
998 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
999 ; AVX512F-32-NEXT: retl
1000 %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>
1001 ret <8 x i64> %shuffle
1004 define <8 x i64> @shuffle_v8i64_01014545(<8 x i64> %a, <8 x i64> %b) {
1005 ; ALL-LABEL: shuffle_v8i64_01014545:
1007 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5]
1008 ; ALL-NEXT: ret{{[l|q]}}
1010 %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>
1011 ret <8 x i64> %shuffle
1014 define <8 x i64> @shuffle_v8i64_01014545_mem(<8 x i64>* %ptr, <8 x i64> %b) {
1015 ; AVX512F-LABEL: shuffle_v8i64_01014545_mem:
1017 ; AVX512F-NEXT: vpermpd {{.*#+}} zmm0 = mem[0,1,0,1,4,5,4,5]
1018 ; AVX512F-NEXT: retq
1020 ; AVX512F-32-LABEL: shuffle_v8i64_01014545_mem:
1021 ; AVX512F-32: # %bb.0:
1022 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1023 ; AVX512F-32-NEXT: vpermpd {{.*#+}} zmm0 = mem[0,1,0,1,4,5,4,5]
1024 ; AVX512F-32-NEXT: retl
1026 %a = load <8 x i64>, <8 x i64>* %ptr
1027 %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>
1028 ret <8 x i64> %shuffle
1031 define <8 x i64> @shuffle_v8i64_00112233(<8 x i64> %a, <8 x i64> %b) {
1033 ; AVX512F-LABEL: shuffle_v8i64_00112233:
1035 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,1,2,2,3,3]
1036 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1037 ; AVX512F-NEXT: retq
1039 ; AVX512F-32-LABEL: shuffle_v8i64_00112233:
1040 ; AVX512F-32: # %bb.0:
1041 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0]
1042 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1043 ; AVX512F-32-NEXT: retl
1044 %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>
1045 ret <8 x i64> %shuffle
1048 define <8 x i64> @shuffle_v8i64_00001111(<8 x i64> %a, <8 x i64> %b) {
1050 ; AVX512F-LABEL: shuffle_v8i64_00001111:
1052 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,1,1,1]
1053 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1054 ; AVX512F-NEXT: retq
1056 ; AVX512F-32-LABEL: shuffle_v8i64_00001111:
1057 ; AVX512F-32: # %bb.0:
1058 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0]
1059 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1060 ; AVX512F-32-NEXT: retl
1061 %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>
1062 ret <8 x i64> %shuffle
1065 define <8 x i64> @shuffle_v8i64_81a3c5e7(<8 x i64> %a, <8 x i64> %b) {
1067 ; ALL-LABEL: shuffle_v8i64_81a3c5e7:
1069 ; ALL-NEXT: movb $-86, %al
1070 ; ALL-NEXT: kmovw %eax, %k1
1071 ; ALL-NEXT: vpblendmq %zmm0, %zmm1, %zmm0 {%k1}
1072 ; ALL-NEXT: ret{{[l|q]}}
1073 %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>
1074 ret <8 x i64> %shuffle
1077 define <8 x i64> @shuffle_v8i64_08080808(<8 x i64> %a, <8 x i64> %b) {
1079 ; AVX512F-LABEL: shuffle_v8i64_08080808:
1081 ; AVX512F-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,8,0,8,0,8,0,8]
1082 ; AVX512F-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1083 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1084 ; AVX512F-NEXT: retq
1086 ; AVX512F-32-LABEL: shuffle_v8i64_08080808:
1087 ; AVX512F-32: # %bb.0:
1088 ; AVX512F-32-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,0,0,8,0,0,0,8,0]
1089 ; AVX512F-32-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1090 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1091 ; AVX512F-32-NEXT: retl
1092 %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>
1093 ret <8 x i64> %shuffle
1096 define <8 x i64> @shuffle_v8i64_08084c4c(<8 x i64> %a, <8 x i64> %b) {
1098 ; AVX512F-LABEL: shuffle_v8i64_08084c4c:
1100 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,0,8,4,12,4,12]
1101 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1102 ; AVX512F-NEXT: retq
1104 ; AVX512F-32-LABEL: shuffle_v8i64_08084c4c:
1105 ; AVX512F-32: # %bb.0:
1106 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,4,0,12,0,4,0,12,0]
1107 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1108 ; AVX512F-32-NEXT: retl
1109 %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>
1110 ret <8 x i64> %shuffle
1113 define <8 x i64> @shuffle_v8i64_8823cc67(<8 x i64> %a, <8 x i64> %b) {
1115 ; AVX512F-LABEL: shuffle_v8i64_8823cc67:
1117 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,10,11,4,4,14,15]
1118 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1119 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1120 ; AVX512F-NEXT: retq
1122 ; AVX512F-32-LABEL: shuffle_v8i64_8823cc67:
1123 ; AVX512F-32: # %bb.0:
1124 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,0,0,10,0,11,0,4,0,4,0,14,0,15,0]
1125 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1126 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1127 ; AVX512F-32-NEXT: retl
1128 %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>
1129 ret <8 x i64> %shuffle
1132 define <8 x i64> @shuffle_v8i64_9832dc76(<8 x i64> %a, <8 x i64> %b) {
1134 ; AVX512F-LABEL: shuffle_v8i64_9832dc76:
1136 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,11,10,5,4,15,14]
1137 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1138 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1139 ; AVX512F-NEXT: retq
1141 ; AVX512F-32-LABEL: shuffle_v8i64_9832dc76:
1142 ; AVX512F-32: # %bb.0:
1143 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,0,0,11,0,10,0,5,0,4,0,15,0,14,0]
1144 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1145 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1146 ; AVX512F-32-NEXT: retl
1147 %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>
1148 ret <8 x i64> %shuffle
1151 define <8 x i64> @shuffle_v8i64_9810dc54(<8 x i64> %a, <8 x i64> %b) {
1153 ; AVX512F-LABEL: shuffle_v8i64_9810dc54:
1155 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,9,8,5,4,13,12]
1156 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1157 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1158 ; AVX512F-NEXT: retq
1160 ; AVX512F-32-LABEL: shuffle_v8i64_9810dc54:
1161 ; AVX512F-32: # %bb.0:
1162 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [1,0,0,0,9,0,8,0,5,0,4,0,13,0,12,0]
1163 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1164 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1165 ; AVX512F-32-NEXT: retl
1166 %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>
1167 ret <8 x i64> %shuffle
1170 define <8 x i64> @shuffle_v8i64_08194c5d(<8 x i64> %a, <8 x i64> %b) {
1172 ; AVX512F-LABEL: shuffle_v8i64_08194c5d:
1174 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,1,9,4,12,5,13]
1175 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1176 ; AVX512F-NEXT: retq
1178 ; AVX512F-32-LABEL: shuffle_v8i64_08194c5d:
1179 ; AVX512F-32: # %bb.0:
1180 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,4,0,12,0,5,0,13,0]
1181 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1182 ; AVX512F-32-NEXT: retl
1183 %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>
1184 ret <8 x i64> %shuffle
1187 define <8 x i64> @shuffle_v8i64_2a3b6e7f(<8 x i64> %a, <8 x i64> %b) {
1189 ; AVX512F-LABEL: shuffle_v8i64_2a3b6e7f:
1191 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [2,10,3,11,6,14,7,15]
1192 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1193 ; AVX512F-NEXT: retq
1195 ; AVX512F-32-LABEL: shuffle_v8i64_2a3b6e7f:
1196 ; AVX512F-32: # %bb.0:
1197 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [2,0,10,0,3,0,11,0,6,0,14,0,7,0,15,0]
1198 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1199 ; AVX512F-32-NEXT: retl
1200 %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>
1201 ret <8 x i64> %shuffle
1204 define <8 x i64> @shuffle_v8i64_08192a3b(<8 x i64> %a, <8 x i64> %b) {
1206 ; AVX512F-LABEL: shuffle_v8i64_08192a3b:
1208 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,8,1,9,2,10,3,11]
1209 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1210 ; AVX512F-NEXT: retq
1212 ; AVX512F-32-LABEL: shuffle_v8i64_08192a3b:
1213 ; AVX512F-32: # %bb.0:
1214 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,2,0,10,0,3,0,11,0]
1215 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1216 ; AVX512F-32-NEXT: retl
1217 %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>
1218 ret <8 x i64> %shuffle
1221 define <8 x i64> @shuffle_v8i64_08991abb(<8 x i64> %a, <8 x i64> %b) {
1223 ; AVX512F-LABEL: shuffle_v8i64_08991abb:
1225 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,0,1,1,9,2,3,3]
1226 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1227 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1228 ; AVX512F-NEXT: retq
1230 ; AVX512F-32-LABEL: shuffle_v8i64_08991abb:
1231 ; AVX512F-32: # %bb.0:
1232 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,0,0,0,1,0,1,0,9,0,2,0,3,0,3,0]
1233 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1234 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1235 ; AVX512F-32-NEXT: retl
1236 %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>
1237 ret <8 x i64> %shuffle
1240 define <8 x i64> @shuffle_v8i64_091b2d3f(<8 x i64> %a, <8 x i64> %b) {
1242 ; AVX512F-LABEL: shuffle_v8i64_091b2d3f:
1244 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,9,1,11,2,13,3,15]
1245 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1246 ; AVX512F-NEXT: retq
1248 ; AVX512F-32-LABEL: shuffle_v8i64_091b2d3f:
1249 ; AVX512F-32: # %bb.0:
1250 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [0,0,9,0,1,0,11,0,2,0,13,0,3,0,15,0]
1251 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1252 ; AVX512F-32-NEXT: retl
1253 %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>
1254 ret <8 x i64> %shuffle
1257 define <8 x i64> @shuffle_v8i64_09ab1def(<8 x i64> %a, <8 x i64> %b) {
1259 ; AVX512F-LABEL: shuffle_v8i64_09ab1def:
1261 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,1,2,3,9,5,6,7]
1262 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1263 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1264 ; AVX512F-NEXT: retq
1266 ; AVX512F-32-LABEL: shuffle_v8i64_09ab1def:
1267 ; AVX512F-32: # %bb.0:
1268 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [8,0,1,0,2,0,3,0,9,0,5,0,6,0,7,0]
1269 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1270 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1271 ; AVX512F-32-NEXT: retl
1272 %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>
1273 ret <8 x i64> %shuffle
1276 define <8 x i64> @shuffle_v8i64_00014445(<8 x i64> %a, <8 x i64> %b) {
1278 ; ALL-LABEL: shuffle_v8i64_00014445:
1280 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,0,1,4,4,4,5]
1281 ; ALL-NEXT: ret{{[l|q]}}
1282 %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>
1283 ret <8 x i64> %shuffle
1286 define <8 x i64> @shuffle_v8i64_00204464(<8 x i64> %a, <8 x i64> %b) {
1288 ; ALL-LABEL: shuffle_v8i64_00204464:
1290 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,0,4,4,6,4]
1291 ; ALL-NEXT: ret{{[l|q]}}
1292 %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>
1293 ret <8 x i64> %shuffle
1296 define <8 x i64> @shuffle_v8i64_03004744(<8 x i64> %a, <8 x i64> %b) {
1298 ; ALL-LABEL: shuffle_v8i64_03004744:
1300 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,3,0,0,4,7,4,4]
1301 ; ALL-NEXT: ret{{[l|q]}}
1302 %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>
1303 ret <8 x i64> %shuffle
1306 define <8 x i64> @shuffle_v8i64_10005444(<8 x i64> %a, <8 x i64> %b) {
1308 ; ALL-LABEL: shuffle_v8i64_10005444:
1310 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,0,0,5,4,4,4]
1311 ; ALL-NEXT: ret{{[l|q]}}
1312 %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>
1313 ret <8 x i64> %shuffle
1316 define <8 x i64> @shuffle_v8i64_22006644(<8 x i64> %a, <8 x i64> %b) {
1318 ; ALL-LABEL: shuffle_v8i64_22006644:
1320 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[2,2,0,0,6,6,4,4]
1321 ; ALL-NEXT: ret{{[l|q]}}
1322 %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>
1323 ret <8 x i64> %shuffle
1326 define <8 x i64> @shuffle_v8i64_33307774(<8 x i64> %a, <8 x i64> %b) {
1328 ; ALL-LABEL: shuffle_v8i64_33307774:
1330 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,3,3,0,7,7,7,4]
1331 ; ALL-NEXT: ret{{[l|q]}}
1332 %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>
1333 ret <8 x i64> %shuffle
1336 define <8 x i64> @shuffle_v8i64_32107654(<8 x i64> %a, <8 x i64> %b) {
1338 ; ALL-LABEL: shuffle_v8i64_32107654:
1340 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,2,1,0,7,6,5,4]
1341 ; ALL-NEXT: ret{{[l|q]}}
1342 %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>
1343 ret <8 x i64> %shuffle
1346 define <8 x i64> @shuffle_v8i64_00234467(<8 x i64> %a, <8 x i64> %b) {
1348 ; ALL-LABEL: shuffle_v8i64_00234467:
1350 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,7]
1351 ; ALL-NEXT: ret{{[l|q]}}
1352 %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>
1353 ret <8 x i64> %shuffle
1356 define <8 x i64> @shuffle_v8i64_00224466(<8 x i64> %a, <8 x i64> %b) {
1358 ; ALL-LABEL: shuffle_v8i64_00224466:
1360 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5,8,9,8,9,12,13,12,13]
1361 ; ALL-NEXT: ret{{[l|q]}}
1362 %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>
1363 ret <8 x i64> %shuffle
1366 define <8 x i64> @shuffle_v8i64_10325476(<8 x i64> %a, <8 x i64> %b) {
1368 ; ALL-LABEL: shuffle_v8i64_10325476:
1370 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[2,3,0,1,6,7,4,5,10,11,8,9,14,15,12,13]
1371 ; ALL-NEXT: ret{{[l|q]}}
1372 %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>
1373 ret <8 x i64> %shuffle
1376 define <8 x i64> @shuffle_v8i64_11335577(<8 x i64> %a, <8 x i64> %b) {
1378 ; ALL-LABEL: shuffle_v8i64_11335577:
1380 ; ALL-NEXT: vpermilps {{.*#+}} zmm0 = zmm0[2,3,2,3,6,7,6,7,10,11,10,11,14,15,14,15]
1381 ; ALL-NEXT: ret{{[l|q]}}
1382 %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>
1383 ret <8 x i64> %shuffle
1386 define <8 x i64> @shuffle_v8i64_10235467(<8 x i64> %a, <8 x i64> %b) {
1388 ; ALL-LABEL: shuffle_v8i64_10235467:
1390 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,2,3,5,4,6,7]
1391 ; ALL-NEXT: ret{{[l|q]}}
1392 %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>
1393 ret <8 x i64> %shuffle
1396 define <8 x i64> @shuffle_v8i64_10225466(<8 x i64> %a, <8 x i64> %b) {
1398 ; ALL-LABEL: shuffle_v8i64_10225466:
1400 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,2,2,5,4,6,6]
1401 ; ALL-NEXT: ret{{[l|q]}}
1402 %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>
1403 ret <8 x i64> %shuffle
1406 define <8 x i64> @shuffle_v8i64_00015444(<8 x i64> %a, <8 x i64> %b) {
1408 ; AVX512F-LABEL: shuffle_v8i64_00015444:
1410 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,1,5,4,4,4]
1411 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1412 ; AVX512F-NEXT: retq
1414 ; AVX512F-32-LABEL: shuffle_v8i64_00015444:
1415 ; AVX512F-32: # %bb.0:
1416 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0,5,0,4,0,4,0,4,0]
1417 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1418 ; AVX512F-32-NEXT: retl
1419 %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>
1420 ret <8 x i64> %shuffle
1423 define <8 x i64> @shuffle_v8i64_00204644(<8 x i64> %a, <8 x i64> %b) {
1425 ; AVX512F-LABEL: shuffle_v8i64_00204644:
1427 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,0,4,6,4,4]
1428 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1429 ; AVX512F-NEXT: retq
1431 ; AVX512F-32-LABEL: shuffle_v8i64_00204644:
1432 ; AVX512F-32: # %bb.0:
1433 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,0,0,4,0,6,0,4,0,4,0]
1434 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1435 ; AVX512F-32-NEXT: retl
1436 %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>
1437 ret <8 x i64> %shuffle
1440 define <8 x i64> @shuffle_v8i64_03004474(<8 x i64> %a, <8 x i64> %b) {
1442 ; AVX512F-LABEL: shuffle_v8i64_03004474:
1444 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,3,0,0,4,4,7,4]
1445 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1446 ; AVX512F-NEXT: retq
1448 ; AVX512F-32-LABEL: shuffle_v8i64_03004474:
1449 ; AVX512F-32: # %bb.0:
1450 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,3,0,0,0,0,0,4,0,4,0,7,0,4,0]
1451 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1452 ; AVX512F-32-NEXT: retl
1453 %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>
1454 ret <8 x i64> %shuffle
1457 define <8 x i64> @shuffle_v8i64_10004444(<8 x i64> %a, <8 x i64> %b) {
1459 ; AVX512F-LABEL: shuffle_v8i64_10004444:
1461 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,4,4,4,4]
1462 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1463 ; AVX512F-NEXT: retq
1465 ; AVX512F-32-LABEL: shuffle_v8i64_10004444:
1466 ; AVX512F-32: # %bb.0:
1467 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,0,0,0,0,4,0,4,0,4,0,4,0]
1468 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1469 ; AVX512F-32-NEXT: retl
1470 %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>
1471 ret <8 x i64> %shuffle
1474 define <8 x i64> @shuffle_v8i64_22006446(<8 x i64> %a, <8 x i64> %b) {
1476 ; AVX512F-LABEL: shuffle_v8i64_22006446:
1478 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [2,2,0,0,6,4,4,6]
1479 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1480 ; AVX512F-NEXT: retq
1482 ; AVX512F-32-LABEL: shuffle_v8i64_22006446:
1483 ; AVX512F-32: # %bb.0:
1484 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [2,0,2,0,0,0,0,0,6,0,4,0,4,0,6,0]
1485 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1486 ; AVX512F-32-NEXT: retl
1487 %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>
1488 ret <8 x i64> %shuffle
1491 define <8 x i64> @shuffle_v8i64_33307474(<8 x i64> %a, <8 x i64> %b) {
1493 ; AVX512F-LABEL: shuffle_v8i64_33307474:
1495 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,3,3,0,7,4,7,4]
1496 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1497 ; AVX512F-NEXT: retq
1499 ; AVX512F-32-LABEL: shuffle_v8i64_33307474:
1500 ; AVX512F-32: # %bb.0:
1501 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,3,0,3,0,0,0,7,0,4,0,7,0,4,0]
1502 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1503 ; AVX512F-32-NEXT: retl
1504 %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>
1505 ret <8 x i64> %shuffle
1508 define <8 x i64> @shuffle_v8i64_32104567(<8 x i64> %a, <8 x i64> %b) {
1510 ; AVX512F-LABEL: shuffle_v8i64_32104567:
1512 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,2,1,0,4,5,6,7]
1513 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1514 ; AVX512F-NEXT: retq
1516 ; AVX512F-32-LABEL: shuffle_v8i64_32104567:
1517 ; AVX512F-32: # %bb.0:
1518 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,2,0,1,0,0,0,4,0,5,0,6,0,7,0]
1519 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1520 ; AVX512F-32-NEXT: retl
1521 %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>
1522 ret <8 x i64> %shuffle
1525 define <8 x i64> @shuffle_v8i64_00236744(<8 x i64> %a, <8 x i64> %b) {
1527 ; AVX512F-LABEL: shuffle_v8i64_00236744:
1529 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,3,6,7,4,4]
1530 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1531 ; AVX512F-NEXT: retq
1533 ; AVX512F-32-LABEL: shuffle_v8i64_00236744:
1534 ; AVX512F-32: # %bb.0:
1535 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,3,0,6,0,7,0,4,0,4,0]
1536 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1537 ; AVX512F-32-NEXT: retl
1538 %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>
1539 ret <8 x i64> %shuffle
1542 define <8 x i64> @shuffle_v8i64_00226644(<8 x i64> %a, <8 x i64> %b) {
1544 ; AVX512F-LABEL: shuffle_v8i64_00226644:
1546 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,2,6,6,4,4]
1547 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1548 ; AVX512F-NEXT: retq
1550 ; AVX512F-32-LABEL: shuffle_v8i64_00226644:
1551 ; AVX512F-32: # %bb.0:
1552 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,2,0,6,0,6,0,4,0,4,0]
1553 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1554 ; AVX512F-32-NEXT: retl
1555 %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>
1556 ret <8 x i64> %shuffle
1559 define <8 x i64> @shuffle_v8i64_10324567(<8 x i64> %a, <8 x i64> %b) {
1561 ; AVX512F-LABEL: shuffle_v8i64_10324567:
1563 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,3,2,4,5,6,7]
1564 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1565 ; AVX512F-NEXT: retq
1567 ; AVX512F-32-LABEL: shuffle_v8i64_10324567:
1568 ; AVX512F-32: # %bb.0:
1569 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,3,0,2,0,4,0,5,0,6,0,7,0]
1570 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1571 ; AVX512F-32-NEXT: retl
1572 %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>
1573 ret <8 x i64> %shuffle
1576 define <8 x i64> @shuffle_v8i64_11334567(<8 x i64> %a, <8 x i64> %b) {
1578 ; AVX512F-LABEL: shuffle_v8i64_11334567:
1580 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,1,3,3,4,5,6,7]
1581 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1582 ; AVX512F-NEXT: retq
1584 ; AVX512F-32-LABEL: shuffle_v8i64_11334567:
1585 ; AVX512F-32: # %bb.0:
1586 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,1,0,3,0,3,0,4,0,5,0,6,0,7,0]
1587 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1588 ; AVX512F-32-NEXT: retl
1589 %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>
1590 ret <8 x i64> %shuffle
1593 define <8 x i64> @shuffle_v8i64_01235467(<8 x i64> %a, <8 x i64> %b) {
1595 ; AVX512F-LABEL: shuffle_v8i64_01235467:
1597 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,1,2,3,5,4,6,7]
1598 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1599 ; AVX512F-NEXT: retq
1601 ; AVX512F-32-LABEL: shuffle_v8i64_01235467:
1602 ; AVX512F-32: # %bb.0:
1603 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,0,2,0,3,0,5,0,4,0,6,0,7,0]
1604 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1605 ; AVX512F-32-NEXT: retl
1606 %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>
1607 ret <8 x i64> %shuffle
1610 define <8 x i64> @shuffle_v8i64_01235466(<8 x i64> %a, <8 x i64> %b) {
1612 ; AVX512F-LABEL: shuffle_v8i64_01235466:
1614 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,1,2,3,5,4,6,6]
1615 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1616 ; AVX512F-NEXT: retq
1618 ; AVX512F-32-LABEL: shuffle_v8i64_01235466:
1619 ; AVX512F-32: # %bb.0:
1620 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,0,2,0,3,0,5,0,4,0,6,0,6,0]
1621 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1622 ; AVX512F-32-NEXT: retl
1623 %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>
1624 ret <8 x i64> %shuffle
1627 define <8 x i64> @shuffle_v8i64_002u6u44(<8 x i64> %a, <8 x i64> %b) {
1629 ; AVX512F-LABEL: shuffle_v8i64_002u6u44:
1631 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,2,u,6,u,4,4>
1632 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1633 ; AVX512F-NEXT: retq
1635 ; AVX512F-32-LABEL: shuffle_v8i64_002u6u44:
1636 ; AVX512F-32: # %bb.0:
1637 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,0,0,2,0,u,u,6,0,u,u,4,0,4,0>
1638 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1639 ; AVX512F-32-NEXT: retl
1640 %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>
1641 ret <8 x i64> %shuffle
1644 define <8 x i64> @shuffle_v8i64_00uu66uu(<8 x i64> %a, <8 x i64> %b) {
1646 ; AVX512F-LABEL: shuffle_v8i64_00uu66uu:
1648 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,u,u,6,6,u,u>
1649 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1650 ; AVX512F-NEXT: retq
1652 ; AVX512F-32-LABEL: shuffle_v8i64_00uu66uu:
1653 ; AVX512F-32: # %bb.0:
1654 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,0,0,u,u,u,u,6,0,6,0,u,u,u,u>
1655 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1656 ; AVX512F-32-NEXT: retl
1657 %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>
1658 ret <8 x i64> %shuffle
1661 define <8 x i64> @shuffle_v8i64_103245uu(<8 x i64> %a, <8 x i64> %b) {
1663 ; AVX512F-LABEL: shuffle_v8i64_103245uu:
1665 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <1,0,3,2,4,5,u,u>
1666 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1667 ; AVX512F-NEXT: retq
1669 ; AVX512F-32-LABEL: shuffle_v8i64_103245uu:
1670 ; AVX512F-32: # %bb.0:
1671 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <1,0,0,0,3,0,2,0,4,0,5,0,u,u,u,u>
1672 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1673 ; AVX512F-32-NEXT: retl
1674 %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>
1675 ret <8 x i64> %shuffle
1678 define <8 x i64> @shuffle_v8i64_1133uu67(<8 x i64> %a, <8 x i64> %b) {
1680 ; AVX512F-LABEL: shuffle_v8i64_1133uu67:
1682 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <1,1,3,3,u,u,6,7>
1683 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1684 ; AVX512F-NEXT: retq
1686 ; AVX512F-32-LABEL: shuffle_v8i64_1133uu67:
1687 ; AVX512F-32: # %bb.0:
1688 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <1,0,1,0,3,0,3,0,u,u,u,u,6,0,7,0>
1689 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1690 ; AVX512F-32-NEXT: retl
1691 %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>
1692 ret <8 x i64> %shuffle
1695 define <8 x i64> @shuffle_v8i64_0uu354uu(<8 x i64> %a, <8 x i64> %b) {
1697 ; AVX512F-LABEL: shuffle_v8i64_0uu354uu:
1699 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <0,u,u,3,5,4,u,u>
1700 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1701 ; AVX512F-NEXT: retq
1703 ; AVX512F-32-LABEL: shuffle_v8i64_0uu354uu:
1704 ; AVX512F-32: # %bb.0:
1705 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <0,0,u,u,u,u,3,0,5,0,4,0,u,u,u,u>
1706 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1707 ; AVX512F-32-NEXT: retl
1708 %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>
1709 ret <8 x i64> %shuffle
1712 define <8 x i64> @shuffle_v8i64_uuu3uu66(<8 x i64> %a, <8 x i64> %b) {
1714 ; AVX512F-LABEL: shuffle_v8i64_uuu3uu66:
1716 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = <u,u,u,3,u,u,6,6>
1717 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1718 ; AVX512F-NEXT: retq
1720 ; AVX512F-32-LABEL: shuffle_v8i64_uuu3uu66:
1721 ; AVX512F-32: # %bb.0:
1722 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = <u,u,u,u,u,u,3,0,u,u,u,u,6,0,6,0>
1723 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1724 ; AVX512F-32-NEXT: retl
1725 %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>
1726 ret <8 x i64> %shuffle
1729 define <8 x i64> @shuffle_v8i64_6caa87e5(<8 x i64> %a, <8 x i64> %b) {
1731 ; AVX512F-LABEL: shuffle_v8i64_6caa87e5:
1733 ; AVX512F-NEXT: vmovdqa64 {{.*#+}} zmm2 = [14,4,2,2,0,15,6,13]
1734 ; AVX512F-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1735 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1736 ; AVX512F-NEXT: retq
1738 ; AVX512F-32-LABEL: shuffle_v8i64_6caa87e5:
1739 ; AVX512F-32: # %bb.0:
1740 ; AVX512F-32-NEXT: vmovdqa64 {{.*#+}} zmm2 = [14,0,4,0,2,0,2,0,0,0,15,0,6,0,13,0]
1741 ; AVX512F-32-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1742 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1743 ; AVX512F-32-NEXT: retl
1744 %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>
1745 ret <8 x i64> %shuffle
1748 define <8 x double> @shuffle_v8f64_082a4c6e(<8 x double> %a, <8 x double> %b) {
1750 ; ALL-LABEL: shuffle_v8f64_082a4c6e:
1752 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1753 ; ALL-NEXT: ret{{[l|q]}}
1754 %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>
1755 ret <8 x double> %shuffle
1758 define <8 x double> @shuffle_v8f64_0z2z4z6z(<8 x double> %a, <8 x double> %b) {
1760 ; ALL-LABEL: shuffle_v8f64_0z2z4z6z:
1762 ; ALL-NEXT: vxorpd %xmm1, %xmm1, %xmm1
1763 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1764 ; ALL-NEXT: ret{{[l|q]}}
1765 %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>
1766 ret <8 x double> %shuffle
1769 define <8 x i64> @shuffle_v8i64_082a4c6e(<8 x i64> %a, <8 x i64> %b) {
1771 ; ALL-LABEL: shuffle_v8i64_082a4c6e:
1773 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1774 ; ALL-NEXT: ret{{[l|q]}}
1775 %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>
1776 ret <8 x i64> %shuffle
1779 define <8 x i64> @shuffle_v8i64_z8zazcze(<8 x i64> %a, <8 x i64> %b) {
1781 ; ALL-LABEL: shuffle_v8i64_z8zazcze:
1783 ; ALL-NEXT: vxorps %xmm0, %xmm0, %xmm0
1784 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1785 ; ALL-NEXT: ret{{[l|q]}}
1786 %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>
1787 ret <8 x i64> %shuffle
1790 define <8 x double> @shuffle_v8f64_193b5d7f(<8 x double> %a, <8 x double> %b) {
1792 ; ALL-LABEL: shuffle_v8f64_193b5d7f:
1794 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1795 ; ALL-NEXT: ret{{[l|q]}}
1796 %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>
1797 ret <8 x double> %shuffle
1800 define <8 x double> @shuffle_v8f64_z9zbzdzf(<8 x double> %a, <8 x double> %b) {
1802 ; ALL-LABEL: shuffle_v8f64_z9zbzdzf:
1804 ; ALL-NEXT: vxorpd %xmm0, %xmm0, %xmm0
1805 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0],zmm1[1],zmm0[2],zmm1[3],zmm0[4],zmm1[5],zmm0[6],zmm1[7]
1806 ; ALL-NEXT: ret{{[l|q]}}
1807 %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>
1808 ret <8 x double> %shuffle
1811 define <8 x i64> @shuffle_v8i64_193b5d7f(<8 x i64> %a, <8 x i64> %b) {
1813 ; ALL-LABEL: shuffle_v8i64_193b5d7f:
1815 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1816 ; ALL-NEXT: ret{{[l|q]}}
1817 %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>
1818 ret <8 x i64> %shuffle
1821 define <8 x i64> @shuffle_v8i64_1z3z5z7z(<8 x i64> %a, <8 x i64> %b) {
1823 ; ALL-LABEL: shuffle_v8i64_1z3z5z7z:
1825 ; ALL-NEXT: vxorps %xmm1, %xmm1, %xmm1
1826 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1827 ; ALL-NEXT: ret{{[l|q]}}
1828 %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>
1829 ret <8 x i64> %shuffle
1832 define <8 x double> @test_vshuff64x2_512(<8 x double> %x, <8 x double> %x1) nounwind {
1833 ; ALL-LABEL: test_vshuff64x2_512:
1835 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],zmm1[2,3,0,1]
1836 ; ALL-NEXT: ret{{[l|q]}}
1837 %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>
1838 ret <8 x double> %res
1841 define <8 x double> @test_vshuff64x2_512_maskz(<8 x double> %x, <8 x double> %x1, <8 x i1> %mask) nounwind {
1842 ; ALL-LABEL: test_vshuff64x2_512_maskz:
1844 ; ALL-NEXT: vpmovsxwq %xmm2, %zmm2
1845 ; ALL-NEXT: vpsllq $63, %zmm2, %zmm2
1846 ; ALL-NEXT: vptestmq %zmm2, %zmm2, %k1
1847 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],zmm1[2,3,0,1]
1848 ; ALL-NEXT: ret{{[l|q]}}
1849 %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>
1850 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> zeroinitializer
1851 ret <8 x double> %res
1854 define <8 x i64> @test_vshufi64x2_512_mask(<8 x i64> %x, <8 x i64> %x1, <8 x i1> %mask) nounwind {
1855 ; ALL-LABEL: test_vshufi64x2_512_mask:
1857 ; ALL-NEXT: vpmovsxwq %xmm2, %zmm2
1858 ; ALL-NEXT: vpsllq $63, %zmm2, %zmm2
1859 ; ALL-NEXT: vptestmq %zmm2, %zmm2, %k1
1860 ; ALL-NEXT: vshufi64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],zmm1[2,3,0,1]
1861 ; ALL-NEXT: ret{{[l|q]}}
1862 %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>
1863 %res = select <8 x i1> %mask, <8 x i64> %y, <8 x i64> %x
1867 define <8 x double> @test_vshuff64x2_512_mem(<8 x double> %x, <8 x double> *%ptr) nounwind {
1868 ; AVX512F-LABEL: test_vshuff64x2_512_mem:
1870 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],mem[2,3,0,1]
1871 ; AVX512F-NEXT: retq
1873 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem:
1874 ; AVX512F-32: # %bb.0:
1875 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1876 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],mem[2,3,0,1]
1877 ; AVX512F-32-NEXT: retl
1878 %x1 = load <8 x double>,<8 x double> *%ptr,align 1
1879 %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>
1880 ret <8 x double> %res
1883 define <8 x double> @test_vshuff64x2_512_mem_mask(<8 x double> %x, <8 x double> *%ptr, <8 x i1> %mask) nounwind {
1884 ; AVX512F-LABEL: test_vshuff64x2_512_mem_mask:
1886 ; AVX512F-NEXT: vpmovsxwq %xmm1, %zmm1
1887 ; AVX512F-NEXT: vpsllq $63, %zmm1, %zmm1
1888 ; AVX512F-NEXT: vptestmq %zmm1, %zmm1, %k1
1889 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],mem[2,3,0,1]
1890 ; AVX512F-NEXT: retq
1892 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem_mask:
1893 ; AVX512F-32: # %bb.0:
1894 ; AVX512F-32-NEXT: vpmovsxwq %xmm1, %zmm1
1895 ; AVX512F-32-NEXT: vpsllq $63, %zmm1, %zmm1
1896 ; AVX512F-32-NEXT: vptestmq %zmm1, %zmm1, %k1
1897 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1898 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],mem[2,3,0,1]
1899 ; AVX512F-32-NEXT: retl
1900 %x1 = load <8 x double>,<8 x double> *%ptr,align 1
1901 %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>
1902 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> %x
1903 ret <8 x double> %res
1906 define <8 x double> @test_vshuff64x2_512_mem_maskz(<8 x double> %x, <8 x double> *%ptr, <8 x i1> %mask) nounwind {
1907 ; AVX512F-LABEL: test_vshuff64x2_512_mem_maskz:
1909 ; AVX512F-NEXT: vpmovsxwq %xmm1, %zmm1
1910 ; AVX512F-NEXT: vpsllq $63, %zmm1, %zmm1
1911 ; AVX512F-NEXT: vptestmq %zmm1, %zmm1, %k1
1912 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],mem[2,3,0,1]
1913 ; AVX512F-NEXT: retq
1915 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem_maskz:
1916 ; AVX512F-32: # %bb.0:
1917 ; AVX512F-32-NEXT: vpmovsxwq %xmm1, %zmm1
1918 ; AVX512F-32-NEXT: vpsllq $63, %zmm1, %zmm1
1919 ; AVX512F-32-NEXT: vptestmq %zmm1, %zmm1, %k1
1920 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1921 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],mem[2,3,0,1]
1922 ; AVX512F-32-NEXT: retl
1923 %x1 = load <8 x double>,<8 x double> *%ptr,align 1
1924 %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>
1925 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> zeroinitializer
1926 ret <8 x double> %res
1929 define <8 x double> @shuffle_v8f64_23014567(<8 x double> %a0, <8 x double> %a1) {
1930 ; ALL-LABEL: shuffle_v8f64_23014567:
1932 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[2,3,0,1,4,5,6,7]
1933 ; ALL-NEXT: ret{{[l|q]}}
1934 %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>
1938 define <8 x double> @shuffle_v8f64_2301uu67(<8 x double> %a0, <8 x double> %a1) {
1939 ; ALL-LABEL: shuffle_v8f64_2301uu67:
1941 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[2,3,0,1,0,1,6,7]
1942 ; ALL-NEXT: ret{{[l|q]}}
1943 %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>
1947 define <8 x double> @shuffle_v8f64_2301uuuu(<8 x double> %a0, <8 x double> %a1) {
1948 ; ALL-LABEL: shuffle_v8f64_2301uuuu:
1950 ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm1[2,3,0,1]
1951 ; ALL-NEXT: ret{{[l|q]}}
1952 %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>
1956 define <8 x double> @shuffle_v8f64_uuu2301(<8 x double> %a0, <8 x double> %a1) {
1957 ; ALL-LABEL: shuffle_v8f64_uuu2301:
1959 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,0,1],zmm1[2,3,0,1]
1960 ; ALL-NEXT: ret{{[l|q]}}
1961 %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>
1965 define <8 x i64> @shuffle_v8i64_0zzzzzzz(<8 x i64> %a) {
1966 ; ALL-LABEL: shuffle_v8i64_0zzzzzzz:
1968 ; ALL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1969 ; ALL-NEXT: ret{{[l|q]}}
1970 %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>
1971 ret <8 x i64> %shuffle
1974 define <8 x double> @shuffle_v8f64_0zzzzzzz(<8 x double> %a) {
1975 ; ALL-LABEL: shuffle_v8f64_0zzzzzzz:
1977 ; ALL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1978 ; ALL-NEXT: ret{{[l|q]}}
1979 %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>
1980 ret <8 x double> %shuffle
1983 define <8 x i64> @shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b) {
1985 ; ALL-LABEL: shuffle_v8i64_12345678:
1987 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[1,2,3,4,5,6,7],zmm1[0]
1988 ; ALL-NEXT: ret{{[l|q]}}
1989 %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>
1990 ret <8 x i64> %shuffle
1993 define <8 x i64> @shuffle_v8i64_12345670(<8 x i64> %a) {
1995 ; ALL-LABEL: shuffle_v8i64_12345670:
1997 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[1,2,3,4,5,6,7,0]
1998 ; ALL-NEXT: ret{{[l|q]}}
1999 %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>
2000 ret <8 x i64> %shuffle
2003 define <8 x i64> @mask_shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b, <8 x i64> %passthru, i8 %mask) {
2005 ; AVX512F-LABEL: mask_shuffle_v8i64_12345678:
2007 ; AVX512F-NEXT: kmovw %edi, %k1
2008 ; AVX512F-NEXT: valignq {{.*#+}} zmm2 {%k1} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2009 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
2010 ; AVX512F-NEXT: retq
2012 ; AVX512F-32-LABEL: mask_shuffle_v8i64_12345678:
2013 ; AVX512F-32: # %bb.0:
2014 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2015 ; AVX512F-32-NEXT: kmovw %eax, %k1
2016 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm2 {%k1} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2017 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
2018 ; AVX512F-32-NEXT: retl
2019 %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>
2020 %mask.cast = bitcast i8 %mask to <8 x i1>
2021 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> %passthru
2025 define <8 x i64> @mask_shuffle_v8i64_12345670(<8 x i64> %a, <8 x i64> %passthru, i8 %mask) {
2027 ; AVX512F-LABEL: mask_shuffle_v8i64_12345670:
2029 ; AVX512F-NEXT: kmovw %edi, %k1
2030 ; AVX512F-NEXT: valignq {{.*#+}} zmm1 {%k1} = zmm0[1,2,3,4,5,6,7,0]
2031 ; AVX512F-NEXT: vmovdqa64 %zmm1, %zmm0
2032 ; AVX512F-NEXT: retq
2034 ; AVX512F-32-LABEL: mask_shuffle_v8i64_12345670:
2035 ; AVX512F-32: # %bb.0:
2036 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2037 ; AVX512F-32-NEXT: kmovw %eax, %k1
2038 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm1 {%k1} = zmm0[1,2,3,4,5,6,7,0]
2039 ; AVX512F-32-NEXT: vmovdqa64 %zmm1, %zmm0
2040 ; AVX512F-32-NEXT: retl
2041 %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>
2042 %mask.cast = bitcast i8 %mask to <8 x i1>
2043 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> %passthru
2047 define <8 x i64> @maskz_shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b, i8 %mask) {
2049 ; AVX512F-LABEL: maskz_shuffle_v8i64_12345678:
2051 ; AVX512F-NEXT: kmovw %edi, %k1
2052 ; AVX512F-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2053 ; AVX512F-NEXT: retq
2055 ; AVX512F-32-LABEL: maskz_shuffle_v8i64_12345678:
2056 ; AVX512F-32: # %bb.0:
2057 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2058 ; AVX512F-32-NEXT: kmovw %eax, %k1
2059 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7],zmm1[0]
2060 ; AVX512F-32-NEXT: retl
2061 %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>
2062 %mask.cast = bitcast i8 %mask to <8 x i1>
2063 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> zeroinitializer
2067 define <8 x i64> @maskz_shuffle_v8i64_12345670(<8 x i64> %a, i8 %mask) {
2069 ; AVX512F-LABEL: maskz_shuffle_v8i64_12345670:
2071 ; AVX512F-NEXT: kmovw %edi, %k1
2072 ; AVX512F-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7,0]
2073 ; AVX512F-NEXT: retq
2075 ; AVX512F-32-LABEL: maskz_shuffle_v8i64_12345670:
2076 ; AVX512F-32: # %bb.0:
2077 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
2078 ; AVX512F-32-NEXT: kmovw %eax, %k1
2079 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7,0]
2080 ; AVX512F-32-NEXT: retl
2081 %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>
2082 %mask.cast = bitcast i8 %mask to <8 x i1>
2083 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> zeroinitializer
2087 define <8 x double> @shuffle_v8f64_012389AB(<8 x double> %a, <8 x double> %b) {
2088 ; ALL-LABEL: shuffle_v8f64_012389AB:
2090 ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
2091 ; ALL-NEXT: ret{{[l|q]}}
2092 %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>
2093 ret <8 x double> %shuffle
2096 define <8 x double> @shuffle_v8f64_89AB0123(<8 x double> %a, <8 x double> %b) {
2097 ; ALL-LABEL: shuffle_v8f64_89AB0123:
2099 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
2100 ; ALL-NEXT: ret{{[l|q]}}
2101 %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>
2102 ret <8 x double> %shuffle
2105 define <8 x double> @shuffle_v8f64_01230123(<8 x double> %a, <8 x double> %b) {
2106 ; ALL-LABEL: shuffle_v8f64_01230123:
2108 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2109 ; ALL-NEXT: ret{{[l|q]}}
2110 %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>
2111 ret <8 x double> %shuffle
2114 define <8 x i64> @shuffle_v8i64_012389AB(<8 x i64> %a, <8 x i64> %b) {
2115 ; ALL-LABEL: shuffle_v8i64_012389AB:
2117 ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
2118 ; ALL-NEXT: ret{{[l|q]}}
2119 %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>
2120 ret <8 x i64> %shuffle
2123 define <8 x i64> @shuffle_v8i64_89AB0123(<8 x i64> %a, <8 x i64> %b) {
2124 ; ALL-LABEL: shuffle_v8i64_89AB0123:
2126 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
2127 ; ALL-NEXT: ret{{[l|q]}}
2128 %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>
2129 ret <8 x i64> %shuffle
2132 define <8 x i64> @shuffle_v8i64_01230123(<8 x i64> %a, <8 x i64> %b) {
2133 ; ALL-LABEL: shuffle_v8i64_01230123:
2135 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2136 ; ALL-NEXT: ret{{[l|q]}}
2137 %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>
2138 ret <8 x i64> %shuffle
2141 define <8 x double> @shuffle_v8f64_89234567(<8 x double> %a, <8 x double> %b) {
2142 ; ALL-LABEL: shuffle_v8f64_89234567:
2144 ; ALL-NEXT: vinsertf32x4 $0, %xmm1, %zmm0, %zmm0
2145 ; ALL-NEXT: ret{{[l|q]}}
2146 %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>
2147 ret <8 x double> %shuffle
2150 define <8 x double> @shuffle_v8f64_01894567(<8 x double> %a, <8 x double> %b) {
2151 ; ALL-LABEL: shuffle_v8f64_01894567:
2153 ; ALL-NEXT: vinsertf32x4 $1, %xmm1, %zmm0, %zmm0
2154 ; ALL-NEXT: ret{{[l|q]}}
2155 %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>
2156 ret <8 x double> %shuffle
2159 define <8 x double> @shuffle_v8f64_01238967(<8 x double> %a, <8 x double> %b) {
2160 ; ALL-LABEL: shuffle_v8f64_01238967:
2162 ; ALL-NEXT: vinsertf32x4 $2, %xmm1, %zmm0, %zmm0
2163 ; ALL-NEXT: ret{{[l|q]}}
2164 %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>
2165 ret <8 x double> %shuffle
2168 define <8 x double> @shuffle_v8f64_01234589(<8 x double> %a, <8 x double> %b) {
2169 ; ALL-LABEL: shuffle_v8f64_01234589:
2171 ; ALL-NEXT: vinsertf32x4 $3, %xmm1, %zmm0, %zmm0
2172 ; ALL-NEXT: ret{{[l|q]}}
2173 %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>
2174 ret <8 x double> %shuffle
2177 define <8 x i64> @shuffle_v8i64_89234567(<8 x i64> %a, <8 x i64> %b) {
2178 ; ALL-LABEL: shuffle_v8i64_89234567:
2180 ; ALL-NEXT: vinsertf32x4 $0, %xmm1, %zmm0, %zmm0
2181 ; ALL-NEXT: ret{{[l|q]}}
2182 %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>
2183 ret <8 x i64> %shuffle
2186 define <8 x i64> @shuffle_v8i64_01894567(<8 x i64> %a, <8 x i64> %b) {
2187 ; ALL-LABEL: shuffle_v8i64_01894567:
2189 ; ALL-NEXT: vinsertf32x4 $1, %xmm1, %zmm0, %zmm0
2190 ; ALL-NEXT: ret{{[l|q]}}
2191 %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>
2192 ret <8 x i64> %shuffle
2195 define <8 x i64> @shuffle_v8i64_01238967(<8 x i64> %a, <8 x i64> %b) {
2196 ; ALL-LABEL: shuffle_v8i64_01238967:
2198 ; ALL-NEXT: vinsertf32x4 $2, %xmm1, %zmm0, %zmm0
2199 ; ALL-NEXT: ret{{[l|q]}}
2200 %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>
2201 ret <8 x i64> %shuffle
2204 define <8 x i64> @shuffle_v8i64_01234589(<8 x i64> %a, <8 x i64> %b) {
2205 ; ALL-LABEL: shuffle_v8i64_01234589:
2207 ; ALL-NEXT: vinsertf32x4 $3, %xmm1, %zmm0, %zmm0
2208 ; ALL-NEXT: ret{{[l|q]}}
2209 %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>
2210 ret <8 x i64> %shuffle
2213 define <8 x double> @shuffle_v4f64_v8f64_22222222(<4 x double> %a) {
2214 ; ALL-LABEL: shuffle_v4f64_v8f64_22222222:
2216 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2217 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
2218 ; ALL-NEXT: ret{{[l|q]}}
2219 %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>
2220 ret <8 x double> %shuffle
2223 define <8 x i64> @shuffle_v2i64_v8i64_01010101(<2 x i64> %a) {
2224 ; ALL-LABEL: shuffle_v2i64_v8i64_01010101:
2226 ; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2227 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
2228 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2229 ; ALL-NEXT: ret{{[l|q]}}
2230 %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>
2231 ret <8 x i64> %shuffle
2234 define <8 x double> @shuffle_v2f64_v8f64_01010101(<2 x double> %a) {
2235 ; ALL-LABEL: shuffle_v2f64_v8f64_01010101:
2237 ; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $ymm0
2238 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
2239 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
2240 ; ALL-NEXT: ret{{[l|q]}}
2241 %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>
2242 ret <8 x double> %shuffle
2246 define <4 x double> @test_v8f64_2346 (<8 x double> %v) {
2247 ; AVX512F-LABEL: test_v8f64_2346:
2249 ; AVX512F-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [2,3,4,6,2,3,4,6]
2250 ; AVX512F-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2251 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
2252 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2253 ; AVX512F-NEXT: retq
2255 ; AVX512F-32-LABEL: test_v8f64_2346:
2256 ; AVX512F-32: # %bb.0:
2257 ; AVX512F-32-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [2,0,3,0,4,0,6,0,2,0,3,0,4,0,6,0]
2258 ; AVX512F-32-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2259 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
2260 ; AVX512F-32-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2261 ; AVX512F-32-NEXT: retl
2262 %res = shufflevector <8 x double> %v, <8 x double> undef, <4 x i32> <i32 2, i32 3, i32 4, i32 6>
2263 ret <4 x double> %res
2267 define <2 x double> @test_v8f64_34 (<8 x double> %v) {
2268 ; ALL-LABEL: test_v8f64_34:
2270 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm1
2271 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2272 ; ALL-NEXT: vshufpd {{.*#+}} xmm0 = xmm0[1],xmm1[0]
2273 ; ALL-NEXT: vzeroupper
2274 ; ALL-NEXT: ret{{[l|q]}}
2275 %res = shufflevector <8 x double> %v, <8 x double> undef, <2 x i32> <i32 3, i32 4>
2276 ret <2 x double> %res
2280 define <4 x i64> @test_v8i64_1257 (<8 x i64> %v) {
2281 ; AVX512F-LABEL: test_v8i64_1257:
2283 ; AVX512F-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [1,2,5,7,1,2,5,7]
2284 ; AVX512F-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2285 ; AVX512F-NEXT: vpermq %zmm0, %zmm1, %zmm0
2286 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2287 ; AVX512F-NEXT: retq
2289 ; AVX512F-32-LABEL: test_v8i64_1257:
2290 ; AVX512F-32: # %bb.0:
2291 ; AVX512F-32-NEXT: vbroadcasti64x4 {{.*#+}} zmm1 = [1,0,2,0,5,0,7,0,1,0,2,0,5,0,7,0]
2292 ; AVX512F-32-NEXT: # zmm1 = mem[0,1,2,3,0,1,2,3]
2293 ; AVX512F-32-NEXT: vpermq %zmm0, %zmm1, %zmm0
2294 ; AVX512F-32-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2295 ; AVX512F-32-NEXT: retl
2296 %res = shufflevector <8 x i64> %v, <8 x i64> undef, <4 x i32> <i32 1, i32 2, i32 5, i32 7>
2300 define <2 x i64> @test_v8i64_2_5 (<8 x i64> %v) {
2301 ; ALL-LABEL: test_v8i64_2_5:
2303 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm1
2304 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2305 ; ALL-NEXT: vblendps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3]
2306 ; ALL-NEXT: vzeroupper
2307 ; ALL-NEXT: ret{{[l|q]}}
2308 %res = shufflevector <8 x i64> %v, <8 x i64> undef, <2 x i32> <i32 2, i32 5>
2312 define <8 x i64> @test_v8i64_insert_zero_128(<8 x i64> %a) {
2313 ; ALL-LABEL: test_v8i64_insert_zero_128:
2315 ; ALL-NEXT: movb $3, %al
2316 ; ALL-NEXT: kmovw %eax, %k1
2317 ; ALL-NEXT: vpexpandq %zmm0, %zmm0 {%k1} {z}
2318 ; ALL-NEXT: ret{{[l|q]}}
2319 %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>
2323 define <8 x i64> @test_v8i64_insert_zero_256(<8 x i64> %a) {
2324 ; ALL-LABEL: test_v8i64_insert_zero_256:
2326 ; ALL-NEXT: vmovaps %ymm0, %ymm0
2327 ; ALL-NEXT: ret{{[l|q]}}
2328 %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>