[x86] Teach the new vector shuffle lowering how to lower to UNPCKLPS and
[oota-llvm.git] / test / CodeGen / X86 / vector-shuffle-256-v8.ll
1 ; RUN: llc < %s -mcpu=x86-64 -mattr=+avx -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=AVX1
2 ; RUN: llc < %s -mcpu=x86-64 -mattr=+avx2 -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=AVX2
3
4 target triple = "x86_64-unknown-unknown"
5
6 define <8 x float> @shuffle_v8f32_00000000(<8 x float> %a, <8 x float> %b) {
7 ; ALL-LABEL: @shuffle_v8f32_00000000
8 ; ALL:       # BB#0:
9 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
10 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
11 ; ALL-NEXT:    retq
12   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
13   ret <8 x float> %shuffle
14 }
15
16 define <8 x float> @shuffle_v8f32_00000010(<8 x float> %a, <8 x float> %b) {
17 ; ALL-LABEL: @shuffle_v8f32_00000010
18 ; ALL:       # BB#0:
19 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm0[0,0,0,0]
20 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,0,1,0]
21 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
22 ; ALL-NEXT:    retq
23   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 0>
24   ret <8 x float> %shuffle
25 }
26
27 define <8 x float> @shuffle_v8f32_00000200(<8 x float> %a, <8 x float> %b) {
28 ; ALL-LABEL: @shuffle_v8f32_00000200
29 ; ALL:       # BB#0:
30 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm0[0,0,0,0]
31 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,2,0,0]
32 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
33 ; ALL-NEXT:    retq
34   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 0, i32 2, i32 0, i32 0>
35   ret <8 x float> %shuffle
36 }
37
38 define <8 x float> @shuffle_v8f32_00003000(<8 x float> %a, <8 x float> %b) {
39 ; ALL-LABEL: @shuffle_v8f32_00003000
40 ; ALL:       # BB#0:
41 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm0[0,0,0,0]
42 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[3,0,0,0]
43 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
44 ; ALL-NEXT:    retq
45   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 3, i32 0, i32 0, i32 0>
46   ret <8 x float> %shuffle
47 }
48
49 define <8 x float> @shuffle_v8f32_00040000(<8 x float> %a, <8 x float> %b) {
50 ; ALL-LABEL: @shuffle_v8f32_00040000
51 ; ALL:       # BB#0:
52 ; ALL-NEXT:    vextractf128 $1, %ymm0, %xmm1
53 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm1[0,0],xmm0[0,0]
54 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm0[0,0],xmm1[2,0]
55 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
56 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
57 ; ALL-NEXT:    retq
58   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 4, i32 0, i32 0, i32 0, i32 0>
59   ret <8 x float> %shuffle
60 }
61
62 define <8 x float> @shuffle_v8f32_00500000(<8 x float> %a, <8 x float> %b) {
63 ; ALL-LABEL: @shuffle_v8f32_00500000
64 ; ALL:       # BB#0:
65 ; ALL-NEXT:    vextractf128 $1, %ymm0, %xmm1
66 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm1[1,0],xmm0[0,0]
67 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm0[0,0],xmm1[0,2]
68 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
69 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
70 ; ALL-NEXT:    retq
71   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 5, i32 0, i32 0, i32 0, i32 0, i32 0>
72   ret <8 x float> %shuffle
73 }
74
75 define <8 x float> @shuffle_v8f32_06000000(<8 x float> %a, <8 x float> %b) {
76 ; ALL-LABEL: @shuffle_v8f32_06000000
77 ; ALL:       # BB#0:
78 ; ALL-NEXT:    vextractf128 $1, %ymm0, %xmm1
79 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm1[2,0],xmm0[0,0]
80 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm1[2,0],xmm0[0,0]
81 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
82 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
83 ; ALL-NEXT:    retq
84   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 6, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
85   ret <8 x float> %shuffle
86 }
87
88 define <8 x float> @shuffle_v8f32_70000000(<8 x float> %a, <8 x float> %b) {
89 ; ALL-LABEL: @shuffle_v8f32_70000000
90 ; ALL:       # BB#0:
91 ; ALL-NEXT:    vextractf128 $1, %ymm0, %xmm1
92 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm1[3,0],xmm0[0,0]
93 ; ALL-NEXT:    vshufps {{.*}} # xmm1 = xmm1[0,2],xmm0[0,0]
94 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
95 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
96 ; ALL-NEXT:    retq
97   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 7, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0>
98   ret <8 x float> %shuffle
99 }
100
101 define <8 x float> @shuffle_v8f32_01014545(<8 x float> %a, <8 x float> %b) {
102 ; ALL-LABEL: @shuffle_v8f32_01014545
103 ; ALL:       # BB#0:
104 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,1,0,1,4,5,4,5]
105 ; ALL-NEXT:    retq
106   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 1, i32 0, i32 1, i32 4, i32 5, i32 4, i32 5>
107   ret <8 x float> %shuffle
108 }
109
110 define <8 x float> @shuffle_v8f32_00112233(<8 x float> %a, <8 x float> %b) {
111 ; ALL-LABEL: @shuffle_v8f32_00112233
112 ; ALL:       # BB#0:
113 ; ALL-NEXT:    vunpcklps {{.*}} # xmm1 = xmm0[0,0,1,1]
114 ; ALL-NEXT:    vunpckhps {{.*}} # xmm0 = xmm0[2,2,3,3]
115 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
116 ; ALL-NEXT:    retq
117   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 1, i32 1, i32 2, i32 2, i32 3, i32 3>
118   ret <8 x float> %shuffle
119 }
120
121 define <8 x float> @shuffle_v8f32_00001111(<8 x float> %a, <8 x float> %b) {
122 ; ALL-LABEL: @shuffle_v8f32_00001111
123 ; ALL:       # BB#0:
124 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm0[0,0,0,0]
125 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[1,1,1,1]
126 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm1, %ymm0
127 ; ALL-NEXT:    retq
128   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1>
129   ret <8 x float> %shuffle
130 }
131
132 define <8 x float> @shuffle_v8f32_81a3c5e7(<8 x float> %a, <8 x float> %b) {
133 ; ALL-LABEL: @shuffle_v8f32_81a3c5e7
134 ; ALL:       # BB#0:
135 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm1[0],ymm0[1],ymm1[2],ymm0[3],ymm1[4],ymm0[5],ymm1[6],ymm0[7]
136 ; ALL-NEXT:    retq
137   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7>
138   ret <8 x float> %shuffle
139 }
140
141 define <8 x float> @shuffle_v8f32_08080808(<8 x float> %a, <8 x float> %b) {
142 ; ALL-LABEL: @shuffle_v8f32_08080808
143 ; ALL:       # BB#0:
144 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm1[0,0,2,0]
145 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,1,0,3]
146 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
147 ; ALL-NEXT:    vinsertf128 $1, %xmm0, %ymm0, %ymm0
148 ; ALL-NEXT:    retq
149   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 0, i32 8, i32 0, i32 8>
150   ret <8 x float> %shuffle
151 }
152
153 define <8 x float> @shuffle_v8f32_08084c4c(<8 x float> %a, <8 x float> %b) {
154 ; ALL-LABEL: @shuffle_v8f32_08084c4c
155 ; ALL:       # BB#0:
156 ; ALL-NEXT:    vpermilps {{.*}} # ymm1 = ymm1[0,0,2,0,4,4,6,4]
157 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,1,0,3,4,5,4,7]
158 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
159 ; ALL-NEXT:    retq
160   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 0, i32 8, i32 4, i32 12, i32 4, i32 12>
161   ret <8 x float> %shuffle
162 }
163
164 define <8 x float> @shuffle_v8f32_8823cc67(<8 x float> %a, <8 x float> %b) {
165 ; ALL-LABEL: @shuffle_v8f32_8823cc67
166 ; ALL:       # BB#0:
167 ; ALL-NEXT:    vpermilps {{.*}} # ymm1 = ymm1[0,0,2,3,4,4,6,7]
168 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
169 ; ALL-NEXT:    retq
170   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 8, i32 8, i32 2, i32 3, i32 12, i32 12, i32 6, i32 7>
171   ret <8 x float> %shuffle
172 }
173
174 define <8 x float> @shuffle_v8f32_9832dc76(<8 x float> %a, <8 x float> %b) {
175 ; ALL-LABEL: @shuffle_v8f32_9832dc76
176 ; ALL:       # BB#0:
177 ; ALL-NEXT:    vpermilps {{.*}} # ymm1 = ymm1[1,0,2,3,5,4,6,7]
178 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,1,3,2,4,5,7,6]
179 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
180 ; ALL-NEXT:    retq
181   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 9, i32 8, i32 3, i32 2, i32 13, i32 12, i32 7, i32 6>
182   ret <8 x float> %shuffle
183 }
184
185 define <8 x float> @shuffle_v8f32_9810dc54(<8 x float> %a, <8 x float> %b) {
186 ; ALL-LABEL: @shuffle_v8f32_9810dc54
187 ; ALL:       # BB#0:
188 ; ALL-NEXT:    vpermilps {{.*}} # ymm1 = ymm1[1,0,2,3,5,4,6,7]
189 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,1,1,0,4,5,5,4]
190 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
191 ; ALL-NEXT:    retq
192   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 9, i32 8, i32 1, i32 0, i32 13, i32 12, i32 5, i32 4>
193   ret <8 x float> %shuffle
194 }
195
196 define <8 x float> @shuffle_v8f32_08194c5d(<8 x float> %a, <8 x float> %b) {
197 ; ALL-LABEL: @shuffle_v8f32_08194c5d
198 ; ALL:       # BB#0:
199 ; ALL-NEXT:    vunpcklps {{.*}} # ymm0 = ymm0[0],ymm1[0],ymm0[1],ymm1[1],ymm0[4],ymm1[4],ymm0[5],ymm1[5]
200 ; ALL-NEXT:    retq
201   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 4, i32 12, i32 5, i32 13>
202   ret <8 x float> %shuffle
203 }
204
205 define <8 x float> @shuffle_v8f32_2a3b6e7f(<8 x float> %a, <8 x float> %b) {
206 ; ALL-LABEL: @shuffle_v8f32_2a3b6e7f
207 ; ALL:       # BB#0:
208 ; ALL-NEXT:    vunpckhps {{.*}} # ymm0 = ymm0[2],ymm1[2],ymm0[3],ymm1[3],ymm0[6],ymm1[6],ymm0[7],ymm1[7]
209 ; ALL-NEXT:    retq
210   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 2, i32 10, i32 3, i32 11, i32 6, i32 14, i32 7, i32 15>
211   ret <8 x float> %shuffle
212 }
213
214 define <8 x float> @shuffle_v8f32_08192a3b(<8 x float> %a, <8 x float> %b) {
215 ; ALL-LABEL: @shuffle_v8f32_08192a3b
216 ; ALL:       # BB#0:
217 ; ALL-NEXT:    vpermilps {{.*}} # xmm2 = xmm1[0,2,2,3]
218 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm0[2,1,3,3]
219 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1],xmm3[2],xmm2[3]
220 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm1[0,0,2,1]
221 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,1,1,3]
222 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
223 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
224 ; ALL-NEXT:    retq
225   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
226   ret <8 x float> %shuffle
227 }
228
229 define <8 x float> @shuffle_v8f32_08991abb(<8 x float> %a, <8 x float> %b) {
230 ; ALL-LABEL: @shuffle_v8f32_08991abb
231 ; ALL:       # BB#0:
232 ; ALL-NEXT:    vpermilps {{.*}} # xmm2 = xmm0[1,1,2,3]
233 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm1[0,2,3,3]
234 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm2[0],xmm3[1,2,3]
235 ; ALL-NEXT:    vunpcklps {{.*}} # xmm1 = xmm1[0,0,1,1]
236 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1,2,3]
237 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
238 ; ALL-NEXT:    retq
239   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 8, i32 9, i32 9, i32 1, i32 10, i32 11, i32 11>
240   ret <8 x float> %shuffle
241 }
242
243 define <8 x float> @shuffle_v8f32_091b2d3f(<8 x float> %a, <8 x float> %b) {
244 ; ALL-LABEL: @shuffle_v8f32_091b2d3f
245 ; ALL:       # BB#0:
246 ; ALL-NEXT:    vextractf128 $1, %ymm1, %xmm2
247 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm0[2,1,3,3]
248 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1],xmm3[2],xmm2[3]
249 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,1,1,3]
250 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
251 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
252 ; ALL-NEXT:    retq
253   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 9, i32 1, i32 11, i32 2, i32 13, i32 3, i32 15>
254   ret <8 x float> %shuffle
255 }
256
257 define <8 x float> @shuffle_v8f32_09ab1def(<8 x float> %a, <8 x float> %b) {
258 ; ALL-LABEL: @shuffle_v8f32_09ab1def
259 ; ALL:       # BB#0:
260 ; ALL-NEXT:    vextractf128 $1, %ymm1, %xmm2
261 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm0[1,1,2,3]
262 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1,2,3]
263 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1,2,3]
264 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
265 ; ALL-NEXT:    retq
266   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 9, i32 10, i32 11, i32 1, i32 13, i32 14, i32 15>
267   ret <8 x float> %shuffle
268 }
269
270 define <8 x float> @shuffle_v8f32_00014445(<8 x float> %a, <8 x float> %b) {
271 ; ALL-LABEL: @shuffle_v8f32_00014445
272 ; ALL:       # BB#0:
273 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,0,1,4,4,4,5]
274 ; ALL-NEXT:    retq
275   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 0, i32 1, i32 4, i32 4, i32 4, i32 5>
276   ret <8 x float> %shuffle
277 }
278
279 define <8 x float> @shuffle_v8f32_00204464(<8 x float> %a, <8 x float> %b) {
280 ; ALL-LABEL: @shuffle_v8f32_00204464
281 ; ALL:       # BB#0:
282 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,2,0,4,4,6,4]
283 ; ALL-NEXT:    retq
284   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 0, i32 4, i32 4, i32 6, i32 4>
285   ret <8 x float> %shuffle
286 }
287
288 define <8 x float> @shuffle_v8f32_03004744(<8 x float> %a, <8 x float> %b) {
289 ; ALL-LABEL: @shuffle_v8f32_03004744
290 ; ALL:       # BB#0:
291 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,3,0,0,4,7,4,4]
292 ; ALL-NEXT:    retq
293   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 3, i32 0, i32 0, i32 4, i32 7, i32 4, i32 4>
294   ret <8 x float> %shuffle
295 }
296
297 define <8 x float> @shuffle_v8f32_10005444(<8 x float> %a, <8 x float> %b) {
298 ; ALL-LABEL: @shuffle_v8f32_10005444
299 ; ALL:       # BB#0:
300 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,0,0,5,4,4,4]
301 ; ALL-NEXT:    retq
302   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 0, i32 0, i32 5, i32 4, i32 4, i32 4>
303   ret <8 x float> %shuffle
304 }
305
306 define <8 x float> @shuffle_v8f32_22006644(<8 x float> %a, <8 x float> %b) {
307 ; ALL-LABEL: @shuffle_v8f32_22006644
308 ; ALL:       # BB#0:
309 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[2,2,0,0,6,6,4,4]
310 ; ALL-NEXT:    retq
311   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 2, i32 2, i32 0, i32 0, i32 6, i32 6, i32 4, i32 4>
312   ret <8 x float> %shuffle
313 }
314
315 define <8 x float> @shuffle_v8f32_33307774(<8 x float> %a, <8 x float> %b) {
316 ; ALL-LABEL: @shuffle_v8f32_33307774
317 ; ALL:       # BB#0:
318 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[3,3,3,0,7,7,7,4]
319 ; ALL-NEXT:    retq
320   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 3, i32 3, i32 3, i32 0, i32 7, i32 7, i32 7, i32 4>
321   ret <8 x float> %shuffle
322 }
323
324 define <8 x float> @shuffle_v8f32_32107654(<8 x float> %a, <8 x float> %b) {
325 ; ALL-LABEL: @shuffle_v8f32_32107654
326 ; ALL:       # BB#0:
327 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[3,2,1,0,7,6,5,4]
328 ; ALL-NEXT:    retq
329   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 3, i32 2, i32 1, i32 0, i32 7, i32 6, i32 5, i32 4>
330   ret <8 x float> %shuffle
331 }
332
333 define <8 x float> @shuffle_v8f32_00234467(<8 x float> %a, <8 x float> %b) {
334 ; ALL-LABEL: @shuffle_v8f32_00234467
335 ; ALL:       # BB#0:
336 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,2,3,4,4,6,7]
337 ; ALL-NEXT:    retq
338   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 3, i32 4, i32 4, i32 6, i32 7>
339   ret <8 x float> %shuffle
340 }
341
342 define <8 x float> @shuffle_v8f32_00224466(<8 x float> %a, <8 x float> %b) {
343 ; ALL-LABEL: @shuffle_v8f32_00224466
344 ; ALL:       # BB#0:
345 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,2,2,4,4,6,6]
346 ; ALL-NEXT:    retq
347   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 0, i32 0, i32 2, i32 2, i32 4, i32 4, i32 6, i32 6>
348   ret <8 x float> %shuffle
349 }
350
351 define <8 x float> @shuffle_v8f32_10325476(<8 x float> %a, <8 x float> %b) {
352 ; ALL-LABEL: @shuffle_v8f32_10325476
353 ; ALL:       # BB#0:
354 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,3,2,5,4,7,6]
355 ; ALL-NEXT:    retq
356   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 3, i32 2, i32 5, i32 4, i32 7, i32 6>
357   ret <8 x float> %shuffle
358 }
359
360 define <8 x float> @shuffle_v8f32_11335577(<8 x float> %a, <8 x float> %b) {
361 ; ALL-LABEL: @shuffle_v8f32_11335577
362 ; ALL:       # BB#0:
363 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,1,3,3,5,5,7,7]
364 ; ALL-NEXT:    retq
365   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 1, i32 3, i32 3, i32 5, i32 5, i32 7, i32 7>
366   ret <8 x float> %shuffle
367 }
368
369 define <8 x float> @shuffle_v8f32_10235467(<8 x float> %a, <8 x float> %b) {
370 ; ALL-LABEL: @shuffle_v8f32_10235467
371 ; ALL:       # BB#0:
372 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,2,3,5,4,6,7]
373 ; ALL-NEXT:    retq
374   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 3, i32 5, i32 4, i32 6, i32 7>
375   ret <8 x float> %shuffle
376 }
377
378 define <8 x float> @shuffle_v8f32_10225466(<8 x float> %a, <8 x float> %b) {
379 ; ALL-LABEL: @shuffle_v8f32_10225466
380 ; ALL:       # BB#0:
381 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,2,2,5,4,6,6]
382 ; ALL-NEXT:    retq
383   %shuffle = shufflevector <8 x float> %a, <8 x float> %b, <8 x i32> <i32 1, i32 0, i32 2, i32 2, i32 5, i32 4, i32 6, i32 6>
384   ret <8 x float> %shuffle
385 }