[x86] Add test cases for UNPCK instructions with v8f32 AVX vectors in
[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:    vpermilps {{.*}} # ymm1 = ymm1[0,0,2,1,4,4,6,5]
200 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,1,1,3,4,5,5,7]
201 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
202 ; ALL-NEXT:    retq
203   %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>
204   ret <8 x float> %shuffle
205 }
206
207 define <8 x float> @shuffle_v8f32_2a3b6e7f(<8 x float> %a, <8 x float> %b) {
208 ; ALL-LABEL: @shuffle_v8f32_2a3b6e7f
209 ; ALL:       # BB#0:
210 ; ALL-NEXT:    vpermilps {{.*}} # ymm1 = ymm1[0,2,2,3,4,6,6,7]
211 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[2,1,3,3,6,5,7,7]
212 ; ALL-NEXT:    vblendps {{.*}} # ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
213 ; ALL-NEXT:    retq
214   %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>
215   ret <8 x float> %shuffle
216 }
217
218 define <8 x float> @shuffle_v8f32_08192a3b(<8 x float> %a, <8 x float> %b) {
219 ; ALL-LABEL: @shuffle_v8f32_08192a3b
220 ; ALL:       # BB#0:
221 ; ALL-NEXT:    vpermilps {{.*}} # xmm2 = xmm1[0,2,2,3]
222 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm0[2,1,3,3]
223 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1],xmm3[2],xmm2[3]
224 ; ALL-NEXT:    vpermilps {{.*}} # xmm1 = xmm1[0,0,2,1]
225 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,1,1,3]
226 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
227 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
228 ; ALL-NEXT:    retq
229   %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>
230   ret <8 x float> %shuffle
231 }
232
233 define <8 x float> @shuffle_v8f32_08991abb(<8 x float> %a, <8 x float> %b) {
234 ; ALL-LABEL: @shuffle_v8f32_08991abb
235 ; ALL:       # BB#0:
236 ; ALL-NEXT:    vpermilps {{.*}} # xmm2 = xmm0[1,1,2,3]
237 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm1[0,2,3,3]
238 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm2[0],xmm3[1,2,3]
239 ; ALL-NEXT:    vunpcklps {{.*}} # xmm1 = xmm1[0,0,1,1]
240 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1,2,3]
241 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
242 ; ALL-NEXT:    retq
243   %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>
244   ret <8 x float> %shuffle
245 }
246
247 define <8 x float> @shuffle_v8f32_091b2d3f(<8 x float> %a, <8 x float> %b) {
248 ; ALL-LABEL: @shuffle_v8f32_091b2d3f
249 ; ALL:       # BB#0:
250 ; ALL-NEXT:    vextractf128 $1, %ymm1, %xmm2
251 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm0[2,1,3,3]
252 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1],xmm3[2],xmm2[3]
253 ; ALL-NEXT:    vpermilps {{.*}} # xmm0 = xmm0[0,1,1,3]
254 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
255 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
256 ; ALL-NEXT:    retq
257   %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>
258   ret <8 x float> %shuffle
259 }
260
261 define <8 x float> @shuffle_v8f32_09ab1def(<8 x float> %a, <8 x float> %b) {
262 ; ALL-LABEL: @shuffle_v8f32_09ab1def
263 ; ALL:       # BB#0:
264 ; ALL-NEXT:    vextractf128 $1, %ymm1, %xmm2
265 ; ALL-NEXT:    vpermilps {{.*}} # xmm3 = xmm0[1,1,2,3]
266 ; ALL-NEXT:    vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1,2,3]
267 ; ALL-NEXT:    vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1,2,3]
268 ; ALL-NEXT:    vinsertf128 $1, %xmm2, %ymm0, %ymm0
269 ; ALL-NEXT:    retq
270   %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>
271   ret <8 x float> %shuffle
272 }
273
274 define <8 x float> @shuffle_v8f32_00014445(<8 x float> %a, <8 x float> %b) {
275 ; ALL-LABEL: @shuffle_v8f32_00014445
276 ; ALL:       # BB#0:
277 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,0,1,4,4,4,5]
278 ; ALL-NEXT:    retq
279   %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>
280   ret <8 x float> %shuffle
281 }
282
283 define <8 x float> @shuffle_v8f32_00204464(<8 x float> %a, <8 x float> %b) {
284 ; ALL-LABEL: @shuffle_v8f32_00204464
285 ; ALL:       # BB#0:
286 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,2,0,4,4,6,4]
287 ; ALL-NEXT:    retq
288   %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>
289   ret <8 x float> %shuffle
290 }
291
292 define <8 x float> @shuffle_v8f32_03004744(<8 x float> %a, <8 x float> %b) {
293 ; ALL-LABEL: @shuffle_v8f32_03004744
294 ; ALL:       # BB#0:
295 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,3,0,0,4,7,4,4]
296 ; ALL-NEXT:    retq
297   %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>
298   ret <8 x float> %shuffle
299 }
300
301 define <8 x float> @shuffle_v8f32_10005444(<8 x float> %a, <8 x float> %b) {
302 ; ALL-LABEL: @shuffle_v8f32_10005444
303 ; ALL:       # BB#0:
304 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,0,0,5,4,4,4]
305 ; ALL-NEXT:    retq
306   %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>
307   ret <8 x float> %shuffle
308 }
309
310 define <8 x float> @shuffle_v8f32_22006644(<8 x float> %a, <8 x float> %b) {
311 ; ALL-LABEL: @shuffle_v8f32_22006644
312 ; ALL:       # BB#0:
313 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[2,2,0,0,6,6,4,4]
314 ; ALL-NEXT:    retq
315   %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>
316   ret <8 x float> %shuffle
317 }
318
319 define <8 x float> @shuffle_v8f32_33307774(<8 x float> %a, <8 x float> %b) {
320 ; ALL-LABEL: @shuffle_v8f32_33307774
321 ; ALL:       # BB#0:
322 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[3,3,3,0,7,7,7,4]
323 ; ALL-NEXT:    retq
324   %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>
325   ret <8 x float> %shuffle
326 }
327
328 define <8 x float> @shuffle_v8f32_32107654(<8 x float> %a, <8 x float> %b) {
329 ; ALL-LABEL: @shuffle_v8f32_32107654
330 ; ALL:       # BB#0:
331 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[3,2,1,0,7,6,5,4]
332 ; ALL-NEXT:    retq
333   %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>
334   ret <8 x float> %shuffle
335 }
336
337 define <8 x float> @shuffle_v8f32_00234467(<8 x float> %a, <8 x float> %b) {
338 ; ALL-LABEL: @shuffle_v8f32_00234467
339 ; ALL:       # BB#0:
340 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,2,3,4,4,6,7]
341 ; ALL-NEXT:    retq
342   %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>
343   ret <8 x float> %shuffle
344 }
345
346 define <8 x float> @shuffle_v8f32_00224466(<8 x float> %a, <8 x float> %b) {
347 ; ALL-LABEL: @shuffle_v8f32_00224466
348 ; ALL:       # BB#0:
349 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[0,0,2,2,4,4,6,6]
350 ; ALL-NEXT:    retq
351   %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>
352   ret <8 x float> %shuffle
353 }
354
355 define <8 x float> @shuffle_v8f32_10325476(<8 x float> %a, <8 x float> %b) {
356 ; ALL-LABEL: @shuffle_v8f32_10325476
357 ; ALL:       # BB#0:
358 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,3,2,5,4,7,6]
359 ; ALL-NEXT:    retq
360   %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>
361   ret <8 x float> %shuffle
362 }
363
364 define <8 x float> @shuffle_v8f32_11335577(<8 x float> %a, <8 x float> %b) {
365 ; ALL-LABEL: @shuffle_v8f32_11335577
366 ; ALL:       # BB#0:
367 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,1,3,3,5,5,7,7]
368 ; ALL-NEXT:    retq
369   %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>
370   ret <8 x float> %shuffle
371 }
372
373 define <8 x float> @shuffle_v8f32_10235467(<8 x float> %a, <8 x float> %b) {
374 ; ALL-LABEL: @shuffle_v8f32_10235467
375 ; ALL:       # BB#0:
376 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,2,3,5,4,6,7]
377 ; ALL-NEXT:    retq
378   %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>
379   ret <8 x float> %shuffle
380 }
381
382 define <8 x float> @shuffle_v8f32_10225466(<8 x float> %a, <8 x float> %b) {
383 ; ALL-LABEL: @shuffle_v8f32_10225466
384 ; ALL:       # BB#0:
385 ; ALL-NEXT:    vpermilps {{.*}} # ymm0 = ymm0[1,0,2,2,5,4,6,6]
386 ; ALL-NEXT:    retq
387   %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>
388   ret <8 x float> %shuffle
389 }