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 {{.*#+}} ymm1 = [0,0,0,4]
98 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
101 ; AVX512F-32-LABEL: shuffle_v8f64_00040000:
102 ; AVX512F-32: # %bb.0:
103 ; AVX512F-32-NEXT: vmovaps {{.*#+}} ymm1 = [0,0,0,0,0,0,4,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 {{.*#+}} ymm1 = [0,0,5,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 {{.*#+}} ymm1 = [0,0,0,0,5,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 {{.*#+}} xmm1 = [0,0,0,0,0,0,0,0,6,0,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 {{.*#+}} xmm1 = [0,0,6,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 ; ALL-LABEL: shuffle_v8f64_70000000:
145 ; ALL-NEXT: vmovss {{.*#+}} xmm1 = [7,0,0,0]
146 ; ALL-NEXT: vpermpd %zmm0, %zmm1, %zmm0
147 ; ALL-NEXT: ret{{[l|q]}}
148 %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>
149 ret <8 x double> %shuffle
152 define <8 x double> @shuffle_v8f64_01014545(<8 x double> %a, <8 x double> %b) {
153 ; ALL-LABEL: shuffle_v8f64_01014545:
155 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5]
156 ; ALL-NEXT: ret{{[l|q]}}
157 %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>
158 ret <8 x double> %shuffle
161 define <8 x double> @shuffle_v8f64_00112233(<8 x double> %a, <8 x double> %b) {
162 ; AVX512F-LABEL: shuffle_v8f64_00112233:
164 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,1,2,2,3,3]
165 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
168 ; AVX512F-32-LABEL: shuffle_v8f64_00112233:
169 ; AVX512F-32: # %bb.0:
170 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0]
171 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
172 ; AVX512F-32-NEXT: retl
173 %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>
174 ret <8 x double> %shuffle
177 define <8 x double> @shuffle_v8f64_00001111(<8 x double> %a, <8 x double> %b) {
178 ; AVX512F-LABEL: shuffle_v8f64_00001111:
180 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,1,1,1]
181 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
184 ; AVX512F-32-LABEL: shuffle_v8f64_00001111:
185 ; AVX512F-32: # %bb.0:
186 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0]
187 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
188 ; AVX512F-32-NEXT: retl
189 %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>
190 ret <8 x double> %shuffle
193 define <8 x double> @shuffle_v8f64_81a3c5e7(<8 x double> %a, <8 x double> %b) {
194 ; ALL-LABEL: shuffle_v8f64_81a3c5e7:
196 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm1[0],zmm0[1],zmm1[2],zmm0[3],zmm1[4],zmm0[5],zmm1[6],zmm0[7]
197 ; ALL-NEXT: ret{{[l|q]}}
198 %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>
199 ret <8 x double> %shuffle
202 define <8 x double> @shuffle_v8f64_08080808(<8 x double> %a, <8 x double> %b) {
203 ; AVX512F-LABEL: shuffle_v8f64_08080808:
205 ; AVX512F-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,8,0,8,0,8,0,8]
206 ; AVX512F-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
207 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
210 ; AVX512F-32-LABEL: shuffle_v8f64_08080808:
211 ; AVX512F-32: # %bb.0:
212 ; AVX512F-32-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,0,0,8,0,0,0,8,0]
213 ; AVX512F-32-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
214 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
215 ; AVX512F-32-NEXT: retl
216 %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>
217 ret <8 x double> %shuffle
220 define <8 x double> @shuffle_v8f64_08084c4c(<8 x double> %a, <8 x double> %b) {
221 ; AVX512F-LABEL: shuffle_v8f64_08084c4c:
223 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,8,0,8,4,12,4,12]
224 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
227 ; AVX512F-32-LABEL: shuffle_v8f64_08084c4c:
228 ; AVX512F-32: # %bb.0:
229 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,4,0,12,0,4,0,12,0]
230 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
231 ; AVX512F-32-NEXT: retl
232 %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>
233 ret <8 x double> %shuffle
236 define <8 x double> @shuffle_v8f64_8823cc67(<8 x double> %a, <8 x double> %b) {
237 ; AVX512F-LABEL: shuffle_v8f64_8823cc67:
239 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,10,11,4,4,14,15]
240 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
241 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
244 ; AVX512F-32-LABEL: shuffle_v8f64_8823cc67:
245 ; AVX512F-32: # %bb.0:
246 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,0,0,10,0,11,0,4,0,4,0,14,0,15,0]
247 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
248 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
249 ; AVX512F-32-NEXT: retl
250 %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>
251 ret <8 x double> %shuffle
254 define <8 x double> @shuffle_v8f64_9832dc76(<8 x double> %a, <8 x double> %b) {
255 ; AVX512F-LABEL: shuffle_v8f64_9832dc76:
257 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,11,10,5,4,15,14]
258 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
259 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
262 ; AVX512F-32-LABEL: shuffle_v8f64_9832dc76:
263 ; AVX512F-32: # %bb.0:
264 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,0,0,11,0,10,0,5,0,4,0,15,0,14,0]
265 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
266 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
267 ; AVX512F-32-NEXT: retl
268 %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>
269 ret <8 x double> %shuffle
272 define <8 x double> @shuffle_v8f64_9810dc54(<8 x double> %a, <8 x double> %b) {
273 ; AVX512F-LABEL: shuffle_v8f64_9810dc54:
275 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,9,8,5,4,13,12]
276 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
277 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
280 ; AVX512F-32-LABEL: shuffle_v8f64_9810dc54:
281 ; AVX512F-32: # %bb.0:
282 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [1,0,0,0,9,0,8,0,5,0,4,0,13,0,12,0]
283 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
284 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
285 ; AVX512F-32-NEXT: retl
286 %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>
287 ret <8 x double> %shuffle
290 define <8 x double> @shuffle_v8f64_08194c5d(<8 x double> %a, <8 x double> %b) {
291 ; AVX512F-LABEL: shuffle_v8f64_08194c5d:
293 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,8,1,9,4,12,5,13]
294 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
297 ; AVX512F-32-LABEL: shuffle_v8f64_08194c5d:
298 ; AVX512F-32: # %bb.0:
299 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,4,0,12,0,5,0,13,0]
300 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
301 ; AVX512F-32-NEXT: retl
302 %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>
303 ret <8 x double> %shuffle
306 define <8 x double> @shuffle_v8f64_2a3b6e7f(<8 x double> %a, <8 x double> %b) {
307 ; AVX512F-LABEL: shuffle_v8f64_2a3b6e7f:
309 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [2,10,3,11,6,14,7,15]
310 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
313 ; AVX512F-32-LABEL: shuffle_v8f64_2a3b6e7f:
314 ; AVX512F-32: # %bb.0:
315 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [2,0,10,0,3,0,11,0,6,0,14,0,7,0,15,0]
316 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
317 ; AVX512F-32-NEXT: retl
318 %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>
319 ret <8 x double> %shuffle
322 define <8 x double> @shuffle_v8f64_08192a3b(<8 x double> %a, <8 x double> %b) {
323 ; AVX512F-LABEL: shuffle_v8f64_08192a3b:
325 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,8,1,9,2,10,3,11]
326 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
329 ; AVX512F-32-LABEL: shuffle_v8f64_08192a3b:
330 ; AVX512F-32: # %bb.0:
331 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,8,0,1,0,9,0,2,0,10,0,3,0,11,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 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
335 ret <8 x double> %shuffle
338 define <8 x double> @shuffle_v8f64_08991abb(<8 x double> %a, <8 x double> %b) {
339 ; AVX512F-LABEL: shuffle_v8f64_08991abb:
341 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [8,0,1,1,9,2,3,3]
342 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
343 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
346 ; AVX512F-32-LABEL: shuffle_v8f64_08991abb:
347 ; AVX512F-32: # %bb.0:
348 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [8,0,0,0,1,0,1,0,9,0,2,0,3,0,3,0]
349 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
350 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
351 ; AVX512F-32-NEXT: retl
352 %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>
353 ret <8 x double> %shuffle
356 define <8 x double> @shuffle_v8f64_091b2d3f(<8 x double> %a, <8 x double> %b) {
357 ; AVX512F-LABEL: shuffle_v8f64_091b2d3f:
359 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [0,9,1,11,2,13,3,15]
360 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
363 ; AVX512F-32-LABEL: shuffle_v8f64_091b2d3f:
364 ; AVX512F-32: # %bb.0:
365 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [0,0,9,0,1,0,11,0,2,0,13,0,3,0,15,0]
366 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
367 ; AVX512F-32-NEXT: retl
368 %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>
369 ret <8 x double> %shuffle
372 define <8 x double> @shuffle_v8f64_09ab1def(<8 x double> %a, <8 x double> %b) {
373 ; AVX512F-LABEL: shuffle_v8f64_09ab1def:
375 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [8,1,2,3,9,5,6,7]
376 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
377 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
380 ; AVX512F-32-LABEL: shuffle_v8f64_09ab1def:
381 ; AVX512F-32: # %bb.0:
382 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [8,0,1,0,2,0,3,0,9,0,5,0,6,0,7,0]
383 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
384 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
385 ; AVX512F-32-NEXT: retl
386 %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>
387 ret <8 x double> %shuffle
390 define <8 x double> @shuffle_v8f64_00014445(<8 x double> %a, <8 x double> %b) {
391 ; ALL-LABEL: shuffle_v8f64_00014445:
393 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,0,1,4,4,4,5]
394 ; ALL-NEXT: ret{{[l|q]}}
395 %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>
396 ret <8 x double> %shuffle
399 define <8 x double> @shuffle_v8f64_00204464(<8 x double> %a, <8 x double> %b) {
400 ; ALL-LABEL: shuffle_v8f64_00204464:
402 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,0,4,4,6,4]
403 ; ALL-NEXT: ret{{[l|q]}}
404 %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>
405 ret <8 x double> %shuffle
408 define <8 x double> @shuffle_v8f64_03004744(<8 x double> %a, <8 x double> %b) {
409 ; ALL-LABEL: shuffle_v8f64_03004744:
411 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,3,0,0,4,7,4,4]
412 ; ALL-NEXT: ret{{[l|q]}}
413 %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>
414 ret <8 x double> %shuffle
417 define <8 x double> @shuffle_v8f64_10005444(<8 x double> %a, <8 x double> %b) {
418 ; ALL-LABEL: shuffle_v8f64_10005444:
420 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,0,0,5,4,4,4]
421 ; ALL-NEXT: ret{{[l|q]}}
422 %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>
423 ret <8 x double> %shuffle
426 define <8 x double> @shuffle_v8f64_22006644(<8 x double> %a, <8 x double> %b) {
427 ; ALL-LABEL: shuffle_v8f64_22006644:
429 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[2,2,0,0,6,6,4,4]
430 ; ALL-NEXT: ret{{[l|q]}}
431 %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>
432 ret <8 x double> %shuffle
435 define <8 x double> @shuffle_v8f64_33307774(<8 x double> %a, <8 x double> %b) {
436 ; ALL-LABEL: shuffle_v8f64_33307774:
438 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,3,3,0,7,7,7,4]
439 ; ALL-NEXT: ret{{[l|q]}}
440 %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>
441 ret <8 x double> %shuffle
444 define <8 x double> @shuffle_v8f64_32107654(<8 x double> %a, <8 x double> %b) {
445 ; ALL-LABEL: shuffle_v8f64_32107654:
447 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,2,1,0,7,6,5,4]
448 ; ALL-NEXT: ret{{[l|q]}}
449 %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>
450 ret <8 x double> %shuffle
453 define <8 x double> @shuffle_v8f64_00234467(<8 x double> %a, <8 x double> %b) {
454 ; ALL-LABEL: shuffle_v8f64_00234467:
456 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,7]
457 ; ALL-NEXT: ret{{[l|q]}}
458 %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>
459 ret <8 x double> %shuffle
462 define <8 x double> @shuffle_v8f64_00224466(<8 x double> %a, <8 x double> %b) {
463 ; ALL-LABEL: shuffle_v8f64_00224466:
465 ; ALL-NEXT: vmovddup {{.*#+}} zmm0 = zmm0[0,0,2,2,4,4,6,6]
466 ; ALL-NEXT: ret{{[l|q]}}
467 %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>
468 ret <8 x double> %shuffle
471 define <8 x double> @shuffle_v8f64_10325476(<8 x double> %a, <8 x double> %b) {
472 ; ALL-LABEL: shuffle_v8f64_10325476:
474 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,0,3,2,5,4,7,6]
475 ; ALL-NEXT: ret{{[l|q]}}
476 %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>
477 ret <8 x double> %shuffle
480 define <8 x double> @shuffle_v8f64_11335577(<8 x double> %a, <8 x double> %b) {
481 ; ALL-LABEL: shuffle_v8f64_11335577:
483 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,1,3,3,5,5,7,7]
484 ; ALL-NEXT: ret{{[l|q]}}
485 %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>
486 ret <8 x double> %shuffle
489 define <8 x double> @shuffle_v8f64_10235467(<8 x double> %a, <8 x double> %b) {
490 ; ALL-LABEL: shuffle_v8f64_10235467:
492 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,0,2,3,5,4,6,7]
493 ; ALL-NEXT: ret{{[l|q]}}
494 %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>
495 ret <8 x double> %shuffle
498 define <8 x double> @shuffle_v8f64_10225466(<8 x double> %a, <8 x double> %b) {
499 ; ALL-LABEL: shuffle_v8f64_10225466:
501 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,0,2,2,5,4,6,6]
502 ; ALL-NEXT: ret{{[l|q]}}
503 %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>
504 ret <8 x double> %shuffle
507 define <8 x double> @shuffle_v8f64_00015444(<8 x double> %a, <8 x double> %b) {
508 ; AVX512F-LABEL: shuffle_v8f64_00015444:
510 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,1,5,4,4,4]
511 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
514 ; AVX512F-32-LABEL: shuffle_v8f64_00015444:
515 ; AVX512F-32: # %bb.0:
516 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0,5,0,4,0,4,0,4,0]
517 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
518 ; AVX512F-32-NEXT: retl
519 %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>
520 ret <8 x double> %shuffle
523 define <8 x double> @shuffle_v8f64_00204644(<8 x double> %a, <8 x double> %b) {
524 ; AVX512F-LABEL: shuffle_v8f64_00204644:
526 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,0,4,6,4,4]
527 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
530 ; AVX512F-32-LABEL: shuffle_v8f64_00204644:
531 ; AVX512F-32: # %bb.0:
532 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,0,0,4,0,6,0,4,0,4,0]
533 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
534 ; AVX512F-32-NEXT: retl
535 %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>
536 ret <8 x double> %shuffle
539 define <8 x double> @shuffle_v8f64_03004474(<8 x double> %a, <8 x double> %b) {
540 ; AVX512F-LABEL: shuffle_v8f64_03004474:
542 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,3,0,0,4,4,7,4]
543 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
546 ; AVX512F-32-LABEL: shuffle_v8f64_03004474:
547 ; AVX512F-32: # %bb.0:
548 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,3,0,0,0,0,0,4,0,4,0,7,0,4,0]
549 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
550 ; AVX512F-32-NEXT: retl
551 %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>
552 ret <8 x double> %shuffle
555 define <8 x double> @shuffle_v8f64_10004444(<8 x double> %a, <8 x double> %b) {
556 ; AVX512F-LABEL: shuffle_v8f64_10004444:
558 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,4,4,4,4]
559 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
562 ; AVX512F-32-LABEL: shuffle_v8f64_10004444:
563 ; AVX512F-32: # %bb.0:
564 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,0,0,0,0,4,0,4,0,4,0,4,0]
565 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
566 ; AVX512F-32-NEXT: retl
567 %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>
568 ret <8 x double> %shuffle
571 define <8 x double> @shuffle_v8f64_22006446(<8 x double> %a, <8 x double> %b) {
572 ; AVX512F-LABEL: shuffle_v8f64_22006446:
574 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [2,2,0,0,6,4,4,6]
575 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
578 ; AVX512F-32-LABEL: shuffle_v8f64_22006446:
579 ; AVX512F-32: # %bb.0:
580 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [2,0,2,0,0,0,0,0,6,0,4,0,4,0,6,0]
581 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
582 ; AVX512F-32-NEXT: retl
583 %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>
584 ret <8 x double> %shuffle
587 define <8 x double> @shuffle_v8f64_33307474(<8 x double> %a, <8 x double> %b) {
588 ; AVX512F-LABEL: shuffle_v8f64_33307474:
590 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,3,3,0,7,4,7,4]
591 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
594 ; AVX512F-32-LABEL: shuffle_v8f64_33307474:
595 ; AVX512F-32: # %bb.0:
596 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,3,0,3,0,0,0,7,0,4,0,7,0,4,0]
597 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
598 ; AVX512F-32-NEXT: retl
599 %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>
600 ret <8 x double> %shuffle
603 define <8 x double> @shuffle_v8f64_32104567(<8 x double> %a, <8 x double> %b) {
604 ; AVX512F-LABEL: shuffle_v8f64_32104567:
606 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,2,1,0,4,5,6,7]
607 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
610 ; AVX512F-32-LABEL: shuffle_v8f64_32104567:
611 ; AVX512F-32: # %bb.0:
612 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,2,0,1,0,0,0,4,0,5,0,6,0,7,0]
613 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
614 ; AVX512F-32-NEXT: retl
615 %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>
616 ret <8 x double> %shuffle
619 define <8 x double> @shuffle_v8f64_00236744(<8 x double> %a, <8 x double> %b) {
620 ; AVX512F-LABEL: shuffle_v8f64_00236744:
622 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,3,6,7,4,4]
623 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
626 ; AVX512F-32-LABEL: shuffle_v8f64_00236744:
627 ; AVX512F-32: # %bb.0:
628 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,3,0,6,0,7,0,4,0,4,0]
629 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
630 ; AVX512F-32-NEXT: retl
631 %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>
632 ret <8 x double> %shuffle
635 define <8 x double> @shuffle_v8f64_00226644(<8 x double> %a, <8 x double> %b) {
636 ; AVX512F-LABEL: shuffle_v8f64_00226644:
638 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,2,6,6,4,4]
639 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
642 ; AVX512F-32-LABEL: shuffle_v8f64_00226644:
643 ; AVX512F-32: # %bb.0:
644 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,2,0,6,0,6,0,4,0,4,0]
645 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
646 ; AVX512F-32-NEXT: retl
647 %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>
648 ret <8 x double> %shuffle
651 define <8 x double> @shuffle_v8f64_10324567(<8 x double> %a, <8 x double> %b) {
652 ; ALL-LABEL: shuffle_v8f64_10324567:
654 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,0,3,2,4,5,6,7]
655 ; ALL-NEXT: ret{{[l|q]}}
656 %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>
657 ret <8 x double> %shuffle
660 define <8 x double> @shuffle_v8f64_11334567(<8 x double> %a, <8 x double> %b) {
661 ; ALL-LABEL: shuffle_v8f64_11334567:
663 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,1,3,3,4,5,6,7]
664 ; ALL-NEXT: ret{{[l|q]}}
665 %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>
666 ret <8 x double> %shuffle
669 define <8 x double> @shuffle_v8f64_01235467(<8 x double> %a, <8 x double> %b) {
670 ; ALL-LABEL: shuffle_v8f64_01235467:
672 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0,1,2,3,5,4,6,7]
673 ; ALL-NEXT: ret{{[l|q]}}
674 %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>
675 ret <8 x double> %shuffle
678 define <8 x double> @shuffle_v8f64_01235466(<8 x double> %a, <8 x double> %b) {
679 ; ALL-LABEL: shuffle_v8f64_01235466:
681 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0,1,2,3,5,4,6,6]
682 ; ALL-NEXT: ret{{[l|q]}}
683 %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>
684 ret <8 x double> %shuffle
687 define <8 x double> @shuffle_v8f64_002u6u44(<8 x double> %a, <8 x double> %b) {
688 ; AVX512F-LABEL: shuffle_v8f64_002u6u44:
690 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,u,6,u,4,4]
691 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
694 ; AVX512F-32-LABEL: shuffle_v8f64_002u6u44:
695 ; AVX512F-32: # %bb.0:
696 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,u,u,6,0,u,u,4,0,4,0]
697 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
698 ; AVX512F-32-NEXT: retl
699 %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>
700 ret <8 x double> %shuffle
703 define <8 x double> @shuffle_v8f64_00uu66uu(<8 x double> %a, <8 x double> %b) {
704 ; AVX512F-LABEL: shuffle_v8f64_00uu66uu:
706 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,u,u,6,6,u,u]
707 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
710 ; AVX512F-32-LABEL: shuffle_v8f64_00uu66uu:
711 ; AVX512F-32: # %bb.0:
712 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,u,u,u,u,6,0,6,0,u,u,u,u]
713 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
714 ; AVX512F-32-NEXT: retl
715 %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>
716 ret <8 x double> %shuffle
719 define <8 x double> @shuffle_v8f64_103245uu(<8 x double> %a, <8 x double> %b) {
720 ; ALL-LABEL: shuffle_v8f64_103245uu:
722 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,0,3,2,4,5,6,6]
723 ; ALL-NEXT: ret{{[l|q]}}
724 %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>
725 ret <8 x double> %shuffle
728 define <8 x double> @shuffle_v8f64_1133uu67(<8 x double> %a, <8 x double> %b) {
729 ; ALL-LABEL: shuffle_v8f64_1133uu67:
731 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1,1,3,3,4,4,6,7]
732 ; ALL-NEXT: ret{{[l|q]}}
733 %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>
734 ret <8 x double> %shuffle
737 define <8 x double> @shuffle_v8f64_0uu354uu(<8 x double> %a, <8 x double> %b) {
738 ; ALL-LABEL: shuffle_v8f64_0uu354uu:
740 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0,0,2,3,5,4,6,6]
741 ; ALL-NEXT: ret{{[l|q]}}
742 %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>
743 ret <8 x double> %shuffle
746 define <8 x double> @shuffle_v8f64_uuu3uu66(<8 x double> %a, <8 x double> %b) {
747 ; ALL-LABEL: shuffle_v8f64_uuu3uu66:
749 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,6]
750 ; ALL-NEXT: ret{{[l|q]}}
751 %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>
752 ret <8 x double> %shuffle
755 define <8 x double> @shuffle_v8f64_c348cda0(<8 x double> %a, <8 x double> %b) {
756 ; AVX512F-LABEL: shuffle_v8f64_c348cda0:
758 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [4,11,12,0,4,5,2,8]
759 ; AVX512F-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
760 ; AVX512F-NEXT: vmovapd %zmm2, %zmm0
763 ; AVX512F-32-LABEL: shuffle_v8f64_c348cda0:
764 ; AVX512F-32: # %bb.0:
765 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [4,0,11,0,12,0,0,0,4,0,5,0,2,0,8,0]
766 ; AVX512F-32-NEXT: vpermi2pd %zmm0, %zmm1, %zmm2
767 ; AVX512F-32-NEXT: vmovapd %zmm2, %zmm0
768 ; AVX512F-32-NEXT: retl
769 %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>
770 ret <8 x double> %shuffle
773 define <8 x double> @shuffle_v8f64_f511235a(<8 x double> %a, <8 x double> %b) {
774 ; AVX512F-LABEL: shuffle_v8f64_f511235a:
776 ; AVX512F-NEXT: vmovapd {{.*#+}} zmm2 = [15,5,1,1,2,3,5,10]
777 ; AVX512F-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
780 ; AVX512F-32-LABEL: shuffle_v8f64_f511235a:
781 ; AVX512F-32: # %bb.0:
782 ; AVX512F-32-NEXT: vmovapd {{.*#+}} zmm2 = [15,0,5,0,1,0,1,0,2,0,3,0,5,0,10,0]
783 ; AVX512F-32-NEXT: vpermt2pd %zmm1, %zmm2, %zmm0
784 ; AVX512F-32-NEXT: retl
785 %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>
786 ret <8 x double> %shuffle
789 define <8 x double> @shuffle_v8f64_1z2z5z6z(<8 x double> %a, <8 x double> %b) {
790 ; ALL-LABEL: shuffle_v8f64_1z2z5z6z:
792 ; ALL-NEXT: vxorpd %xmm1, %xmm1, %xmm1
793 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[1],zmm1[0],zmm0[2],zmm1[2],zmm0[5],zmm1[4],zmm0[6],zmm1[6]
794 ; ALL-NEXT: ret{{[l|q]}}
795 %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>
796 ret <8 x double> %shuffle
799 define <8 x double> @shuffle_v8f64_23uuuuuu(<8 x double> %a0, <8 x double> %a1) {
800 ; ALL-LABEL: shuffle_v8f64_23uuuuuu:
802 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
803 ; ALL-NEXT: ret{{[l|q]}}
804 %1 = shufflevector <8 x double> %a0, <8 x double> undef, <8 x i32> <i32 2, i32 3, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
808 define <8 x double> @shuffle_v8f64_67zzzzzz(<8 x double> %a0, <8 x double> %a1) {
809 ; ALL-LABEL: shuffle_v8f64_67zzzzzz:
811 ; ALL-NEXT: vextractf32x4 $3, %zmm0, %xmm0
812 ; ALL-NEXT: ret{{[l|q]}}
813 %1 = shufflevector <8 x double> %a0, <8 x double> zeroinitializer, <8 x i32> <i32 6, i32 7, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
817 define <8 x double> @shuffle_v8f64_4567uuuu(<8 x double> %a0, <8 x double> %a1) {
818 ; ALL-LABEL: shuffle_v8f64_4567uuuu:
820 ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0
821 ; ALL-NEXT: ret{{[l|q]}}
822 %1 = shufflevector <8 x double> %a0, <8 x double> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 8, i32 8, i32 8, i32 8>
826 define <8 x double> @shuffle_v8f64_4567zzzz(<8 x double> %a0, <8 x double> %a1) {
827 ; ALL-LABEL: shuffle_v8f64_4567zzzz:
829 ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0
830 ; ALL-NEXT: ret{{[l|q]}}
831 %1 = shufflevector <8 x double> %a0, <8 x double> zeroinitializer, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 8, i32 8, i32 8, i32 8>
835 define <8 x i64> @shuffle_v8i64_00000000(<8 x i64> %a, <8 x i64> %b) {
836 ; ALL-LABEL: shuffle_v8i64_00000000:
838 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
839 ; ALL-NEXT: ret{{[l|q]}}
840 %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>
841 ret <8 x i64> %shuffle
844 define <8 x i64> @shuffle_v8i64_44444444(<8 x i64> %a, <8 x i64> %b) {
845 ; ALL-LABEL: shuffle_v8i64_44444444:
847 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm0
848 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
849 ; ALL-NEXT: ret{{[l|q]}}
850 %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>
851 ret <8 x i64> %shuffle
854 define <8 x i64> @shuffle_v8i64_66666666(<8 x i64> %a, <8 x i64> %b) {
855 ; ALL-LABEL: shuffle_v8i64_66666666:
857 ; ALL-NEXT: vextractf32x4 $3, %zmm0, %xmm0
858 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
859 ; ALL-NEXT: ret{{[l|q]}}
860 %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>
861 ret <8 x i64> %shuffle
864 define <8 x i64> @shuffle_v8i64_00000010(<8 x i64> %a, <8 x i64> %b) {
865 ; AVX512F-LABEL: shuffle_v8i64_00000010:
867 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0]
868 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
871 ; AVX512F-32-LABEL: shuffle_v8i64_00000010:
872 ; AVX512F-32: # %bb.0:
873 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0]
874 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
875 ; AVX512F-32-NEXT: retl
876 %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>
877 ret <8 x i64> %shuffle
880 define <8 x i64> @shuffle_v8i64_00000200(<8 x i64> %a, <8 x i64> %b) {
881 ; AVX512F-LABEL: shuffle_v8i64_00000200:
883 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,2,0,0]
884 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
887 ; AVX512F-32-LABEL: shuffle_v8i64_00000200:
888 ; AVX512F-32: # %bb.0:
889 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0]
890 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
891 ; AVX512F-32-NEXT: retl
892 %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>
893 ret <8 x i64> %shuffle
896 define <8 x i64> @shuffle_v8i64_00003000(<8 x i64> %a, <8 x i64> %b) {
897 ; AVX512F-LABEL: shuffle_v8i64_00003000:
899 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,3,0,0,0]
900 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
903 ; AVX512F-32-LABEL: shuffle_v8i64_00003000:
904 ; AVX512F-32: # %bb.0:
905 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0]
906 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
907 ; AVX512F-32-NEXT: retl
908 %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>
909 ret <8 x i64> %shuffle
912 define <8 x i64> @shuffle_v8i64_00040000(<8 x i64> %a, <8 x i64> %b) {
913 ; AVX512F-LABEL: shuffle_v8i64_00040000:
915 ; AVX512F-NEXT: vmovaps {{.*#+}} ymm1 = [0,0,0,4]
916 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
919 ; AVX512F-32-LABEL: shuffle_v8i64_00040000:
920 ; AVX512F-32: # %bb.0:
921 ; AVX512F-32-NEXT: vmovaps {{.*#+}} ymm1 = [0,0,0,0,0,0,4,0]
922 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
923 ; AVX512F-32-NEXT: retl
924 %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>
925 ret <8 x i64> %shuffle
928 define <8 x i64> @shuffle_v8i64_00500000(<8 x i64> %a, <8 x i64> %b) {
929 ; AVX512F-LABEL: shuffle_v8i64_00500000:
931 ; AVX512F-NEXT: vmovaps {{.*#+}} ymm1 = [0,0,5,0]
932 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
935 ; AVX512F-32-LABEL: shuffle_v8i64_00500000:
936 ; AVX512F-32: # %bb.0:
937 ; AVX512F-32-NEXT: vmovaps {{.*#+}} ymm1 = [0,0,0,0,5,0,0,0]
938 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
939 ; AVX512F-32-NEXT: retl
940 %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>
941 ret <8 x i64> %shuffle
944 define <8 x i64> @shuffle_v8i64_06000000(<8 x i64> %a, <8 x i64> %b) {
945 ; AVX512F-LABEL: shuffle_v8i64_06000000:
947 ; AVX512F-NEXT: vmovaps {{.*#+}} xmm1 = [0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0]
948 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
951 ; AVX512F-32-LABEL: shuffle_v8i64_06000000:
952 ; AVX512F-32: # %bb.0:
953 ; AVX512F-32-NEXT: vmovaps {{.*#+}} xmm1 = [0,0,6,0]
954 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
955 ; AVX512F-32-NEXT: retl
956 %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>
957 ret <8 x i64> %shuffle
960 define <8 x i64> @shuffle_v8i64_70000000(<8 x i64> %a, <8 x i64> %b) {
961 ; ALL-LABEL: shuffle_v8i64_70000000:
963 ; ALL-NEXT: vmovss {{.*#+}} xmm1 = [7,0,0,0]
964 ; ALL-NEXT: vpermpd %zmm0, %zmm1, %zmm0
965 ; ALL-NEXT: ret{{[l|q]}}
966 %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>
967 ret <8 x i64> %shuffle
970 define <8 x i64> @shuffle_v8i64_01014545(<8 x i64> %a, <8 x i64> %b) {
971 ; ALL-LABEL: shuffle_v8i64_01014545:
973 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5]
974 ; ALL-NEXT: ret{{[l|q]}}
976 %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>
977 ret <8 x i64> %shuffle
980 define <8 x i64> @shuffle_v8i64_01014545_mem(ptr %ptr, <8 x i64> %b) {
981 ; AVX512F-LABEL: shuffle_v8i64_01014545_mem:
983 ; AVX512F-NEXT: vpermpd {{.*#+}} zmm0 = mem[0,1,0,1,4,5,4,5]
986 ; AVX512F-32-LABEL: shuffle_v8i64_01014545_mem:
987 ; AVX512F-32: # %bb.0:
988 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
989 ; AVX512F-32-NEXT: vpermpd {{.*#+}} zmm0 = mem[0,1,0,1,4,5,4,5]
990 ; AVX512F-32-NEXT: retl
992 %a = load <8 x i64>, ptr %ptr
993 %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>
994 ret <8 x i64> %shuffle
997 define <8 x i64> @shuffle_v8i64_00112233(<8 x i64> %a, <8 x i64> %b) {
998 ; AVX512F-LABEL: shuffle_v8i64_00112233:
1000 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,1,2,2,3,3]
1001 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1002 ; AVX512F-NEXT: retq
1004 ; AVX512F-32-LABEL: shuffle_v8i64_00112233:
1005 ; AVX512F-32: # %bb.0:
1006 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,0,1,0,2,0,2,0,3,0,3,0]
1007 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1008 ; AVX512F-32-NEXT: retl
1009 %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>
1010 ret <8 x i64> %shuffle
1013 define <8 x i64> @shuffle_v8i64_00001111(<8 x i64> %a, <8 x i64> %b) {
1014 ; AVX512F-LABEL: shuffle_v8i64_00001111:
1016 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,1,1,1,1]
1017 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1018 ; AVX512F-NEXT: retq
1020 ; AVX512F-32-LABEL: shuffle_v8i64_00001111:
1021 ; AVX512F-32: # %bb.0:
1022 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0]
1023 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1024 ; AVX512F-32-NEXT: retl
1025 %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>
1026 ret <8 x i64> %shuffle
1029 define <8 x i64> @shuffle_v8i64_81a3c5e7(<8 x i64> %a, <8 x i64> %b) {
1030 ; ALL-LABEL: shuffle_v8i64_81a3c5e7:
1032 ; ALL-NEXT: movb $-86, %al
1033 ; ALL-NEXT: kmovw %eax, %k1
1034 ; ALL-NEXT: vpblendmq %zmm0, %zmm1, %zmm0 {%k1}
1035 ; ALL-NEXT: ret{{[l|q]}}
1036 %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>
1037 ret <8 x i64> %shuffle
1040 define <8 x i64> @shuffle_v8i64_08080808(<8 x i64> %a, <8 x i64> %b) {
1041 ; AVX512F-LABEL: shuffle_v8i64_08080808:
1043 ; AVX512F-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,8,0,8,0,8,0,8]
1044 ; AVX512F-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1045 ; AVX512F-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1046 ; AVX512F-NEXT: retq
1048 ; AVX512F-32-LABEL: shuffle_v8i64_08080808:
1049 ; AVX512F-32: # %bb.0:
1050 ; AVX512F-32-NEXT: vbroadcasti32x4 {{.*#+}} zmm2 = [0,0,8,0,0,0,8,0,0,0,8,0,0,0,8,0]
1051 ; AVX512F-32-NEXT: # zmm2 = mem[0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3]
1052 ; AVX512F-32-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1053 ; AVX512F-32-NEXT: retl
1054 %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>
1055 ret <8 x i64> %shuffle
1058 define <8 x i64> @shuffle_v8i64_08084c4c(<8 x i64> %a, <8 x i64> %b) {
1059 ; ALL-LABEL: shuffle_v8i64_08084c4c:
1061 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [0,8,0,8,4,12,4,12]
1062 ; ALL-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1063 ; ALL-NEXT: ret{{[l|q]}}
1064 %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>
1065 ret <8 x i64> %shuffle
1068 define <8 x i64> @shuffle_v8i64_8823cc67(<8 x i64> %a, <8 x i64> %b) {
1069 ; ALL-LABEL: shuffle_v8i64_8823cc67:
1071 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [0,0,10,11,4,4,14,15]
1072 ; ALL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1073 ; ALL-NEXT: vmovdqa64 %zmm2, %zmm0
1074 ; ALL-NEXT: ret{{[l|q]}}
1075 %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>
1076 ret <8 x i64> %shuffle
1079 define <8 x i64> @shuffle_v8i64_9832dc76(<8 x i64> %a, <8 x i64> %b) {
1080 ; ALL-LABEL: shuffle_v8i64_9832dc76:
1082 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [1,0,11,10,5,4,15,14]
1083 ; ALL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1084 ; ALL-NEXT: vmovdqa64 %zmm2, %zmm0
1085 ; ALL-NEXT: ret{{[l|q]}}
1086 %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>
1087 ret <8 x i64> %shuffle
1090 define <8 x i64> @shuffle_v8i64_9810dc54(<8 x i64> %a, <8 x i64> %b) {
1091 ; ALL-LABEL: shuffle_v8i64_9810dc54:
1093 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [1,0,9,8,5,4,13,12]
1094 ; ALL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1095 ; ALL-NEXT: vmovdqa64 %zmm2, %zmm0
1096 ; ALL-NEXT: ret{{[l|q]}}
1097 %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>
1098 ret <8 x i64> %shuffle
1101 define <8 x i64> @shuffle_v8i64_08194c5d(<8 x i64> %a, <8 x i64> %b) {
1102 ; ALL-LABEL: shuffle_v8i64_08194c5d:
1104 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [0,8,1,9,4,12,5,13]
1105 ; ALL-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1106 ; ALL-NEXT: ret{{[l|q]}}
1107 %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>
1108 ret <8 x i64> %shuffle
1111 define <8 x i64> @shuffle_v8i64_2a3b6e7f(<8 x i64> %a, <8 x i64> %b) {
1112 ; ALL-LABEL: shuffle_v8i64_2a3b6e7f:
1114 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [2,10,3,11,6,14,7,15]
1115 ; ALL-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1116 ; ALL-NEXT: ret{{[l|q]}}
1117 %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>
1118 ret <8 x i64> %shuffle
1121 define <8 x i64> @shuffle_v8i64_08192a3b(<8 x i64> %a, <8 x i64> %b) {
1122 ; ALL-LABEL: shuffle_v8i64_08192a3b:
1124 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [0,8,1,9,2,10,3,11]
1125 ; ALL-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1126 ; ALL-NEXT: ret{{[l|q]}}
1127 %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>
1128 ret <8 x i64> %shuffle
1131 define <8 x i64> @shuffle_v8i64_08991abb(<8 x i64> %a, <8 x i64> %b) {
1132 ; ALL-LABEL: shuffle_v8i64_08991abb:
1134 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [8,0,1,1,9,2,3,3]
1135 ; ALL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1136 ; ALL-NEXT: vmovdqa64 %zmm2, %zmm0
1137 ; ALL-NEXT: ret{{[l|q]}}
1138 %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>
1139 ret <8 x i64> %shuffle
1142 define <8 x i64> @shuffle_v8i64_091b2d3f(<8 x i64> %a, <8 x i64> %b) {
1143 ; ALL-LABEL: shuffle_v8i64_091b2d3f:
1145 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [0,9,1,11,2,13,3,15]
1146 ; ALL-NEXT: vpermt2q %zmm1, %zmm2, %zmm0
1147 ; ALL-NEXT: ret{{[l|q]}}
1148 %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>
1149 ret <8 x i64> %shuffle
1152 define <8 x i64> @shuffle_v8i64_09ab1def(<8 x i64> %a, <8 x i64> %b) {
1153 ; ALL-LABEL: shuffle_v8i64_09ab1def:
1155 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [8,1,2,3,9,5,6,7]
1156 ; ALL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1157 ; ALL-NEXT: vmovdqa64 %zmm2, %zmm0
1158 ; ALL-NEXT: ret{{[l|q]}}
1159 %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>
1160 ret <8 x i64> %shuffle
1163 define <8 x i64> @shuffle_v8i64_00014445(<8 x i64> %a, <8 x i64> %b) {
1164 ; ALL-LABEL: shuffle_v8i64_00014445:
1166 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,0,1,4,4,4,5]
1167 ; ALL-NEXT: ret{{[l|q]}}
1168 %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>
1169 ret <8 x i64> %shuffle
1172 define <8 x i64> @shuffle_v8i64_00204464(<8 x i64> %a, <8 x i64> %b) {
1173 ; ALL-LABEL: shuffle_v8i64_00204464:
1175 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,0,4,4,6,4]
1176 ; ALL-NEXT: ret{{[l|q]}}
1177 %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>
1178 ret <8 x i64> %shuffle
1181 define <8 x i64> @shuffle_v8i64_03004744(<8 x i64> %a, <8 x i64> %b) {
1182 ; ALL-LABEL: shuffle_v8i64_03004744:
1184 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,3,0,0,4,7,4,4]
1185 ; ALL-NEXT: ret{{[l|q]}}
1186 %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>
1187 ret <8 x i64> %shuffle
1190 define <8 x i64> @shuffle_v8i64_10005444(<8 x i64> %a, <8 x i64> %b) {
1191 ; ALL-LABEL: shuffle_v8i64_10005444:
1193 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,0,0,5,4,4,4]
1194 ; ALL-NEXT: ret{{[l|q]}}
1195 %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>
1196 ret <8 x i64> %shuffle
1199 define <8 x i64> @shuffle_v8i64_22006644(<8 x i64> %a, <8 x i64> %b) {
1200 ; ALL-LABEL: shuffle_v8i64_22006644:
1202 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[2,2,0,0,6,6,4,4]
1203 ; ALL-NEXT: ret{{[l|q]}}
1204 %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>
1205 ret <8 x i64> %shuffle
1208 define <8 x i64> @shuffle_v8i64_33307774(<8 x i64> %a, <8 x i64> %b) {
1209 ; ALL-LABEL: shuffle_v8i64_33307774:
1211 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,3,3,0,7,7,7,4]
1212 ; ALL-NEXT: ret{{[l|q]}}
1213 %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>
1214 ret <8 x i64> %shuffle
1217 define <8 x i64> @shuffle_v8i64_32107654(<8 x i64> %a, <8 x i64> %b) {
1218 ; ALL-LABEL: shuffle_v8i64_32107654:
1220 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[3,2,1,0,7,6,5,4]
1221 ; ALL-NEXT: ret{{[l|q]}}
1222 %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>
1223 ret <8 x i64> %shuffle
1226 define <8 x i64> @shuffle_v8i64_00234467(<8 x i64> %a, <8 x i64> %b) {
1227 ; ALL-LABEL: shuffle_v8i64_00234467:
1229 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[0,0,2,3,4,4,6,7]
1230 ; ALL-NEXT: ret{{[l|q]}}
1231 %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>
1232 ret <8 x i64> %shuffle
1235 define <8 x i64> @shuffle_v8i64_00224466(<8 x i64> %a, <8 x i64> %b) {
1236 ; ALL-LABEL: shuffle_v8i64_00224466:
1238 ; ALL-NEXT: vshufps {{.*#+}} zmm0 = zmm0[0,1,0,1,4,5,4,5,8,9,8,9,12,13,12,13]
1239 ; ALL-NEXT: ret{{[l|q]}}
1240 %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>
1241 ret <8 x i64> %shuffle
1244 define <8 x i64> @shuffle_v8i64_10325476(<8 x i64> %a, <8 x i64> %b) {
1245 ; ALL-LABEL: shuffle_v8i64_10325476:
1247 ; ALL-NEXT: vshufps {{.*#+}} zmm0 = zmm0[2,3,0,1,6,7,4,5,10,11,8,9,14,15,12,13]
1248 ; ALL-NEXT: ret{{[l|q]}}
1249 %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>
1250 ret <8 x i64> %shuffle
1253 define <8 x i64> @shuffle_v8i64_11335577(<8 x i64> %a, <8 x i64> %b) {
1254 ; ALL-LABEL: shuffle_v8i64_11335577:
1256 ; ALL-NEXT: vshufps {{.*#+}} zmm0 = zmm0[2,3,2,3,6,7,6,7,10,11,10,11,14,15,14,15]
1257 ; ALL-NEXT: ret{{[l|q]}}
1258 %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>
1259 ret <8 x i64> %shuffle
1262 define <8 x i64> @shuffle_v8i64_10235467(<8 x i64> %a, <8 x i64> %b) {
1263 ; ALL-LABEL: shuffle_v8i64_10235467:
1265 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,2,3,5,4,6,7]
1266 ; ALL-NEXT: ret{{[l|q]}}
1267 %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>
1268 ret <8 x i64> %shuffle
1271 define <8 x i64> @shuffle_v8i64_10225466(<8 x i64> %a, <8 x i64> %b) {
1272 ; ALL-LABEL: shuffle_v8i64_10225466:
1274 ; ALL-NEXT: vpermpd {{.*#+}} zmm0 = zmm0[1,0,2,2,5,4,6,6]
1275 ; ALL-NEXT: ret{{[l|q]}}
1276 %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>
1277 ret <8 x i64> %shuffle
1280 define <8 x i64> @shuffle_v8i64_00015444(<8 x i64> %a, <8 x i64> %b) {
1281 ; AVX512F-LABEL: shuffle_v8i64_00015444:
1283 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,1,5,4,4,4]
1284 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1285 ; AVX512F-NEXT: retq
1287 ; AVX512F-32-LABEL: shuffle_v8i64_00015444:
1288 ; AVX512F-32: # %bb.0:
1289 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,0,0,1,0,5,0,4,0,4,0,4,0]
1290 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1291 ; AVX512F-32-NEXT: retl
1292 %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>
1293 ret <8 x i64> %shuffle
1296 define <8 x i64> @shuffle_v8i64_00204644(<8 x i64> %a, <8 x i64> %b) {
1297 ; AVX512F-LABEL: shuffle_v8i64_00204644:
1299 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,0,4,6,4,4]
1300 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1301 ; AVX512F-NEXT: retq
1303 ; AVX512F-32-LABEL: shuffle_v8i64_00204644:
1304 ; AVX512F-32: # %bb.0:
1305 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,0,0,4,0,6,0,4,0,4,0]
1306 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1307 ; AVX512F-32-NEXT: retl
1308 %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>
1309 ret <8 x i64> %shuffle
1312 define <8 x i64> @shuffle_v8i64_03004474(<8 x i64> %a, <8 x i64> %b) {
1313 ; AVX512F-LABEL: shuffle_v8i64_03004474:
1315 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,3,0,0,4,4,7,4]
1316 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1317 ; AVX512F-NEXT: retq
1319 ; AVX512F-32-LABEL: shuffle_v8i64_03004474:
1320 ; AVX512F-32: # %bb.0:
1321 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,3,0,0,0,0,0,4,0,4,0,7,0,4,0]
1322 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1323 ; AVX512F-32-NEXT: retl
1324 %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>
1325 ret <8 x i64> %shuffle
1328 define <8 x i64> @shuffle_v8i64_10004444(<8 x i64> %a, <8 x i64> %b) {
1329 ; AVX512F-LABEL: shuffle_v8i64_10004444:
1331 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,4,4,4,4]
1332 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1333 ; AVX512F-NEXT: retq
1335 ; AVX512F-32-LABEL: shuffle_v8i64_10004444:
1336 ; AVX512F-32: # %bb.0:
1337 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,0,0,0,0,4,0,4,0,4,0,4,0]
1338 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1339 ; AVX512F-32-NEXT: retl
1340 %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>
1341 ret <8 x i64> %shuffle
1344 define <8 x i64> @shuffle_v8i64_22006446(<8 x i64> %a, <8 x i64> %b) {
1345 ; AVX512F-LABEL: shuffle_v8i64_22006446:
1347 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [2,2,0,0,6,4,4,6]
1348 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1349 ; AVX512F-NEXT: retq
1351 ; AVX512F-32-LABEL: shuffle_v8i64_22006446:
1352 ; AVX512F-32: # %bb.0:
1353 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [2,0,2,0,0,0,0,0,6,0,4,0,4,0,6,0]
1354 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1355 ; AVX512F-32-NEXT: retl
1356 %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>
1357 ret <8 x i64> %shuffle
1360 define <8 x i64> @shuffle_v8i64_33307474(<8 x i64> %a, <8 x i64> %b) {
1361 ; AVX512F-LABEL: shuffle_v8i64_33307474:
1363 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,3,3,0,7,4,7,4]
1364 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1365 ; AVX512F-NEXT: retq
1367 ; AVX512F-32-LABEL: shuffle_v8i64_33307474:
1368 ; AVX512F-32: # %bb.0:
1369 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,3,0,3,0,0,0,7,0,4,0,7,0,4,0]
1370 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1371 ; AVX512F-32-NEXT: retl
1372 %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>
1373 ret <8 x i64> %shuffle
1376 define <8 x i64> @shuffle_v8i64_32104567(<8 x i64> %a, <8 x i64> %b) {
1377 ; AVX512F-LABEL: shuffle_v8i64_32104567:
1379 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [3,2,1,0,4,5,6,7]
1380 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1381 ; AVX512F-NEXT: retq
1383 ; AVX512F-32-LABEL: shuffle_v8i64_32104567:
1384 ; AVX512F-32: # %bb.0:
1385 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [3,0,2,0,1,0,0,0,4,0,5,0,6,0,7,0]
1386 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1387 ; AVX512F-32-NEXT: retl
1388 %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>
1389 ret <8 x i64> %shuffle
1392 define <8 x i64> @shuffle_v8i64_00236744(<8 x i64> %a, <8 x i64> %b) {
1393 ; AVX512F-LABEL: shuffle_v8i64_00236744:
1395 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,3,6,7,4,4]
1396 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1397 ; AVX512F-NEXT: retq
1399 ; AVX512F-32-LABEL: shuffle_v8i64_00236744:
1400 ; AVX512F-32: # %bb.0:
1401 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,3,0,6,0,7,0,4,0,4,0]
1402 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1403 ; AVX512F-32-NEXT: retl
1404 %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>
1405 ret <8 x i64> %shuffle
1408 define <8 x i64> @shuffle_v8i64_00226644(<8 x i64> %a, <8 x i64> %b) {
1409 ; AVX512F-LABEL: shuffle_v8i64_00226644:
1411 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,2,6,6,4,4]
1412 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1413 ; AVX512F-NEXT: retq
1415 ; AVX512F-32-LABEL: shuffle_v8i64_00226644:
1416 ; AVX512F-32: # %bb.0:
1417 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,2,0,6,0,6,0,4,0,4,0]
1418 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1419 ; AVX512F-32-NEXT: retl
1420 %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>
1421 ret <8 x i64> %shuffle
1424 define <8 x i64> @shuffle_v8i64_10324567(<8 x i64> %a, <8 x i64> %b) {
1425 ; AVX512F-LABEL: shuffle_v8i64_10324567:
1427 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,3,2,4,5,6,7]
1428 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1429 ; AVX512F-NEXT: retq
1431 ; AVX512F-32-LABEL: shuffle_v8i64_10324567:
1432 ; AVX512F-32: # %bb.0:
1433 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,3,0,2,0,4,0,5,0,6,0,7,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 1, i32 0, i32 3, i32 2, i32 4, i32 5, i32 6, i32 7>
1437 ret <8 x i64> %shuffle
1440 define <8 x i64> @shuffle_v8i64_11334567(<8 x i64> %a, <8 x i64> %b) {
1441 ; AVX512F-LABEL: shuffle_v8i64_11334567:
1443 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,1,3,3,4,5,6,7]
1444 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1445 ; AVX512F-NEXT: retq
1447 ; AVX512F-32-LABEL: shuffle_v8i64_11334567:
1448 ; AVX512F-32: # %bb.0:
1449 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,1,0,3,0,3,0,4,0,5,0,6,0,7,0]
1450 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1451 ; AVX512F-32-NEXT: retl
1452 %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>
1453 ret <8 x i64> %shuffle
1456 define <8 x i64> @shuffle_v8i64_01235467(<8 x i64> %a, <8 x i64> %b) {
1457 ; AVX512F-LABEL: shuffle_v8i64_01235467:
1459 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,1,2,3,5,4,6,7]
1460 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1461 ; AVX512F-NEXT: retq
1463 ; AVX512F-32-LABEL: shuffle_v8i64_01235467:
1464 ; AVX512F-32: # %bb.0:
1465 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,0,2,0,3,0,5,0,4,0,6,0,7,0]
1466 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1467 ; AVX512F-32-NEXT: retl
1468 %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>
1469 ret <8 x i64> %shuffle
1472 define <8 x i64> @shuffle_v8i64_01235466(<8 x i64> %a, <8 x i64> %b) {
1473 ; AVX512F-LABEL: shuffle_v8i64_01235466:
1475 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,1,2,3,5,4,6,6]
1476 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1477 ; AVX512F-NEXT: retq
1479 ; AVX512F-32-LABEL: shuffle_v8i64_01235466:
1480 ; AVX512F-32: # %bb.0:
1481 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,1,0,2,0,3,0,5,0,4,0,6,0,6,0]
1482 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1483 ; AVX512F-32-NEXT: retl
1484 %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>
1485 ret <8 x i64> %shuffle
1488 define <8 x i64> @shuffle_v8i64_002u6u44(<8 x i64> %a, <8 x i64> %b) {
1489 ; AVX512F-LABEL: shuffle_v8i64_002u6u44:
1491 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,2,u,6,u,4,4]
1492 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1493 ; AVX512F-NEXT: retq
1495 ; AVX512F-32-LABEL: shuffle_v8i64_002u6u44:
1496 ; AVX512F-32: # %bb.0:
1497 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,2,0,u,u,6,0,u,u,4,0,4,0]
1498 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1499 ; AVX512F-32-NEXT: retl
1500 %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>
1501 ret <8 x i64> %shuffle
1504 define <8 x i64> @shuffle_v8i64_00uu66uu(<8 x i64> %a, <8 x i64> %b) {
1505 ; AVX512F-LABEL: shuffle_v8i64_00uu66uu:
1507 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,u,u,6,6,u,u]
1508 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1509 ; AVX512F-NEXT: retq
1511 ; AVX512F-32-LABEL: shuffle_v8i64_00uu66uu:
1512 ; AVX512F-32: # %bb.0:
1513 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,0,0,u,u,u,u,6,0,6,0,u,u,u,u]
1514 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1515 ; AVX512F-32-NEXT: retl
1516 %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>
1517 ret <8 x i64> %shuffle
1520 define <8 x i64> @shuffle_v8i64_103245uu(<8 x i64> %a, <8 x i64> %b) {
1521 ; AVX512F-LABEL: shuffle_v8i64_103245uu:
1523 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,3,2,4,5,u,u]
1524 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1525 ; AVX512F-NEXT: retq
1527 ; AVX512F-32-LABEL: shuffle_v8i64_103245uu:
1528 ; AVX512F-32: # %bb.0:
1529 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,0,0,3,0,2,0,4,0,5,0,u,u,u,u]
1530 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1531 ; AVX512F-32-NEXT: retl
1532 %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>
1533 ret <8 x i64> %shuffle
1536 define <8 x i64> @shuffle_v8i64_1133uu67(<8 x i64> %a, <8 x i64> %b) {
1537 ; AVX512F-LABEL: shuffle_v8i64_1133uu67:
1539 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [1,1,3,3,u,u,6,7]
1540 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1541 ; AVX512F-NEXT: retq
1543 ; AVX512F-32-LABEL: shuffle_v8i64_1133uu67:
1544 ; AVX512F-32: # %bb.0:
1545 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [1,0,1,0,3,0,3,0,u,u,u,u,6,0,7,0]
1546 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1547 ; AVX512F-32-NEXT: retl
1548 %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>
1549 ret <8 x i64> %shuffle
1552 define <8 x i64> @shuffle_v8i64_0uu354uu(<8 x i64> %a, <8 x i64> %b) {
1553 ; AVX512F-LABEL: shuffle_v8i64_0uu354uu:
1555 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [0,u,u,3,5,4,u,u]
1556 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1557 ; AVX512F-NEXT: retq
1559 ; AVX512F-32-LABEL: shuffle_v8i64_0uu354uu:
1560 ; AVX512F-32: # %bb.0:
1561 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [0,0,u,u,u,u,3,0,5,0,4,0,u,u,u,u]
1562 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1563 ; AVX512F-32-NEXT: retl
1564 %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>
1565 ret <8 x i64> %shuffle
1568 define <8 x i64> @shuffle_v8i64_uuu3uu66(<8 x i64> %a, <8 x i64> %b) {
1569 ; AVX512F-LABEL: shuffle_v8i64_uuu3uu66:
1571 ; AVX512F-NEXT: vmovaps {{.*#+}} zmm1 = [u,u,u,3,u,u,6,6]
1572 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
1573 ; AVX512F-NEXT: retq
1575 ; AVX512F-32-LABEL: shuffle_v8i64_uuu3uu66:
1576 ; AVX512F-32: # %bb.0:
1577 ; AVX512F-32-NEXT: vmovaps {{.*#+}} zmm1 = [u,u,u,u,u,u,3,0,u,u,u,u,6,0,6,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 undef, i32 undef, i32 undef, i32 3, i32 undef, i32 undef, i32 6, i32 6>
1581 ret <8 x i64> %shuffle
1584 define <8 x i64> @shuffle_v8i64_6caa87e5(<8 x i64> %a, <8 x i64> %b) {
1585 ; ALL-LABEL: shuffle_v8i64_6caa87e5:
1587 ; ALL-NEXT: vpmovsxbq {{.*#+}} zmm2 = [14,4,2,2,0,15,6,13]
1588 ; ALL-NEXT: vpermi2q %zmm0, %zmm1, %zmm2
1589 ; ALL-NEXT: vmovdqa64 %zmm2, %zmm0
1590 ; ALL-NEXT: ret{{[l|q]}}
1591 %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>
1592 ret <8 x i64> %shuffle
1595 define <8 x i64> @shuffle_v8i64_34567zzz(<8 x i64> %a, <8 x i64> %b) {
1596 ; ALL-LABEL: shuffle_v8i64_34567zzz:
1598 ; ALL-NEXT: vpxor %xmm1, %xmm1, %xmm1
1599 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[3,4,5,6,7],zmm1[0,1,2]
1600 ; ALL-NEXT: ret{{[l|q]}}
1601 %valign = shufflevector <8 x i64> %a, <8 x i64> zeroinitializer, <8 x i32> <i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 8, i32 8>
1602 ret <8 x i64> %valign
1605 define <8 x i64> @shuffle_v8i64_zz012345(<8 x i64> %a, <8 x i64> %b) {
1606 ; ALL-LABEL: shuffle_v8i64_zz012345:
1608 ; ALL-NEXT: vpxor %xmm1, %xmm1, %xmm1
1609 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm1[6,7],zmm0[0,1,2,3,4,5]
1610 ; ALL-NEXT: ret{{[l|q]}}
1611 %valign = shufflevector <8 x i64> %a, <8 x i64> zeroinitializer, <8 x i32> <i32 8, i32 8, i32 0, i32 1, i32 2, i32 3, i32 4, i32 5>
1612 ret <8 x i64> %valign
1615 define <8 x double> @shuffle_v8f64_082a4c6e(<8 x double> %a, <8 x double> %b) {
1616 ; ALL-LABEL: shuffle_v8f64_082a4c6e:
1618 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1619 ; ALL-NEXT: ret{{[l|q]}}
1620 %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>
1621 ret <8 x double> %shuffle
1624 define <8 x double> @shuffle_v8f64_0z2z4z6z(<8 x double> %a, <8 x double> %b) {
1625 ; ALL-LABEL: shuffle_v8f64_0z2z4z6z:
1627 ; ALL-NEXT: vxorpd %xmm1, %xmm1, %xmm1
1628 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1629 ; ALL-NEXT: ret{{[l|q]}}
1630 %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>
1631 ret <8 x double> %shuffle
1634 define <8 x i64> @shuffle_v8i64_082a4c6e(<8 x i64> %a, <8 x i64> %b) {
1635 ; ALL-LABEL: shuffle_v8i64_082a4c6e:
1637 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1638 ; ALL-NEXT: ret{{[l|q]}}
1639 %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>
1640 ret <8 x i64> %shuffle
1643 define <8 x i64> @shuffle_v8i64_z8zazcze(<8 x i64> %a, <8 x i64> %b) {
1644 ; ALL-LABEL: shuffle_v8i64_z8zazcze:
1646 ; ALL-NEXT: vxorps %xmm0, %xmm0, %xmm0
1647 ; ALL-NEXT: vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1648 ; ALL-NEXT: ret{{[l|q]}}
1649 %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>
1650 ret <8 x i64> %shuffle
1653 define <8 x double> @shuffle_v8f64_193b5d7f(<8 x double> %a, <8 x double> %b) {
1654 ; ALL-LABEL: shuffle_v8f64_193b5d7f:
1656 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1657 ; ALL-NEXT: ret{{[l|q]}}
1658 %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>
1659 ret <8 x double> %shuffle
1662 define <8 x double> @shuffle_v8f64_z9zbzdzf(<8 x double> %a, <8 x double> %b) {
1663 ; ALL-LABEL: shuffle_v8f64_z9zbzdzf:
1665 ; ALL-NEXT: vxorpd %xmm0, %xmm0, %xmm0
1666 ; ALL-NEXT: vshufpd {{.*#+}} zmm0 = zmm0[0],zmm1[1],zmm0[2],zmm1[3],zmm0[4],zmm1[5],zmm0[6],zmm1[7]
1667 ; ALL-NEXT: ret{{[l|q]}}
1668 %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>
1669 ret <8 x double> %shuffle
1672 define <8 x i64> @shuffle_v8i64_193b5d7f(<8 x i64> %a, <8 x i64> %b) {
1673 ; ALL-LABEL: shuffle_v8i64_193b5d7f:
1675 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1676 ; ALL-NEXT: ret{{[l|q]}}
1677 %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>
1678 ret <8 x i64> %shuffle
1681 define <8 x i64> @shuffle_v8i64_1z3z5z7z(<8 x i64> %a, <8 x i64> %b) {
1682 ; ALL-LABEL: shuffle_v8i64_1z3z5z7z:
1684 ; ALL-NEXT: vxorps %xmm1, %xmm1, %xmm1
1685 ; ALL-NEXT: vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1686 ; ALL-NEXT: ret{{[l|q]}}
1687 %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>
1688 ret <8 x i64> %shuffle
1691 define <8 x double> @test_vshuff64x2_512(<8 x double> %x, <8 x double> %x1) nounwind {
1692 ; ALL-LABEL: test_vshuff64x2_512:
1694 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],zmm1[2,3,0,1]
1695 ; ALL-NEXT: ret{{[l|q]}}
1696 %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>
1697 ret <8 x double> %res
1700 define <8 x double> @test_vshuff64x2_512_maskz(<8 x double> %x, <8 x double> %x1, <8 x i1> %mask) nounwind {
1701 ; ALL-LABEL: test_vshuff64x2_512_maskz:
1703 ; ALL-NEXT: vpmovsxwq %xmm2, %zmm2
1704 ; ALL-NEXT: vpsllq $63, %zmm2, %zmm2
1705 ; ALL-NEXT: vptestmq %zmm2, %zmm2, %k1
1706 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],zmm1[2,3,0,1]
1707 ; ALL-NEXT: ret{{[l|q]}}
1708 %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>
1709 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> zeroinitializer
1710 ret <8 x double> %res
1713 define <8 x i64> @test_vshufi64x2_512_mask(<8 x i64> %x, <8 x i64> %x1, <8 x i1> %mask) nounwind {
1714 ; ALL-LABEL: test_vshufi64x2_512_mask:
1716 ; ALL-NEXT: vpmovsxwq %xmm2, %zmm2
1717 ; ALL-NEXT: vpsllq $63, %zmm2, %zmm2
1718 ; ALL-NEXT: vptestmq %zmm2, %zmm2, %k1
1719 ; ALL-NEXT: vshufi64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],zmm1[2,3,0,1]
1720 ; ALL-NEXT: ret{{[l|q]}}
1721 %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>
1722 %res = select <8 x i1> %mask, <8 x i64> %y, <8 x i64> %x
1726 define <8 x double> @test_vshuff64x2_512_mem(<8 x double> %x, ptr%ptr) nounwind {
1727 ; AVX512F-LABEL: test_vshuff64x2_512_mem:
1729 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],mem[2,3,0,1]
1730 ; AVX512F-NEXT: retq
1732 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem:
1733 ; AVX512F-32: # %bb.0:
1734 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1735 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,4,5],mem[2,3,0,1]
1736 ; AVX512F-32-NEXT: retl
1737 %x1 = load <8 x double>,ptr%ptr,align 1
1738 %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>
1739 ret <8 x double> %res
1742 define <8 x double> @test_vshuff64x2_512_mem_mask(<8 x double> %x, ptr%ptr, <8 x i1> %mask) nounwind {
1743 ; AVX512F-LABEL: test_vshuff64x2_512_mem_mask:
1745 ; AVX512F-NEXT: vpmovsxwq %xmm1, %zmm1
1746 ; AVX512F-NEXT: vpsllq $63, %zmm1, %zmm1
1747 ; AVX512F-NEXT: vptestmq %zmm1, %zmm1, %k1
1748 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],mem[2,3,0,1]
1749 ; AVX512F-NEXT: retq
1751 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem_mask:
1752 ; AVX512F-32: # %bb.0:
1753 ; AVX512F-32-NEXT: vpmovsxwq %xmm1, %zmm1
1754 ; AVX512F-32-NEXT: vpsllq $63, %zmm1, %zmm1
1755 ; AVX512F-32-NEXT: vptestmq %zmm1, %zmm1, %k1
1756 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1757 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} = zmm0[0,1,4,5],mem[2,3,0,1]
1758 ; AVX512F-32-NEXT: retl
1759 %x1 = load <8 x double>,ptr%ptr,align 1
1760 %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>
1761 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> %x
1762 ret <8 x double> %res
1765 define <8 x double> @test_vshuff64x2_512_mem_maskz(<8 x double> %x, ptr%ptr, <8 x i1> %mask) nounwind {
1766 ; AVX512F-LABEL: test_vshuff64x2_512_mem_maskz:
1768 ; AVX512F-NEXT: vpmovsxwq %xmm1, %zmm1
1769 ; AVX512F-NEXT: vpsllq $63, %zmm1, %zmm1
1770 ; AVX512F-NEXT: vptestmq %zmm1, %zmm1, %k1
1771 ; AVX512F-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],mem[2,3,0,1]
1772 ; AVX512F-NEXT: retq
1774 ; AVX512F-32-LABEL: test_vshuff64x2_512_mem_maskz:
1775 ; AVX512F-32: # %bb.0:
1776 ; AVX512F-32-NEXT: vpmovsxwq %xmm1, %zmm1
1777 ; AVX512F-32-NEXT: vpsllq $63, %zmm1, %zmm1
1778 ; AVX512F-32-NEXT: vptestmq %zmm1, %zmm1, %k1
1779 ; AVX512F-32-NEXT: movl {{[0-9]+}}(%esp), %eax
1780 ; AVX512F-32-NEXT: vshuff64x2 {{.*#+}} zmm0 {%k1} {z} = zmm0[0,1,4,5],mem[2,3,0,1]
1781 ; AVX512F-32-NEXT: retl
1782 %x1 = load <8 x double>,ptr%ptr,align 1
1783 %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>
1784 %res = select <8 x i1> %mask, <8 x double> %y, <8 x double> zeroinitializer
1785 ret <8 x double> %res
1788 define <8 x double> @shuffle_v8f64_23014567(<8 x double> %a0, <8 x double> %a1) {
1789 ; ALL-LABEL: shuffle_v8f64_23014567:
1791 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[2,3,0,1,4,5,6,7]
1792 ; ALL-NEXT: ret{{[l|q]}}
1793 %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>
1797 define <8 x double> @shuffle_v8f64_2301uu67(<8 x double> %a0, <8 x double> %a1) {
1798 ; ALL-LABEL: shuffle_v8f64_2301uu67:
1800 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[2,3,0,1,4,5,6,7]
1801 ; ALL-NEXT: ret{{[l|q]}}
1802 %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>
1806 define <8 x double> @shuffle_v8f64_2301uuuu(<8 x double> %a0, <8 x double> %a1) {
1807 ; ALL-LABEL: shuffle_v8f64_2301uuuu:
1809 ; ALL-NEXT: vpermpd {{.*#+}} ymm0 = ymm1[2,3,0,1]
1810 ; ALL-NEXT: ret{{[l|q]}}
1811 %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>
1815 define <8 x double> @shuffle_v8f64_uuu2301(<8 x double> %a0, <8 x double> %a1) {
1816 ; ALL-LABEL: shuffle_v8f64_uuu2301:
1818 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm1[0,1,2,3,2,3,0,1]
1819 ; ALL-NEXT: ret{{[l|q]}}
1820 %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>
1824 define <8 x i64> @shuffle_v8i64_0zzzzzzz(<8 x i64> %a) {
1825 ; ALL-LABEL: shuffle_v8i64_0zzzzzzz:
1827 ; ALL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1828 ; ALL-NEXT: ret{{[l|q]}}
1829 %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>
1830 ret <8 x i64> %shuffle
1833 define <8 x double> @shuffle_v8f64_0zzzzzzz(<8 x double> %a) {
1834 ; ALL-LABEL: shuffle_v8f64_0zzzzzzz:
1836 ; ALL-NEXT: vmovq {{.*#+}} xmm0 = xmm0[0],zero
1837 ; ALL-NEXT: ret{{[l|q]}}
1838 %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>
1839 ret <8 x double> %shuffle
1842 define <8 x i64> @shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b) {
1843 ; ALL-LABEL: shuffle_v8i64_12345678:
1845 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[1,2,3,4,5,6,7],zmm1[0]
1846 ; ALL-NEXT: ret{{[l|q]}}
1847 %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>
1848 ret <8 x i64> %shuffle
1851 define <8 x i64> @shuffle_v8i64_12345670(<8 x i64> %a) {
1852 ; ALL-LABEL: shuffle_v8i64_12345670:
1854 ; ALL-NEXT: valignq {{.*#+}} zmm0 = zmm0[1,2,3,4,5,6,7,0]
1855 ; ALL-NEXT: ret{{[l|q]}}
1856 %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>
1857 ret <8 x i64> %shuffle
1860 define <8 x i64> @mask_shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b, <8 x i64> %passthru, i8 %mask) {
1861 ; AVX512F-LABEL: mask_shuffle_v8i64_12345678:
1863 ; AVX512F-NEXT: kmovw %edi, %k1
1864 ; AVX512F-NEXT: valignq {{.*#+}} zmm2 {%k1} = zmm0[1,2,3,4,5,6,7],zmm1[0]
1865 ; AVX512F-NEXT: vmovdqa64 %zmm2, %zmm0
1866 ; AVX512F-NEXT: retq
1868 ; AVX512F-32-LABEL: mask_shuffle_v8i64_12345678:
1869 ; AVX512F-32: # %bb.0:
1870 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
1871 ; AVX512F-32-NEXT: kmovw %eax, %k1
1872 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm2 {%k1} = zmm0[1,2,3,4,5,6,7],zmm1[0]
1873 ; AVX512F-32-NEXT: vmovdqa64 %zmm2, %zmm0
1874 ; AVX512F-32-NEXT: retl
1875 %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>
1876 %mask.cast = bitcast i8 %mask to <8 x i1>
1877 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> %passthru
1881 define <8 x i64> @mask_shuffle_v8i64_12345670(<8 x i64> %a, <8 x i64> %passthru, i8 %mask) {
1882 ; AVX512F-LABEL: mask_shuffle_v8i64_12345670:
1884 ; AVX512F-NEXT: kmovw %edi, %k1
1885 ; AVX512F-NEXT: valignq {{.*#+}} zmm1 {%k1} = zmm0[1,2,3,4,5,6,7,0]
1886 ; AVX512F-NEXT: vmovdqa64 %zmm1, %zmm0
1887 ; AVX512F-NEXT: retq
1889 ; AVX512F-32-LABEL: mask_shuffle_v8i64_12345670:
1890 ; AVX512F-32: # %bb.0:
1891 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
1892 ; AVX512F-32-NEXT: kmovw %eax, %k1
1893 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm1 {%k1} = zmm0[1,2,3,4,5,6,7,0]
1894 ; AVX512F-32-NEXT: vmovdqa64 %zmm1, %zmm0
1895 ; AVX512F-32-NEXT: retl
1896 %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>
1897 %mask.cast = bitcast i8 %mask to <8 x i1>
1898 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> %passthru
1902 define <8 x i64> @maskz_shuffle_v8i64_12345678(<8 x i64> %a, <8 x i64> %b, i8 %mask) {
1903 ; AVX512F-LABEL: maskz_shuffle_v8i64_12345678:
1905 ; AVX512F-NEXT: kmovw %edi, %k1
1906 ; AVX512F-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7],zmm1[0]
1907 ; AVX512F-NEXT: retq
1909 ; AVX512F-32-LABEL: maskz_shuffle_v8i64_12345678:
1910 ; AVX512F-32: # %bb.0:
1911 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
1912 ; AVX512F-32-NEXT: kmovw %eax, %k1
1913 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7],zmm1[0]
1914 ; AVX512F-32-NEXT: retl
1915 %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>
1916 %mask.cast = bitcast i8 %mask to <8 x i1>
1917 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> zeroinitializer
1921 define <8 x i64> @maskz_shuffle_v8i64_12345670(<8 x i64> %a, i8 %mask) {
1922 ; AVX512F-LABEL: maskz_shuffle_v8i64_12345670:
1924 ; AVX512F-NEXT: kmovw %edi, %k1
1925 ; AVX512F-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7,0]
1926 ; AVX512F-NEXT: retq
1928 ; AVX512F-32-LABEL: maskz_shuffle_v8i64_12345670:
1929 ; AVX512F-32: # %bb.0:
1930 ; AVX512F-32-NEXT: movzbl {{[0-9]+}}(%esp), %eax
1931 ; AVX512F-32-NEXT: kmovw %eax, %k1
1932 ; AVX512F-32-NEXT: valignq {{.*#+}} zmm0 {%k1} {z} = zmm0[1,2,3,4,5,6,7,0]
1933 ; AVX512F-32-NEXT: retl
1934 %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>
1935 %mask.cast = bitcast i8 %mask to <8 x i1>
1936 %res = select <8 x i1> %mask.cast, <8 x i64> %shuffle, <8 x i64> zeroinitializer
1940 define <8 x double> @shuffle_v8f64_012389AB(<8 x double> %a, <8 x double> %b) {
1941 ; ALL-LABEL: shuffle_v8f64_012389AB:
1943 ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
1944 ; ALL-NEXT: ret{{[l|q]}}
1945 %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>
1946 ret <8 x double> %shuffle
1949 define <8 x double> @shuffle_v8f64_89AB0123(<8 x double> %a, <8 x double> %b) {
1950 ; ALL-LABEL: shuffle_v8f64_89AB0123:
1952 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
1953 ; ALL-NEXT: ret{{[l|q]}}
1954 %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>
1955 ret <8 x double> %shuffle
1958 define <8 x double> @shuffle_v8f64_01230123(<8 x double> %a, <8 x double> %b) {
1959 ; ALL-LABEL: shuffle_v8f64_01230123:
1961 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
1962 ; ALL-NEXT: ret{{[l|q]}}
1963 %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>
1964 ret <8 x double> %shuffle
1967 define <8 x i64> @shuffle_v8i64_012389AB(<8 x i64> %a, <8 x i64> %b) {
1968 ; ALL-LABEL: shuffle_v8i64_012389AB:
1970 ; ALL-NEXT: vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
1971 ; ALL-NEXT: ret{{[l|q]}}
1972 %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>
1973 ret <8 x i64> %shuffle
1976 define <8 x i64> @shuffle_v8i64_89AB0123(<8 x i64> %a, <8 x i64> %b) {
1977 ; ALL-LABEL: shuffle_v8i64_89AB0123:
1979 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
1980 ; ALL-NEXT: ret{{[l|q]}}
1981 %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>
1982 ret <8 x i64> %shuffle
1985 define <8 x i64> @shuffle_v8i64_01230123(<8 x i64> %a, <8 x i64> %b) {
1986 ; ALL-LABEL: shuffle_v8i64_01230123:
1988 ; ALL-NEXT: vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
1989 ; ALL-NEXT: ret{{[l|q]}}
1990 %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>
1991 ret <8 x i64> %shuffle
1994 define <8 x double> @shuffle_v8f64_89234567(<8 x double> %a, <8 x double> %b) {
1995 ; ALL-LABEL: shuffle_v8f64_89234567:
1997 ; ALL-NEXT: vinsertf32x4 $0, %xmm1, %zmm0, %zmm0
1998 ; ALL-NEXT: ret{{[l|q]}}
1999 %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>
2000 ret <8 x double> %shuffle
2003 define <8 x double> @shuffle_v8f64_01894567(<8 x double> %a, <8 x double> %b) {
2004 ; ALL-LABEL: shuffle_v8f64_01894567:
2006 ; ALL-NEXT: vinsertf32x4 $1, %xmm1, %zmm0, %zmm0
2007 ; ALL-NEXT: ret{{[l|q]}}
2008 %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>
2009 ret <8 x double> %shuffle
2012 define <8 x double> @shuffle_v8f64_01238967(<8 x double> %a, <8 x double> %b) {
2013 ; ALL-LABEL: shuffle_v8f64_01238967:
2015 ; ALL-NEXT: vinsertf32x4 $2, %xmm1, %zmm0, %zmm0
2016 ; ALL-NEXT: ret{{[l|q]}}
2017 %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>
2018 ret <8 x double> %shuffle
2021 define <8 x double> @shuffle_v8f64_01234589(<8 x double> %a, <8 x double> %b) {
2022 ; ALL-LABEL: shuffle_v8f64_01234589:
2024 ; ALL-NEXT: vinsertf32x4 $3, %xmm1, %zmm0, %zmm0
2025 ; ALL-NEXT: ret{{[l|q]}}
2026 %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>
2027 ret <8 x double> %shuffle
2030 define <8 x i64> @shuffle_v8i64_89234567(<8 x i64> %a, <8 x i64> %b) {
2031 ; ALL-LABEL: shuffle_v8i64_89234567:
2033 ; ALL-NEXT: vinsertf32x4 $0, %xmm1, %zmm0, %zmm0
2034 ; ALL-NEXT: ret{{[l|q]}}
2035 %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>
2036 ret <8 x i64> %shuffle
2039 define <8 x i64> @shuffle_v8i64_01894567(<8 x i64> %a, <8 x i64> %b) {
2040 ; ALL-LABEL: shuffle_v8i64_01894567:
2042 ; ALL-NEXT: vinsertf32x4 $1, %xmm1, %zmm0, %zmm0
2043 ; ALL-NEXT: ret{{[l|q]}}
2044 %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>
2045 ret <8 x i64> %shuffle
2048 define <8 x i64> @shuffle_v8i64_01238967(<8 x i64> %a, <8 x i64> %b) {
2049 ; ALL-LABEL: shuffle_v8i64_01238967:
2051 ; ALL-NEXT: vinsertf32x4 $2, %xmm1, %zmm0, %zmm0
2052 ; ALL-NEXT: ret{{[l|q]}}
2053 %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>
2054 ret <8 x i64> %shuffle
2057 define <8 x i64> @shuffle_v8i64_01234589(<8 x i64> %a, <8 x i64> %b) {
2058 ; ALL-LABEL: shuffle_v8i64_01234589:
2060 ; ALL-NEXT: vinsertf32x4 $3, %xmm1, %zmm0, %zmm0
2061 ; ALL-NEXT: ret{{[l|q]}}
2062 %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>
2063 ret <8 x i64> %shuffle
2066 define <8 x i64> @shuffle_v8i64_23uuuuuu(<8 x i64> %a0, <8 x i64> %a1) {
2067 ; ALL-LABEL: shuffle_v8i64_23uuuuuu:
2069 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2070 ; ALL-NEXT: ret{{[l|q]}}
2071 %1 = shufflevector <8 x i64> %a0, <8 x i64> undef, <8 x i32> <i32 2, i32 3, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
2075 define <8 x i64> @shuffle_v8i64_45zzzzzz(<8 x i64> %a0, <8 x i64> %a1) {
2076 ; ALL-LABEL: shuffle_v8i64_45zzzzzz:
2078 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm0
2079 ; ALL-NEXT: ret{{[l|q]}}
2080 %1 = shufflevector <8 x i64> %a0, <8 x i64> zeroinitializer, <8 x i32> <i32 4, i32 5, i32 8, i32 8, i32 8, i32 8, i32 8, i32 8>
2084 define <8 x i64> @shuffle_v8i64_4567uuuu(<8 x i64> %a0, <8 x i64> %a1) {
2085 ; ALL-LABEL: shuffle_v8i64_4567uuuu:
2087 ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0
2088 ; ALL-NEXT: ret{{[l|q]}}
2089 %1 = shufflevector <8 x i64> %a0, <8 x i64> undef, <8 x i32> <i32 4, i32 5, i32 6, i32 7, i32 8, i32 8, i32 8, i32 8>
2093 define <8 x i64> @shuffle_v8i64_uu67zzzz(<8 x i64> %a0, <8 x i64> %a1) {
2094 ; ALL-LABEL: shuffle_v8i64_uu67zzzz:
2096 ; ALL-NEXT: vextractf64x4 $1, %zmm0, %ymm0
2097 ; ALL-NEXT: ret{{[l|q]}}
2098 %1 = shufflevector <8 x i64> %a0, <8 x i64> zeroinitializer, <8 x i32> <i32 undef, i32 undef, i32 6, i32 7, i32 8, i32 8, i32 8, i32 8>
2102 define <8 x double> @shuffle_v4f64_v8f64_22222222(<4 x double> %a) {
2103 ; ALL-LABEL: shuffle_v4f64_v8f64_22222222:
2105 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2106 ; ALL-NEXT: vbroadcastsd %xmm0, %zmm0
2107 ; ALL-NEXT: ret{{[l|q]}}
2108 %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>
2109 ret <8 x double> %shuffle
2112 define <8 x i64> @shuffle_v2i64_v8i64_01010101(<2 x i64> %a) {
2113 ; ALL-LABEL: shuffle_v2i64_v8i64_01010101:
2115 ; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2116 ; ALL-NEXT: vshufi64x2 {{.*#+}} zmm0 = zmm0[0,1,0,1,0,1,0,1]
2117 ; ALL-NEXT: ret{{[l|q]}}
2118 %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>
2119 ret <8 x i64> %shuffle
2122 define <8 x double> @shuffle_v2f64_v8f64_01010101(<2 x double> %a) {
2123 ; ALL-LABEL: shuffle_v2f64_v8f64_01010101:
2125 ; ALL-NEXT: # kill: def $xmm0 killed $xmm0 def $zmm0
2126 ; ALL-NEXT: vshuff64x2 {{.*#+}} zmm0 = zmm0[0,1,0,1,0,1,0,1]
2127 ; ALL-NEXT: ret{{[l|q]}}
2128 %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>
2129 ret <8 x double> %shuffle
2133 define <4 x double> @test_v8f64_2346 (<8 x double> %v) {
2134 ; AVX512F-LABEL: test_v8f64_2346:
2136 ; AVX512F-NEXT: vmovaps {{.*#+}} ymm1 = [2,3,4,6]
2137 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
2138 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2139 ; AVX512F-NEXT: retq
2141 ; AVX512F-32-LABEL: test_v8f64_2346:
2142 ; AVX512F-32: # %bb.0:
2143 ; AVX512F-32-NEXT: vmovaps {{.*#+}} ymm1 = [2,0,3,0,4,0,6,0]
2144 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
2145 ; AVX512F-32-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2146 ; AVX512F-32-NEXT: retl
2147 %res = shufflevector <8 x double> %v, <8 x double> undef, <4 x i32> <i32 2, i32 3, i32 4, i32 6>
2148 ret <4 x double> %res
2152 define <2 x double> @test_v8f64_34 (<8 x double> %v) {
2153 ; AVX512F-LABEL: test_v8f64_34:
2155 ; AVX512F-NEXT: vmovaps {{.*#+}} xmm1 = [3,4]
2156 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
2157 ; AVX512F-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2158 ; AVX512F-NEXT: vzeroupper
2159 ; AVX512F-NEXT: retq
2161 ; AVX512F-32-LABEL: test_v8f64_34:
2162 ; AVX512F-32: # %bb.0:
2163 ; AVX512F-32-NEXT: vmovaps {{.*#+}} xmm1 = [3,0,4,0]
2164 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
2165 ; AVX512F-32-NEXT: # kill: def $xmm0 killed $xmm0 killed $zmm0
2166 ; AVX512F-32-NEXT: vzeroupper
2167 ; AVX512F-32-NEXT: retl
2168 %res = shufflevector <8 x double> %v, <8 x double> undef, <2 x i32> <i32 3, i32 4>
2169 ret <2 x double> %res
2173 define <4 x i64> @test_v8i64_1257 (<8 x i64> %v) {
2174 ; AVX512F-LABEL: test_v8i64_1257:
2176 ; AVX512F-NEXT: vmovaps {{.*#+}} ymm1 = [1,2,5,7]
2177 ; AVX512F-NEXT: vpermpd %zmm0, %zmm1, %zmm0
2178 ; AVX512F-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2179 ; AVX512F-NEXT: retq
2181 ; AVX512F-32-LABEL: test_v8i64_1257:
2182 ; AVX512F-32: # %bb.0:
2183 ; AVX512F-32-NEXT: vmovaps {{.*#+}} ymm1 = [1,0,2,0,5,0,7,0]
2184 ; AVX512F-32-NEXT: vpermpd %zmm0, %zmm1, %zmm0
2185 ; AVX512F-32-NEXT: # kill: def $ymm0 killed $ymm0 killed $zmm0
2186 ; AVX512F-32-NEXT: retl
2187 %res = shufflevector <8 x i64> %v, <8 x i64> undef, <4 x i32> <i32 1, i32 2, i32 5, i32 7>
2191 define <2 x i64> @test_v8i64_2_5 (<8 x i64> %v) {
2192 ; ALL-LABEL: test_v8i64_2_5:
2194 ; ALL-NEXT: vextractf32x4 $2, %zmm0, %xmm1
2195 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
2196 ; ALL-NEXT: vblendps {{.*#+}} xmm0 = xmm0[0,1],xmm1[2,3]
2197 ; ALL-NEXT: vzeroupper
2198 ; ALL-NEXT: ret{{[l|q]}}
2199 %res = shufflevector <8 x i64> %v, <8 x i64> undef, <2 x i32> <i32 2, i32 5>
2203 define <8 x i64> @test_v8i64_insert_zero_128(<8 x i64> %a) {
2204 ; ALL-LABEL: test_v8i64_insert_zero_128:
2206 ; ALL-NEXT: vmovaps %xmm0, %xmm0
2207 ; ALL-NEXT: ret{{[l|q]}}
2208 %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>
2212 define <8 x i64> @test_v8i64_insert_zero_256(<8 x i64> %a) {
2213 ; ALL-LABEL: test_v8i64_insert_zero_256:
2215 ; ALL-NEXT: vmovaps %ymm0, %ymm0
2216 ; ALL-NEXT: ret{{[l|q]}}
2217 %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>