source: icGREP/icgrep-devel/llvm-3.6.0.src/test/CodeGen/X86/vector-shuffle-512-v8.ll @ 4575

Last change on this file since 4575 was 4574, checked in by cameron, 4 years ago

Updating to LLVM 3.6

File size: 62.7 KB
Line 
1; RUN: llc < %s -mcpu=x86-64 -mattr=+avx512f -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 --check-prefix=AVX512F
2; RUN: llc < %s -mcpu=x86-64 -mattr=+avx512bw -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=AVX512 --check-prefix=AVX512BW
3
4target triple = "x86_64-unknown-unknown"
5
6define <8 x double> @shuffle_v8f64_00000000(<8 x double> %a, <8 x double> %b) {
7; ALL-LABEL: shuffle_v8f64_00000000:
8; ALL:       # BB#0:
9; ALL-NEXT:    vbroadcastsd %xmm0, %zmm0
10; ALL-NEXT:    retq
11  %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>
12  ret <8 x double> %shuffle
13}
14
15define <8 x double> @shuffle_v8f64_00000010(<8 x double> %a, <8 x double> %b) {
16; ALL-LABEL: shuffle_v8f64_00000010:
17; ALL:       # BB#0:
18; ALL-NEXT:    vbroadcastsd %xmm0, %ymm1
19; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,0,1,0]
20; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
21; ALL-NEXT:    retq
22  %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>
23  ret <8 x double> %shuffle
24}
25
26define <8 x double> @shuffle_v8f64_00000200(<8 x double> %a, <8 x double> %b) {
27; ALL-LABEL: shuffle_v8f64_00000200:
28; ALL:       # BB#0:
29; ALL-NEXT:    vbroadcastsd %xmm0, %ymm1
30; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,2,0,0]
31; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
32; ALL-NEXT:    retq
33  %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>
34  ret <8 x double> %shuffle
35}
36
37define <8 x double> @shuffle_v8f64_00003000(<8 x double> %a, <8 x double> %b) {
38; ALL-LABEL: shuffle_v8f64_00003000:
39; ALL:       # BB#0:
40; ALL-NEXT:    vbroadcastsd %xmm0, %ymm1
41; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[3,0,0,0]
42; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
43; ALL-NEXT:    retq
44  %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>
45  ret <8 x double> %shuffle
46}
47
48define <8 x double> @shuffle_v8f64_00040000(<8 x double> %a, <8 x double> %b) {
49; ALL-LABEL: shuffle_v8f64_00040000:
50; ALL:       # BB#0:
51; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
52; ALL-NEXT:    vbroadcastsd %xmm1, %ymm1
53; ALL-NEXT:    vbroadcastsd %xmm0, %ymm0
54; ALL-NEXT:    vblendpd {{.*#+}} ymm1 = ymm0[0,1,2],ymm1[3]
55; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
56; ALL-NEXT:    retq
57  %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>
58  ret <8 x double> %shuffle
59}
60
61define <8 x double> @shuffle_v8f64_00500000(<8 x double> %a, <8 x double> %b) {
62; ALL-LABEL: shuffle_v8f64_00500000:
63; ALL:       # BB#0:
64; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
65; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[0,1,1,3]
66; ALL-NEXT:    vbroadcastsd %xmm0, %ymm0
67; ALL-NEXT:    vblendpd {{.*#+}} ymm1 = ymm0[0,1],ymm1[2],ymm0[3]
68; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
69; ALL-NEXT:    retq
70  %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>
71  ret <8 x double> %shuffle
72}
73
74define <8 x double> @shuffle_v8f64_06000000(<8 x double> %a, <8 x double> %b) {
75; ALL-LABEL: shuffle_v8f64_06000000:
76; ALL:       # BB#0:
77; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
78; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[0,2,2,3]
79; ALL-NEXT:    vbroadcastsd %xmm0, %ymm0
80; ALL-NEXT:    vblendpd {{.*#+}} ymm1 = ymm0[0],ymm1[1],ymm0[2,3]
81; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
82; ALL-NEXT:    retq
83  %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>
84  ret <8 x double> %shuffle
85}
86
87define <8 x double> @shuffle_v8f64_70000000(<8 x double> %a, <8 x double> %b) {
88; ALL-LABEL: shuffle_v8f64_70000000:
89; ALL:       # BB#0:
90; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
91; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[3,1,2,3]
92; ALL-NEXT:    vbroadcastsd %xmm0, %ymm0
93; ALL-NEXT:    vblendpd {{.*#+}} ymm1 = ymm1[0],ymm0[1,2,3]
94; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
95; ALL-NEXT:    retq
96  %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>
97  ret <8 x double> %shuffle
98}
99
100define <8 x double> @shuffle_v8f64_01014545(<8 x double> %a, <8 x double> %b) {
101; ALL-LABEL: shuffle_v8f64_01014545:
102; ALL:       # BB#0:
103; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
104; ALL-NEXT:    vinsertf128 $1, %xmm1, %ymm1, %ymm1
105; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
106; ALL-NEXT:    vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
107; ALL-NEXT:    retq
108  %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>
109  ret <8 x double> %shuffle
110}
111
112define <8 x double> @shuffle_v8f64_00112233(<8 x double> %a, <8 x double> %b) {
113; ALL-LABEL: shuffle_v8f64_00112233:
114; ALL:       # BB#0:
115; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,0,1,1]
116; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,2,3,3]
117; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
118; ALL-NEXT:    retq
119  %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>
120  ret <8 x double> %shuffle
121}
122
123define <8 x double> @shuffle_v8f64_00001111(<8 x double> %a, <8 x double> %b) {
124; ALL-LABEL: shuffle_v8f64_00001111:
125; ALL:       # BB#0:
126; ALL-NEXT:    vbroadcastsd %xmm0, %ymm1
127; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[1,1,1,1]
128; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
129; ALL-NEXT:    retq
130  %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>
131  ret <8 x double> %shuffle
132}
133
134define <8 x double> @shuffle_v8f64_81a3c5e7(<8 x double> %a, <8 x double> %b) {
135; ALL-LABEL: shuffle_v8f64_81a3c5e7:
136; ALL:       # BB#0:
137; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm2
138; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm3
139; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3]
140; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm1[0],ymm0[1],ymm1[2],ymm0[3]
141; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
142; ALL-NEXT:    retq
143  %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>
144  ret <8 x double> %shuffle
145}
146
147define <8 x double> @shuffle_v8f64_08080808(<8 x double> %a, <8 x double> %b) {
148; ALL-LABEL: shuffle_v8f64_08080808:
149; ALL:       # BB#0:
150; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
151; ALL-NEXT:    vbroadcastsd %xmm1, %ymm1
152; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3]
153; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm0, %zmm0
154; ALL-NEXT:    retq
155  %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>
156  ret <8 x double> %shuffle
157}
158
159define <8 x double> @shuffle_v8f64_08084c4c(<8 x double> %a, <8 x double> %b) {
160; ALL-LABEL: shuffle_v8f64_08084c4c:
161; ALL:       # BB#0:
162; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm2
163; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm2, %ymm2
164; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm3
165; ALL-NEXT:    vbroadcastsd %xmm3, %ymm3
166; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm2[0],ymm3[1],ymm2[2],ymm3[3]
167; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
168; ALL-NEXT:    vbroadcastsd %xmm1, %ymm1
169; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3]
170; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
171; ALL-NEXT:    retq
172  %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>
173  ret <8 x double> %shuffle
174}
175
176define <8 x double> @shuffle_v8f64_8823cc67(<8 x double> %a, <8 x double> %b) {
177; ALL-LABEL: shuffle_v8f64_8823cc67:
178; ALL:       # BB#0:
179; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm2
180; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm3
181; ALL-NEXT:    vbroadcastsd %xmm3, %ymm3
182; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3]
183; ALL-NEXT:    vbroadcastsd %xmm1, %ymm1
184; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3]
185; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
186; ALL-NEXT:    retq
187  %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>
188  ret <8 x double> %shuffle
189}
190
191define <8 x double> @shuffle_v8f64_9832dc76(<8 x double> %a, <8 x double> %b) {
192; ALL-LABEL: shuffle_v8f64_9832dc76:
193; ALL:       # BB#0:
194; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm1[0,1],ymm0[2,3]
195; ALL-NEXT:    vpermilpd {{.*#+}} ymm2 = ymm2[1,0,3,2]
196; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
197; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm1
198; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3]
199; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
200; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm2, %zmm0
201; ALL-NEXT:    retq
202  %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>
203  ret <8 x double> %shuffle
204}
205
206define <8 x double> @shuffle_v8f64_9810dc54(<8 x double> %a, <8 x double> %b) {
207; ALL-LABEL: shuffle_v8f64_9810dc54:
208; ALL:       # BB#0:
209; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm2
210; ALL-NEXT:    vpermilpd {{.*#+}} ymm2 = ymm2[1,0,3,2]
211; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm1
212; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
213; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
214; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
215; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm2, %zmm0
216; ALL-NEXT:    retq
217  %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>
218  ret <8 x double> %shuffle
219}
220
221define <8 x double> @shuffle_v8f64_08194c5d(<8 x double> %a, <8 x double> %b) {
222; ALL-LABEL: shuffle_v8f64_08194c5d:
223; ALL:       # BB#0:
224; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm2
225; ALL-NEXT:    vpermpd {{.*#+}} ymm2 = ymm2[0,0,2,1]
226; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm3
227; ALL-NEXT:    vpermpd {{.*#+}} ymm3 = ymm3[0,1,1,3]
228; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3]
229; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[0,0,2,1]
230; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,3]
231; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3]
232; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
233; ALL-NEXT:    retq
234  %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>
235  ret <8 x double> %shuffle
236}
237
238define <8 x double> @shuffle_v8f64_2a3b6e7f(<8 x double> %a, <8 x double> %b) {
239; ALL-LABEL: shuffle_v8f64_2a3b6e7f:
240; ALL:       # BB#0:
241; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm2
242; ALL-NEXT:    vpermpd {{.*#+}} ymm2 = ymm2[0,2,2,3]
243; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm3
244; ALL-NEXT:    vpermpd {{.*#+}} ymm3 = ymm3[2,1,3,3]
245; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3]
246; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[0,2,2,3]
247; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,1,3,3]
248; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3]
249; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
250; ALL-NEXT:    retq
251  %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>
252  ret <8 x double> %shuffle
253}
254
255define <8 x double> @shuffle_v8f64_08192a3b(<8 x double> %a, <8 x double> %b) {
256; ALL-LABEL: shuffle_v8f64_08192a3b:
257; ALL:       # BB#0:
258; ALL-NEXT:    vpermpd {{.*#+}} ymm2 = ymm1[0,2,2,3]
259; ALL-NEXT:    vpermpd {{.*#+}} ymm3 = ymm0[2,1,3,3]
260; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3]
261; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[0,0,2,1]
262; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,3]
263; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3]
264; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
265; ALL-NEXT:    retq
266  %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>
267  ret <8 x double> %shuffle
268}
269
270define <8 x double> @shuffle_v8f64_08991abb(<8 x double> %a, <8 x double> %b) {
271; ALL-LABEL: shuffle_v8f64_08991abb:
272; ALL:       # BB#0:
273; ALL-NEXT:    vpermilpd {{.*#+}} ymm2 = ymm0[1,0,2,2]
274; ALL-NEXT:    vpermpd {{.*#+}} ymm3 = ymm1[0,2,3,3]
275; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm2[0],ymm3[1,2,3]
276; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[0,0,1,1]
277; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3]
278; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
279; ALL-NEXT:    retq
280  %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>
281  ret <8 x double> %shuffle
282}
283
284define <8 x double> @shuffle_v8f64_091b2d3f(<8 x double> %a, <8 x double> %b) {
285; ALL-LABEL: shuffle_v8f64_091b2d3f:
286; ALL:       # BB#0:
287; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm2
288; ALL-NEXT:    vpermpd {{.*#+}} ymm3 = ymm0[2,1,3,3]
289; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1],ymm3[2],ymm2[3]
290; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,3]
291; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3]
292; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
293; ALL-NEXT:    retq
294  %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>
295  ret <8 x double> %shuffle
296}
297
298define <8 x double> @shuffle_v8f64_09ab1def(<8 x double> %a, <8 x double> %b) {
299; ALL-LABEL: shuffle_v8f64_09ab1def:
300; ALL:       # BB#0:
301; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm2
302; ALL-NEXT:    vpermilpd {{.*#+}} ymm3 = ymm0[1,0,2,2]
303; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm3[0],ymm2[1,2,3]
304; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm1[1,2,3]
305; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
306; ALL-NEXT:    retq
307  %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>
308  ret <8 x double> %shuffle
309}
310
311define <8 x double> @shuffle_v8f64_00014445(<8 x double> %a, <8 x double> %b) {
312; ALL-LABEL: shuffle_v8f64_00014445:
313; ALL:       # BB#0:
314; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,0,0,1]
315; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
316; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,0,0,1]
317; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
318; ALL-NEXT:    retq
319  %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>
320  ret <8 x double> %shuffle
321}
322
323define <8 x double> @shuffle_v8f64_00204464(<8 x double> %a, <8 x double> %b) {
324; ALL-LABEL: shuffle_v8f64_00204464:
325; ALL:       # BB#0:
326; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,0,2,0]
327; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
328; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,0,2,0]
329; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
330; ALL-NEXT:    retq
331  %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>
332  ret <8 x double> %shuffle
333}
334
335define <8 x double> @shuffle_v8f64_03004744(<8 x double> %a, <8 x double> %b) {
336; ALL-LABEL: shuffle_v8f64_03004744:
337; ALL:       # BB#0:
338; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,3,0,0]
339; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
340; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,3,0,0]
341; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
342; ALL-NEXT:    retq
343  %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>
344  ret <8 x double> %shuffle
345}
346
347define <8 x double> @shuffle_v8f64_10005444(<8 x double> %a, <8 x double> %b) {
348; ALL-LABEL: shuffle_v8f64_10005444:
349; ALL:       # BB#0:
350; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[1,0,0,0]
351; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
352; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[1,0,0,0]
353; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
354; ALL-NEXT:    retq
355  %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>
356  ret <8 x double> %shuffle
357}
358
359define <8 x double> @shuffle_v8f64_22006644(<8 x double> %a, <8 x double> %b) {
360; ALL-LABEL: shuffle_v8f64_22006644:
361; ALL:       # BB#0:
362; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[2,2,0,0]
363; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
364; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,2,0,0]
365; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
366; ALL-NEXT:    retq
367  %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>
368  ret <8 x double> %shuffle
369}
370
371define <8 x double> @shuffle_v8f64_33307774(<8 x double> %a, <8 x double> %b) {
372; ALL-LABEL: shuffle_v8f64_33307774:
373; ALL:       # BB#0:
374; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[3,3,3,0]
375; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
376; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[3,3,3,0]
377; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
378; ALL-NEXT:    retq
379  %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>
380  ret <8 x double> %shuffle
381}
382
383define <8 x double> @shuffle_v8f64_32107654(<8 x double> %a, <8 x double> %b) {
384; ALL-LABEL: shuffle_v8f64_32107654:
385; ALL:       # BB#0:
386; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[3,2,1,0]
387; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
388; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[3,2,1,0]
389; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
390; ALL-NEXT:    retq
391  %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>
392  ret <8 x double> %shuffle
393}
394
395define <8 x double> @shuffle_v8f64_00234467(<8 x double> %a, <8 x double> %b) {
396; ALL-LABEL: shuffle_v8f64_00234467:
397; ALL:       # BB#0:
398; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,3]
399; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
400; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[0,0,2,3]
401; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
402; ALL-NEXT:    retq
403  %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>
404  ret <8 x double> %shuffle
405}
406
407define <8 x double> @shuffle_v8f64_00224466(<8 x double> %a, <8 x double> %b) {
408; ALL-LABEL: shuffle_v8f64_00224466:
409; ALL:       # BB#0:
410; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,2]
411; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
412; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[0,0,2,2]
413; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
414; ALL-NEXT:    retq
415  %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>
416  ret <8 x double> %shuffle
417}
418
419define <8 x double> @shuffle_v8f64_10325476(<8 x double> %a, <8 x double> %b) {
420; ALL-LABEL: shuffle_v8f64_10325476:
421; ALL:       # BB#0:
422; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,0,3,2]
423; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
424; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[1,0,3,2]
425; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
426; ALL-NEXT:    retq
427  %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>
428  ret <8 x double> %shuffle
429}
430
431define <8 x double> @shuffle_v8f64_11335577(<8 x double> %a, <8 x double> %b) {
432; ALL-LABEL: shuffle_v8f64_11335577:
433; ALL:       # BB#0:
434; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,1,3,3]
435; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
436; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[1,1,3,3]
437; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
438; ALL-NEXT:    retq
439  %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>
440  ret <8 x double> %shuffle
441}
442
443define <8 x double> @shuffle_v8f64_10235467(<8 x double> %a, <8 x double> %b) {
444; ALL-LABEL: shuffle_v8f64_10235467:
445; ALL:       # BB#0:
446; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,0,2,3]
447; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
448; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[1,0,2,3]
449; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
450; ALL-NEXT:    retq
451  %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>
452  ret <8 x double> %shuffle
453}
454
455define <8 x double> @shuffle_v8f64_10225466(<8 x double> %a, <8 x double> %b) {
456; ALL-LABEL: shuffle_v8f64_10225466:
457; ALL:       # BB#0:
458; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,0,2,2]
459; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
460; ALL-NEXT:    vpermilpd {{.*#+}} ymm0 = ymm0[1,0,2,2]
461; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
462; ALL-NEXT:    retq
463  %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>
464  ret <8 x double> %shuffle
465}
466
467define <8 x double> @shuffle_v8f64_00015444(<8 x double> %a, <8 x double> %b) {
468; ALL-LABEL: shuffle_v8f64_00015444:
469; ALL:       # BB#0:
470; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,0,0,1]
471; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
472; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[1,0,0,0]
473; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
474; ALL-NEXT:    retq
475  %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>
476  ret <8 x double> %shuffle
477}
478
479define <8 x double> @shuffle_v8f64_00204644(<8 x double> %a, <8 x double> %b) {
480; ALL-LABEL: shuffle_v8f64_00204644:
481; ALL:       # BB#0:
482; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,0,2,0]
483; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
484; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,2,0,0]
485; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
486; ALL-NEXT:    retq
487  %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>
488  ret <8 x double> %shuffle
489}
490
491define <8 x double> @shuffle_v8f64_03004474(<8 x double> %a, <8 x double> %b) {
492; ALL-LABEL: shuffle_v8f64_03004474:
493; ALL:       # BB#0:
494; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[0,3,0,0]
495; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
496; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,0,3,0]
497; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
498; ALL-NEXT:    retq
499  %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>
500  ret <8 x double> %shuffle
501}
502
503define <8 x double> @shuffle_v8f64_10004444(<8 x double> %a, <8 x double> %b) {
504; ALL-LABEL: shuffle_v8f64_10004444:
505; ALL:       # BB#0:
506; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[1,0,0,0]
507; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
508; ALL-NEXT:    vbroadcastsd %xmm0, %ymm0
509; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
510; ALL-NEXT:    retq
511  %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>
512  ret <8 x double> %shuffle
513}
514
515define <8 x double> @shuffle_v8f64_22006446(<8 x double> %a, <8 x double> %b) {
516; ALL-LABEL: shuffle_v8f64_22006446:
517; ALL:       # BB#0:
518; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[2,2,0,0]
519; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
520; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,0,0,2]
521; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
522; ALL-NEXT:    retq
523  %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>
524  ret <8 x double> %shuffle
525}
526
527define <8 x double> @shuffle_v8f64_33307474(<8 x double> %a, <8 x double> %b) {
528; ALL-LABEL: shuffle_v8f64_33307474:
529; ALL:       # BB#0:
530; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[3,3,3,0]
531; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
532; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[3,0,3,0]
533; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
534; ALL-NEXT:    retq
535  %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>
536  ret <8 x double> %shuffle
537}
538
539define <8 x double> @shuffle_v8f64_32104567(<8 x double> %a, <8 x double> %b) {
540; ALL-LABEL: shuffle_v8f64_32104567:
541; ALL:       # BB#0:
542; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm0[3,2,1,0]
543; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
544; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
545; ALL-NEXT:    retq
546  %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>
547  ret <8 x double> %shuffle
548}
549
550define <8 x double> @shuffle_v8f64_00236744(<8 x double> %a, <8 x double> %b) {
551; ALL-LABEL: shuffle_v8f64_00236744:
552; ALL:       # BB#0:
553; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,3]
554; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
555; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,3,0,0]
556; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
557; ALL-NEXT:    retq
558  %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>
559  ret <8 x double> %shuffle
560}
561
562define <8 x double> @shuffle_v8f64_00226644(<8 x double> %a, <8 x double> %b) {
563; ALL-LABEL: shuffle_v8f64_00226644:
564; ALL:       # BB#0:
565; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,2]
566; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
567; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,2,0,0]
568; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
569; ALL-NEXT:    retq
570  %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>
571  ret <8 x double> %shuffle
572}
573
574define <8 x double> @shuffle_v8f64_10324567(<8 x double> %a, <8 x double> %b) {
575; ALL-LABEL: shuffle_v8f64_10324567:
576; ALL:       # BB#0:
577; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,0,3,2]
578; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
579; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
580; ALL-NEXT:    retq
581  %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>
582  ret <8 x double> %shuffle
583}
584
585define <8 x double> @shuffle_v8f64_11334567(<8 x double> %a, <8 x double> %b) {
586; ALL-LABEL: shuffle_v8f64_11334567:
587; ALL:       # BB#0:
588; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,1,3,3]
589; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
590; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
591; ALL-NEXT:    retq
592  %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>
593  ret <8 x double> %shuffle
594}
595
596define <8 x double> @shuffle_v8f64_01235467(<8 x double> %a, <8 x double> %b) {
597; ALL-LABEL: shuffle_v8f64_01235467:
598; ALL:       # BB#0:
599; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
600; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm1[1,0,2,3]
601; ALL-NEXT:    vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
602; ALL-NEXT:    retq
603  %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>
604  ret <8 x double> %shuffle
605}
606
607define <8 x double> @shuffle_v8f64_01235466(<8 x double> %a, <8 x double> %b) {
608; ALL-LABEL: shuffle_v8f64_01235466:
609; ALL:       # BB#0:
610; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
611; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm1[1,0,2,2]
612; ALL-NEXT:    vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
613; ALL-NEXT:    retq
614  %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>
615  ret <8 x double> %shuffle
616}
617
618define <8 x double> @shuffle_v8f64_002u6u44(<8 x double> %a, <8 x double> %b) {
619; ALL-LABEL: shuffle_v8f64_002u6u44:
620; ALL:       # BB#0:
621; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[0,0,2,2]
622; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
623; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,1,0,0]
624; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
625; ALL-NEXT:    retq
626  %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>
627  ret <8 x double> %shuffle
628}
629
630define <8 x double> @shuffle_v8f64_00uu66uu(<8 x double> %a, <8 x double> %b) {
631; ALL-LABEL: shuffle_v8f64_00uu66uu:
632; ALL:       # BB#0:
633; ALL-NEXT:    vbroadcastsd %xmm0, %ymm1
634; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
635; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[2,2,2,3]
636; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
637; ALL-NEXT:    retq
638  %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>
639  ret <8 x double> %shuffle
640}
641
642define <8 x double> @shuffle_v8f64_103245uu(<8 x double> %a, <8 x double> %b) {
643; ALL-LABEL: shuffle_v8f64_103245uu:
644; ALL:       # BB#0:
645; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,0,3,2]
646; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
647; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
648; ALL-NEXT:    retq
649  %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>
650  ret <8 x double> %shuffle
651}
652
653define <8 x double> @shuffle_v8f64_1133uu67(<8 x double> %a, <8 x double> %b) {
654; ALL-LABEL: shuffle_v8f64_1133uu67:
655; ALL:       # BB#0:
656; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm0[1,1,3,3]
657; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm0
658; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm1, %zmm0
659; ALL-NEXT:    retq
660  %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>
661  ret <8 x double> %shuffle
662}
663
664define <8 x double> @shuffle_v8f64_0uu354uu(<8 x double> %a, <8 x double> %b) {
665; ALL-LABEL: shuffle_v8f64_0uu354uu:
666; ALL:       # BB#0:
667; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
668; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm1[1,0,2,2]
669; ALL-NEXT:    vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
670; ALL-NEXT:    retq
671  %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>
672  ret <8 x double> %shuffle
673}
674
675define <8 x double> @shuffle_v8f64_uuu3uu66(<8 x double> %a, <8 x double> %b) {
676; ALL-LABEL: shuffle_v8f64_uuu3uu66:
677; ALL:       # BB#0:
678; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm1
679; ALL-NEXT:    vpermilpd {{.*#+}} ymm1 = ymm1[0,0,2,2]
680; ALL-NEXT:    vinsertf64x4 $1, %ymm1, %zmm0, %zmm0
681; ALL-NEXT:    retq
682  %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>
683  ret <8 x double> %shuffle
684}
685
686define <8 x double> @shuffle_v8f64_c348cda0(<8 x double> %a, <8 x double> %b) {
687; ALL-LABEL: shuffle_v8f64_c348cda0:
688; ALL:       # BB#0:
689; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm2
690; ALL-NEXT:    vperm2f128 {{.*#+}} ymm2 = ymm0[0,1],ymm2[0,1]
691; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm3
692; ALL-NEXT:    vbroadcastsd %xmm1, %ymm4
693; ALL-NEXT:    vblendpd {{.*#+}} ymm4 = ymm3[0,1,2],ymm4[3]
694; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm4[0],ymm2[1,2],ymm4[3]
695; ALL-NEXT:    vblendpd {{.*#+}} ymm1 = ymm3[0,1],ymm1[2],ymm3[3]
696; ALL-NEXT:    vbroadcastsd %xmm0, %ymm0
697; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm1[0,1,2],ymm0[3]
698; ALL-NEXT:    vinsertf64x4 $1, %ymm0, %zmm2, %zmm0
699; ALL-NEXT:    retq
700  %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>
701  ret <8 x double> %shuffle
702}
703
704define <8 x double> @shuffle_v8f64_f511235a(<8 x double> %a, <8 x double> %b) {
705; ALL-LABEL: shuffle_v8f64_f511235a:
706; ALL:       # BB#0:
707; ALL-NEXT:    vperm2f128 {{.*#+}} ymm2 = ymm0[2,3,0,1]
708; ALL-NEXT:    vextractf64x4 $1, %zmm0, %ymm3
709; ALL-NEXT:    vpermpd {{.*#+}} ymm4 = ymm3[0,1,1,3]
710; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm2[0,1],ymm4[2],ymm2[3]
711; ALL-NEXT:    vpermilpd {{.*#+}} ymm4 = ymm1[0,0,2,2]
712; ALL-NEXT:    vblendpd {{.*#+}} ymm2 = ymm2[0,1,2],ymm4[3]
713; ALL-NEXT:    vpermpd {{.*#+}} ymm0 = ymm0[0,1,1,1]
714; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm0[0],ymm3[1],ymm0[2,3]
715; ALL-NEXT:    vextractf64x4 $1, %zmm1, %ymm1
716; ALL-NEXT:    vpermpd {{.*#+}} ymm1 = ymm1[3,1,2,3]
717; ALL-NEXT:    vblendpd {{.*#+}} ymm0 = ymm1[0],ymm0[1,2,3]
718; ALL-NEXT:    vinsertf64x4 $1, %ymm2, %zmm0, %zmm0
719; ALL-NEXT:    retq
720  %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>
721  ret <8 x double> %shuffle
722}
723
724define <8 x i64> @shuffle_v8i64_00000000(<8 x i64> %a, <8 x i64> %b) {
725; ALL-LABEL: shuffle_v8i64_00000000:
726; ALL:       # BB#0:
727; ALL-NEXT:    vpbroadcastq %xmm0, %zmm0
728; ALL-NEXT:    retq
729  %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>
730  ret <8 x i64> %shuffle
731}
732
733define <8 x i64> @shuffle_v8i64_00000010(<8 x i64> %a, <8 x i64> %b) {
734; ALL-LABEL: shuffle_v8i64_00000010:
735; ALL:       # BB#0:
736; ALL-NEXT:    vpbroadcastq %xmm0, %ymm1
737; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,0,1,0]
738; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
739; ALL-NEXT:    retq
740  %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>
741  ret <8 x i64> %shuffle
742}
743
744define <8 x i64> @shuffle_v8i64_00000200(<8 x i64> %a, <8 x i64> %b) {
745; ALL-LABEL: shuffle_v8i64_00000200:
746; ALL:       # BB#0:
747; ALL-NEXT:    vpbroadcastq %xmm0, %ymm1
748; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,2,0,0]
749; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
750; ALL-NEXT:    retq
751  %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>
752  ret <8 x i64> %shuffle
753}
754
755define <8 x i64> @shuffle_v8i64_00003000(<8 x i64> %a, <8 x i64> %b) {
756; ALL-LABEL: shuffle_v8i64_00003000:
757; ALL:       # BB#0:
758; ALL-NEXT:    vpbroadcastq %xmm0, %ymm1
759; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[3,0,0,0]
760; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
761; ALL-NEXT:    retq
762  %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>
763  ret <8 x i64> %shuffle
764}
765
766define <8 x i64> @shuffle_v8i64_00040000(<8 x i64> %a, <8 x i64> %b) {
767; ALL-LABEL: shuffle_v8i64_00040000:
768; ALL:       # BB#0:
769; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
770; ALL-NEXT:    vpbroadcastq %xmm1, %ymm1
771; ALL-NEXT:    vpbroadcastq %xmm0, %ymm0
772; ALL-NEXT:    vpblendd {{.*#+}} ymm1 = ymm0[0,1,2,3,4,5],ymm1[6,7]
773; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
774; ALL-NEXT:    retq
775  %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>
776  ret <8 x i64> %shuffle
777}
778
779define <8 x i64> @shuffle_v8i64_00500000(<8 x i64> %a, <8 x i64> %b) {
780; ALL-LABEL: shuffle_v8i64_00500000:
781; ALL:       # BB#0:
782; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
783; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[0,1,1,3]
784; ALL-NEXT:    vpbroadcastq %xmm0, %ymm0
785; ALL-NEXT:    vpblendd {{.*#+}} ymm1 = ymm0[0,1,2,3],ymm1[4,5],ymm0[6,7]
786; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
787; ALL-NEXT:    retq
788  %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>
789  ret <8 x i64> %shuffle
790}
791
792define <8 x i64> @shuffle_v8i64_06000000(<8 x i64> %a, <8 x i64> %b) {
793; ALL-LABEL: shuffle_v8i64_06000000:
794; ALL:       # BB#0:
795; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
796; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[0,2,2,3]
797; ALL-NEXT:    vpbroadcastq %xmm0, %ymm0
798; ALL-NEXT:    vpblendd {{.*#+}} ymm1 = ymm0[0,1],ymm1[2,3],ymm0[4,5,6,7]
799; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
800; ALL-NEXT:    retq
801  %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>
802  ret <8 x i64> %shuffle
803}
804
805define <8 x i64> @shuffle_v8i64_70000000(<8 x i64> %a, <8 x i64> %b) {
806; ALL-LABEL: shuffle_v8i64_70000000:
807; ALL:       # BB#0:
808; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
809; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[3,1,2,3]
810; ALL-NEXT:    vpbroadcastq %xmm0, %ymm0
811; ALL-NEXT:    vpblendd {{.*#+}} ymm1 = ymm1[0,1],ymm0[2,3,4,5,6,7]
812; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
813; ALL-NEXT:    retq
814  %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>
815  ret <8 x i64> %shuffle
816}
817
818define <8 x i64> @shuffle_v8i64_01014545(<8 x i64> %a, <8 x i64> %b) {
819; ALL-LABEL: shuffle_v8i64_01014545:
820; ALL:       # BB#0:
821; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
822; ALL-NEXT:    vinserti128 $1, %xmm1, %ymm1, %ymm1
823; ALL-NEXT:    vinserti128 $1, %xmm0, %ymm0, %ymm0
824; ALL-NEXT:    vinserti64x4 $1, %ymm1, %zmm0, %zmm0
825; ALL-NEXT:    retq
826  %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>
827  ret <8 x i64> %shuffle
828}
829
830define <8 x i64> @shuffle_v8i64_00112233(<8 x i64> %a, <8 x i64> %b) {
831; ALL-LABEL: shuffle_v8i64_00112233:
832; ALL:       # BB#0:
833; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,1,1]
834; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,2,3,3]
835; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
836; ALL-NEXT:    retq
837  %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>
838  ret <8 x i64> %shuffle
839}
840
841define <8 x i64> @shuffle_v8i64_00001111(<8 x i64> %a, <8 x i64> %b) {
842; ALL-LABEL: shuffle_v8i64_00001111:
843; ALL:       # BB#0:
844; ALL-NEXT:    vpbroadcastq %xmm0, %ymm1
845; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[1,1,1,1]
846; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
847; ALL-NEXT:    retq
848  %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>
849  ret <8 x i64> %shuffle
850}
851
852define <8 x i64> @shuffle_v8i64_81a3c5e7(<8 x i64> %a, <8 x i64> %b) {
853; ALL-LABEL: shuffle_v8i64_81a3c5e7:
854; ALL:       # BB#0:
855; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm2
856; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm3
857; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7]
858; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
859; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
860; ALL-NEXT:    retq
861  %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>
862  ret <8 x i64> %shuffle
863}
864
865define <8 x i64> @shuffle_v8i64_08080808(<8 x i64> %a, <8 x i64> %b) {
866; ALL-LABEL: shuffle_v8i64_08080808:
867; ALL:       # BB#0:
868; ALL-NEXT:    vinserti128 $1, %xmm0, %ymm0, %ymm0
869; ALL-NEXT:    vpbroadcastq %xmm1, %ymm1
870; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7]
871; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm0, %zmm0
872; ALL-NEXT:    retq
873  %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>
874  ret <8 x i64> %shuffle
875}
876
877define <8 x i64> @shuffle_v8i64_08084c4c(<8 x i64> %a, <8 x i64> %b) {
878; ALL-LABEL: shuffle_v8i64_08084c4c:
879; ALL:       # BB#0:
880; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm2
881; ALL-NEXT:    vinserti128 $1, %xmm2, %ymm2, %ymm2
882; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm3
883; ALL-NEXT:    vpbroadcastq %xmm3, %ymm3
884; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm2[0,1],ymm3[2,3],ymm2[4,5],ymm3[6,7]
885; ALL-NEXT:    vinserti128 $1, %xmm0, %ymm0, %ymm0
886; ALL-NEXT:    vpbroadcastq %xmm1, %ymm1
887; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7]
888; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
889; ALL-NEXT:    retq
890  %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>
891  ret <8 x i64> %shuffle
892}
893
894define <8 x i64> @shuffle_v8i64_8823cc67(<8 x i64> %a, <8 x i64> %b) {
895; ALL-LABEL: shuffle_v8i64_8823cc67:
896; ALL:       # BB#0:
897; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm2
898; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm3
899; ALL-NEXT:    vpbroadcastq %xmm3, %ymm3
900; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1,2,3],ymm2[4,5,6,7]
901; ALL-NEXT:    vpbroadcastq %xmm1, %ymm1
902; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7]
903; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
904; ALL-NEXT:    retq
905  %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>
906  ret <8 x i64> %shuffle
907}
908
909define <8 x i64> @shuffle_v8i64_9832dc76(<8 x i64> %a, <8 x i64> %b) {
910; ALL-LABEL: shuffle_v8i64_9832dc76:
911; ALL:       # BB#0:
912; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm1[0,1,2,3],ymm0[4,5,6,7]
913; ALL-NEXT:    vpshufd {{.*#+}} ymm2 = ymm2[2,3,0,1,6,7,4,5]
914; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
915; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm1
916; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm1[0,1,2,3],ymm0[4,5,6,7]
917; ALL-NEXT:    vpshufd {{.*#+}} ymm0 = ymm0[2,3,0,1,6,7,4,5]
918; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm2, %zmm0
919; ALL-NEXT:    retq
920  %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>
921  ret <8 x i64> %shuffle
922}
923
924define <8 x i64> @shuffle_v8i64_9810dc54(<8 x i64> %a, <8 x i64> %b) {
925; ALL-LABEL: shuffle_v8i64_9810dc54:
926; ALL:       # BB#0:
927; ALL-NEXT:    vinserti128 $1, %xmm0, %ymm1, %ymm2
928; ALL-NEXT:    vpshufd {{.*#+}} ymm2 = ymm2[2,3,0,1,6,7,4,5]
929; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm1
930; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
931; ALL-NEXT:    vinserti128 $1, %xmm0, %ymm1, %ymm0
932; ALL-NEXT:    vpshufd {{.*#+}} ymm0 = ymm0[2,3,0,1,6,7,4,5]
933; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm2, %zmm0
934; ALL-NEXT:    retq
935  %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>
936  ret <8 x i64> %shuffle
937}
938
939define <8 x i64> @shuffle_v8i64_08194c5d(<8 x i64> %a, <8 x i64> %b) {
940; ALL-LABEL: shuffle_v8i64_08194c5d:
941; ALL:       # BB#0:
942; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm2
943; ALL-NEXT:    vpermq {{.*#+}} ymm2 = ymm2[0,0,2,1]
944; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm3
945; ALL-NEXT:    vpermq {{.*#+}} ymm3 = ymm3[0,1,1,3]
946; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7]
947; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[0,0,2,1]
948; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,1,1,3]
949; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7]
950; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
951; ALL-NEXT:    retq
952  %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>
953  ret <8 x i64> %shuffle
954}
955
956define <8 x i64> @shuffle_v8i64_2a3b6e7f(<8 x i64> %a, <8 x i64> %b) {
957; ALL-LABEL: shuffle_v8i64_2a3b6e7f:
958; ALL:       # BB#0:
959; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm2
960; ALL-NEXT:    vpermq {{.*#+}} ymm2 = ymm2[0,2,2,3]
961; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm3
962; ALL-NEXT:    vpermq {{.*#+}} ymm3 = ymm3[2,1,3,3]
963; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7]
964; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[0,2,2,3]
965; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,1,3,3]
966; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7]
967; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
968; ALL-NEXT:    retq
969  %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>
970  ret <8 x i64> %shuffle
971}
972
973define <8 x i64> @shuffle_v8i64_08192a3b(<8 x i64> %a, <8 x i64> %b) {
974; ALL-LABEL: shuffle_v8i64_08192a3b:
975; ALL:       # BB#0:
976; ALL-NEXT:    vpermq {{.*#+}} ymm2 = ymm1[0,2,2,3]
977; ALL-NEXT:    vpermq {{.*#+}} ymm3 = ymm0[2,1,3,3]
978; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7]
979; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[0,0,2,1]
980; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,1,1,3]
981; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7]
982; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
983; ALL-NEXT:    retq
984  %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>
985  ret <8 x i64> %shuffle
986}
987
988define <8 x i64> @shuffle_v8i64_08991abb(<8 x i64> %a, <8 x i64> %b) {
989; ALL-LABEL: shuffle_v8i64_08991abb:
990; ALL:       # BB#0:
991; ALL-NEXT:    vpshufd {{.*#+}} ymm2 = ymm0[2,3,2,3,6,7,6,7]
992; ALL-NEXT:    vpermq {{.*#+}} ymm3 = ymm1[0,2,3,3]
993; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm2[0,1],ymm3[2,3,4,5,6,7]
994; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[0,0,1,1]
995; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3,4,5,6,7]
996; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
997; ALL-NEXT:    retq
998  %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>
999  ret <8 x i64> %shuffle
1000}
1001
1002define <8 x i64> @shuffle_v8i64_091b2d3f(<8 x i64> %a, <8 x i64> %b) {
1003; ALL-LABEL: shuffle_v8i64_091b2d3f:
1004; ALL:       # BB#0:
1005; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm2
1006; ALL-NEXT:    vpermq {{.*#+}} ymm3 = ymm0[2,1,3,3]
1007; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3],ymm3[4,5],ymm2[6,7]
1008; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,1,1,3]
1009; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3],ymm0[4,5],ymm1[6,7]
1010; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
1011; ALL-NEXT:    retq
1012  %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>
1013  ret <8 x i64> %shuffle
1014}
1015
1016define <8 x i64> @shuffle_v8i64_09ab1def(<8 x i64> %a, <8 x i64> %b) {
1017; ALL-LABEL: shuffle_v8i64_09ab1def:
1018; ALL:       # BB#0:
1019; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm2
1020; ALL-NEXT:    vpshufd {{.*#+}} ymm3 = ymm0[2,3,2,3,6,7,6,7]
1021; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm3[0,1],ymm2[2,3,4,5,6,7]
1022; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3,4,5,6,7]
1023; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
1024; ALL-NEXT:    retq
1025  %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>
1026  ret <8 x i64> %shuffle
1027}
1028
1029define <8 x i64> @shuffle_v8i64_00014445(<8 x i64> %a, <8 x i64> %b) {
1030; ALL-LABEL: shuffle_v8i64_00014445:
1031; ALL:       # BB#0:
1032; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,0,1]
1033; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1034; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,0,0,1]
1035; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1036; ALL-NEXT:    retq
1037  %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>
1038  ret <8 x i64> %shuffle
1039}
1040
1041define <8 x i64> @shuffle_v8i64_00204464(<8 x i64> %a, <8 x i64> %b) {
1042; ALL-LABEL: shuffle_v8i64_00204464:
1043; ALL:       # BB#0:
1044; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,2,0]
1045; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1046; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,0,2,0]
1047; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1048; ALL-NEXT:    retq
1049  %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>
1050  ret <8 x i64> %shuffle
1051}
1052
1053define <8 x i64> @shuffle_v8i64_03004744(<8 x i64> %a, <8 x i64> %b) {
1054; ALL-LABEL: shuffle_v8i64_03004744:
1055; ALL:       # BB#0:
1056; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,3,0,0]
1057; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1058; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,3,0,0]
1059; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1060; ALL-NEXT:    retq
1061  %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>
1062  ret <8 x i64> %shuffle
1063}
1064
1065define <8 x i64> @shuffle_v8i64_10005444(<8 x i64> %a, <8 x i64> %b) {
1066; ALL-LABEL: shuffle_v8i64_10005444:
1067; ALL:       # BB#0:
1068; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[1,0,0,0]
1069; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1070; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[1,0,0,0]
1071; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1072; ALL-NEXT:    retq
1073  %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>
1074  ret <8 x i64> %shuffle
1075}
1076
1077define <8 x i64> @shuffle_v8i64_22006644(<8 x i64> %a, <8 x i64> %b) {
1078; ALL-LABEL: shuffle_v8i64_22006644:
1079; ALL:       # BB#0:
1080; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[2,2,0,0]
1081; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1082; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,2,0,0]
1083; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1084; ALL-NEXT:    retq
1085  %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>
1086  ret <8 x i64> %shuffle
1087}
1088
1089define <8 x i64> @shuffle_v8i64_33307774(<8 x i64> %a, <8 x i64> %b) {
1090; ALL-LABEL: shuffle_v8i64_33307774:
1091; ALL:       # BB#0:
1092; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[3,3,3,0]
1093; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1094; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[3,3,3,0]
1095; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1096; ALL-NEXT:    retq
1097  %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>
1098  ret <8 x i64> %shuffle
1099}
1100
1101define <8 x i64> @shuffle_v8i64_32107654(<8 x i64> %a, <8 x i64> %b) {
1102; ALL-LABEL: shuffle_v8i64_32107654:
1103; ALL:       # BB#0:
1104; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[3,2,1,0]
1105; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1106; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[3,2,1,0]
1107; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1108; ALL-NEXT:    retq
1109  %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>
1110  ret <8 x i64> %shuffle
1111}
1112
1113define <8 x i64> @shuffle_v8i64_00234467(<8 x i64> %a, <8 x i64> %b) {
1114; ALL-LABEL: shuffle_v8i64_00234467:
1115; ALL:       # BB#0:
1116; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,2,3]
1117; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1118; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,0,2,3]
1119; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1120; ALL-NEXT:    retq
1121  %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>
1122  ret <8 x i64> %shuffle
1123}
1124
1125define <8 x i64> @shuffle_v8i64_00224466(<8 x i64> %a, <8 x i64> %b) {
1126; ALL-LABEL: shuffle_v8i64_00224466:
1127; ALL:       # BB#0:
1128; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[0,1,0,1,4,5,4,5]
1129; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1130; ALL-NEXT:    vpshufd {{.*#+}} ymm0 = ymm0[0,1,0,1,4,5,4,5]
1131; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1132; ALL-NEXT:    retq
1133  %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>
1134  ret <8 x i64> %shuffle
1135}
1136
1137define <8 x i64> @shuffle_v8i64_10325476(<8 x i64> %a, <8 x i64> %b) {
1138; ALL-LABEL: shuffle_v8i64_10325476:
1139; ALL:       # BB#0:
1140; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[2,3,0,1,6,7,4,5]
1141; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1142; ALL-NEXT:    vpshufd {{.*#+}} ymm0 = ymm0[2,3,0,1,6,7,4,5]
1143; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1144; ALL-NEXT:    retq
1145  %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>
1146  ret <8 x i64> %shuffle
1147}
1148
1149define <8 x i64> @shuffle_v8i64_11335577(<8 x i64> %a, <8 x i64> %b) {
1150; ALL-LABEL: shuffle_v8i64_11335577:
1151; ALL:       # BB#0:
1152; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[2,3,2,3,6,7,6,7]
1153; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1154; ALL-NEXT:    vpshufd {{.*#+}} ymm0 = ymm0[2,3,2,3,6,7,6,7]
1155; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1156; ALL-NEXT:    retq
1157  %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>
1158  ret <8 x i64> %shuffle
1159}
1160
1161define <8 x i64> @shuffle_v8i64_10235467(<8 x i64> %a, <8 x i64> %b) {
1162; ALL-LABEL: shuffle_v8i64_10235467:
1163; ALL:       # BB#0:
1164; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[1,0,2,3]
1165; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1166; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[1,0,2,3]
1167; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1168; ALL-NEXT:    retq
1169  %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>
1170  ret <8 x i64> %shuffle
1171}
1172
1173define <8 x i64> @shuffle_v8i64_10225466(<8 x i64> %a, <8 x i64> %b) {
1174; ALL-LABEL: shuffle_v8i64_10225466:
1175; ALL:       # BB#0:
1176; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[1,0,2,2]
1177; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1178; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[1,0,2,2]
1179; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1180; ALL-NEXT:    retq
1181  %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>
1182  ret <8 x i64> %shuffle
1183}
1184
1185define <8 x i64> @shuffle_v8i64_00015444(<8 x i64> %a, <8 x i64> %b) {
1186; ALL-LABEL: shuffle_v8i64_00015444:
1187; ALL:       # BB#0:
1188; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,0,1]
1189; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1190; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[1,0,0,0]
1191; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1192; ALL-NEXT:    retq
1193  %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>
1194  ret <8 x i64> %shuffle
1195}
1196
1197define <8 x i64> @shuffle_v8i64_00204644(<8 x i64> %a, <8 x i64> %b) {
1198; ALL-LABEL: shuffle_v8i64_00204644:
1199; ALL:       # BB#0:
1200; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,2,0]
1201; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1202; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,2,0,0]
1203; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1204; ALL-NEXT:    retq
1205  %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>
1206  ret <8 x i64> %shuffle
1207}
1208
1209define <8 x i64> @shuffle_v8i64_03004474(<8 x i64> %a, <8 x i64> %b) {
1210; ALL-LABEL: shuffle_v8i64_03004474:
1211; ALL:       # BB#0:
1212; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,3,0,0]
1213; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1214; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[0,0,3,0]
1215; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1216; ALL-NEXT:    retq
1217  %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>
1218  ret <8 x i64> %shuffle
1219}
1220
1221define <8 x i64> @shuffle_v8i64_10004444(<8 x i64> %a, <8 x i64> %b) {
1222; ALL-LABEL: shuffle_v8i64_10004444:
1223; ALL:       # BB#0:
1224; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[1,0,0,0]
1225; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1226; ALL-NEXT:    vpbroadcastq %xmm0, %ymm0
1227; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1228; ALL-NEXT:    retq
1229  %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>
1230  ret <8 x i64> %shuffle
1231}
1232
1233define <8 x i64> @shuffle_v8i64_22006446(<8 x i64> %a, <8 x i64> %b) {
1234; ALL-LABEL: shuffle_v8i64_22006446:
1235; ALL:       # BB#0:
1236; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[2,2,0,0]
1237; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1238; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,0,0,2]
1239; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1240; ALL-NEXT:    retq
1241  %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>
1242  ret <8 x i64> %shuffle
1243}
1244
1245define <8 x i64> @shuffle_v8i64_33307474(<8 x i64> %a, <8 x i64> %b) {
1246; ALL-LABEL: shuffle_v8i64_33307474:
1247; ALL:       # BB#0:
1248; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[3,3,3,0]
1249; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1250; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[3,0,3,0]
1251; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1252; ALL-NEXT:    retq
1253  %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>
1254  ret <8 x i64> %shuffle
1255}
1256
1257define <8 x i64> @shuffle_v8i64_32104567(<8 x i64> %a, <8 x i64> %b) {
1258; ALL-LABEL: shuffle_v8i64_32104567:
1259; ALL:       # BB#0:
1260; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[3,2,1,0]
1261; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1262; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1263; ALL-NEXT:    retq
1264  %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>
1265  ret <8 x i64> %shuffle
1266}
1267
1268define <8 x i64> @shuffle_v8i64_00236744(<8 x i64> %a, <8 x i64> %b) {
1269; ALL-LABEL: shuffle_v8i64_00236744:
1270; ALL:       # BB#0:
1271; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm0[0,0,2,3]
1272; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1273; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,3,0,0]
1274; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1275; ALL-NEXT:    retq
1276  %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>
1277  ret <8 x i64> %shuffle
1278}
1279
1280define <8 x i64> @shuffle_v8i64_00226644(<8 x i64> %a, <8 x i64> %b) {
1281; ALL-LABEL: shuffle_v8i64_00226644:
1282; ALL:       # BB#0:
1283; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[0,1,0,1,4,5,4,5]
1284; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1285; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,2,0,0]
1286; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1287; ALL-NEXT:    retq
1288  %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>
1289  ret <8 x i64> %shuffle
1290}
1291
1292define <8 x i64> @shuffle_v8i64_10324567(<8 x i64> %a, <8 x i64> %b) {
1293; ALL-LABEL: shuffle_v8i64_10324567:
1294; ALL:       # BB#0:
1295; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[2,3,0,1,6,7,4,5]
1296; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1297; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1298; ALL-NEXT:    retq
1299  %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>
1300  ret <8 x i64> %shuffle
1301}
1302
1303define <8 x i64> @shuffle_v8i64_11334567(<8 x i64> %a, <8 x i64> %b) {
1304; ALL-LABEL: shuffle_v8i64_11334567:
1305; ALL:       # BB#0:
1306; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[2,3,2,3,6,7,6,7]
1307; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1308; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1309; ALL-NEXT:    retq
1310  %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>
1311  ret <8 x i64> %shuffle
1312}
1313
1314define <8 x i64> @shuffle_v8i64_01235467(<8 x i64> %a, <8 x i64> %b) {
1315; ALL-LABEL: shuffle_v8i64_01235467:
1316; ALL:       # BB#0:
1317; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
1318; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[1,0,2,3]
1319; ALL-NEXT:    vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1320; ALL-NEXT:    retq
1321  %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>
1322  ret <8 x i64> %shuffle
1323}
1324
1325define <8 x i64> @shuffle_v8i64_01235466(<8 x i64> %a, <8 x i64> %b) {
1326; ALL-LABEL: shuffle_v8i64_01235466:
1327; ALL:       # BB#0:
1328; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
1329; ALL-NEXT:    vpermq {{.*#+}} ymm1 = ymm1[1,0,2,2]
1330; ALL-NEXT:    vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1331; ALL-NEXT:    retq
1332  %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>
1333  ret <8 x i64> %shuffle
1334}
1335
1336define <8 x i64> @shuffle_v8i64_002u6u44(<8 x i64> %a, <8 x i64> %b) {
1337; ALL-LABEL: shuffle_v8i64_002u6u44:
1338; ALL:       # BB#0:
1339; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[0,1,0,1,4,5,4,5]
1340; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1341; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,1,0,0]
1342; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1343; ALL-NEXT:    retq
1344  %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>
1345  ret <8 x i64> %shuffle
1346}
1347
1348define <8 x i64> @shuffle_v8i64_00uu66uu(<8 x i64> %a, <8 x i64> %b) {
1349; ALL-LABEL: shuffle_v8i64_00uu66uu:
1350; ALL:       # BB#0:
1351; ALL-NEXT:    vpbroadcastq %xmm0, %ymm1
1352; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1353; ALL-NEXT:    vpermq {{.*#+}} ymm0 = ymm0[2,2,2,3]
1354; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1355; ALL-NEXT:    retq
1356  %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>
1357  ret <8 x i64> %shuffle
1358}
1359
1360define <8 x i64> @shuffle_v8i64_103245uu(<8 x i64> %a, <8 x i64> %b) {
1361; ALL-LABEL: shuffle_v8i64_103245uu:
1362; ALL:       # BB#0:
1363; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[2,3,0,1,6,7,4,5]
1364; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1365; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1366; ALL-NEXT:    retq
1367  %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>
1368  ret <8 x i64> %shuffle
1369}
1370
1371define <8 x i64> @shuffle_v8i64_1133uu67(<8 x i64> %a, <8 x i64> %b) {
1372; ALL-LABEL: shuffle_v8i64_1133uu67:
1373; ALL:       # BB#0:
1374; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm0[2,3,2,3,6,7,6,7]
1375; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1376; ALL-NEXT:    vinserti64x4 $1, %ymm0, %zmm1, %zmm0
1377; ALL-NEXT:    retq
1378  %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>
1379  ret <8 x i64> %shuffle
1380}
1381
1382define <8 x i64> @shuffle_v8i64_0uu354uu(<8 x i64> %a, <8 x i64> %b) {
1383; ALL-LABEL: shuffle_v8i64_0uu354uu:
1384; ALL:       # BB#0:
1385; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
1386; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm1[2,3,0,1,6,7,4,5]
1387; ALL-NEXT:    vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1388; ALL-NEXT:    retq
1389  %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>
1390  ret <8 x i64> %shuffle
1391}
1392
1393define <8 x i64> @shuffle_v8i64_uuu3uu66(<8 x i64> %a, <8 x i64> %b) {
1394; ALL-LABEL: shuffle_v8i64_uuu3uu66:
1395; ALL:       # BB#0:
1396; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm1
1397; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm1[0,1,0,1,4,5,4,5]
1398; ALL-NEXT:    vinserti64x4 $1, %ymm1, %zmm0, %zmm0
1399; ALL-NEXT:    retq
1400  %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>
1401  ret <8 x i64> %shuffle
1402}
1403
1404define <8 x i64> @shuffle_v8i64_6caa87e5(<8 x i64> %a, <8 x i64> %b) {
1405; ALL-LABEL: shuffle_v8i64_6caa87e5:
1406; ALL:       # BB#0:
1407; ALL-NEXT:    vextracti64x4 $1, %zmm0, %ymm0
1408; ALL-NEXT:    vperm2i128 {{.*#+}} ymm2 = ymm0[0,1,0,1]
1409; ALL-NEXT:    vextracti64x4 $1, %zmm1, %ymm3
1410; ALL-NEXT:    vpblendd {{.*#+}} ymm4 = ymm1[0,1,2,3],ymm3[4,5],ymm1[6,7]
1411; ALL-NEXT:    vpblendd {{.*#+}} ymm2 = ymm4[0,1],ymm2[2,3],ymm4[4,5],ymm2[6,7]
1412; ALL-NEXT:    vperm2i128 {{.*#+}} ymm0 = ymm0[2,3,0,1]
1413; ALL-NEXT:    vpblendd {{.*#+}} ymm1 = ymm3[0,1,2,3],ymm1[4,5,6,7]
1414; ALL-NEXT:    vpshufd {{.*#+}} ymm1 = ymm1[0,1,0,1,4,5,4,5]
1415; ALL-NEXT:    vpblendd {{.*#+}} ymm0 = ymm0[0,1],ymm1[2,3,4,5,6,7]
1416; ALL-NEXT:    vinserti64x4 $1, %ymm2, %zmm0, %zmm0
1417; ALL-NEXT:    retq
1418  %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>
1419  ret <8 x i64> %shuffle
1420}
1421
1422define <8 x double> @shuffle_v8f64_082a4c6e(<8 x double> %a, <8 x double> %b) {
1423; ALL-LABEL: shuffle_v8f64_082a4c6e:
1424; ALL:       # BB#0:
1425; ALL-NEXT:    vunpcklpd {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1426; ALL-NEXT:    retq
1427  %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>
1428  ret <8 x double> %shuffle
1429}
1430
1431define <8 x i64> @shuffle_v8i64_082a4c6e(<8 x i64> %a, <8 x i64> %b) {
1432; ALL-LABEL: shuffle_v8i64_082a4c6e:
1433; ALL:       # BB#0:
1434; ALL-NEXT:    vpunpcklqdq {{.*#+}} zmm0 = zmm0[0],zmm1[0],zmm0[2],zmm1[2],zmm0[4],zmm1[4],zmm0[6],zmm1[6]
1435; ALL-NEXT:    retq
1436  %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>
1437  ret <8 x i64> %shuffle
1438}
1439
1440define <8 x double> @shuffle_v8f64_193b5d7f(<8 x double> %a, <8 x double> %b) {
1441; ALL-LABEL: shuffle_v8f64_193b5d7f:
1442; ALL:       # BB#0:
1443; ALL-NEXT:    vunpckhpd {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1444; ALL-NEXT:    retq
1445  %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>
1446  ret <8 x double> %shuffle
1447}
1448
1449define <8 x i64> @shuffle_v8i64_193b5d7f(<8 x i64> %a, <8 x i64> %b) {
1450; ALL-LABEL: shuffle_v8i64_193b5d7f:
1451; ALL:       # BB#0:
1452; ALL-NEXT:    vpunpckhqdq {{.*#+}} zmm0 = zmm0[1],zmm1[1],zmm0[3],zmm1[3],zmm0[5],zmm1[5],zmm0[7],zmm1[7]
1453; ALL-NEXT:    retq
1454  %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>
1455  ret <8 x i64> %shuffle
1456}
Note: See TracBrowser for help on using the repository browser.