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
4 target triple = "x86_64-unknown-unknown"
6 define <8 x float> @shuffle_v8f32_00000000(<8 x float> %a, <8 x float> %b) {
7 ; ALL-LABEL: @shuffle_v8f32_00000000
9 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,0,0]
10 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
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
16 define <8 x float> @shuffle_v8f32_00000010(<8 x float> %a, <8 x float> %b) {
17 ; ALL-LABEL: @shuffle_v8f32_00000010
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
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
27 define <8 x float> @shuffle_v8f32_00000200(<8 x float> %a, <8 x float> %b) {
28 ; ALL-LABEL: @shuffle_v8f32_00000200
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
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
38 define <8 x float> @shuffle_v8f32_00003000(<8 x float> %a, <8 x float> %b) {
39 ; ALL-LABEL: @shuffle_v8f32_00003000
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
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
49 define <8 x float> @shuffle_v8f32_00040000(<8 x float> %a, <8 x float> %b) {
50 ; ALL-LABEL: @shuffle_v8f32_00040000
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
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
62 define <8 x float> @shuffle_v8f32_00500000(<8 x float> %a, <8 x float> %b) {
63 ; ALL-LABEL: @shuffle_v8f32_00500000
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
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
75 define <8 x float> @shuffle_v8f32_06000000(<8 x float> %a, <8 x float> %b) {
76 ; ALL-LABEL: @shuffle_v8f32_06000000
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
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
88 define <8 x float> @shuffle_v8f32_70000000(<8 x float> %a, <8 x float> %b) {
89 ; ALL-LABEL: @shuffle_v8f32_70000000
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
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
101 define <8 x float> @shuffle_v8f32_01014545(<8 x float> %a, <8 x float> %b) {
102 ; ALL-LABEL: @shuffle_v8f32_01014545
104 ; ALL-NEXT: vunpcklpd {{.*}} # xmm1 = xmm0[0,0]
105 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
106 ; ALL-NEXT: vunpcklpd {{.*}} # xmm0 = xmm0[0,0]
107 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
109 %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>
110 ret <8 x float> %shuffle
113 define <8 x float> @shuffle_v8f32_00112233(<8 x float> %a, <8 x float> %b) {
114 ; ALL-LABEL: @shuffle_v8f32_00112233
116 ; ALL-NEXT: vunpcklps {{.*}} # xmm1 = xmm0[0,0,1,1]
117 ; ALL-NEXT: vunpckhps {{.*}} # xmm0 = xmm0[2,2,3,3]
118 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
120 %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>
121 ret <8 x float> %shuffle
124 define <8 x float> @shuffle_v8f32_00001111(<8 x float> %a, <8 x float> %b) {
125 ; ALL-LABEL: @shuffle_v8f32_00001111
127 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,0,0]
128 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,1,1,1]
129 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
131 %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>
132 ret <8 x float> %shuffle
135 define <8 x float> @shuffle_v8f32_81a3c5e7(<8 x float> %a, <8 x float> %b) {
136 ; ALL-LABEL: @shuffle_v8f32_81a3c5e7
138 ; ALL-NEXT: vblendps {{.*}} # ymm0 = ymm1[0],ymm0[1],ymm1[2],ymm0[3],ymm1[4],ymm0[5],ymm1[6],ymm0[7]
140 %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>
141 ret <8 x float> %shuffle
144 define <8 x float> @shuffle_v8f32_08080808(<8 x float> %a, <8 x float> %b) {
145 ; ALL-LABEL: @shuffle_v8f32_08080808
147 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[0,0,2,0]
148 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,1,0,3]
149 ; ALL-NEXT: vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
150 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm0, %ymm0
152 %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>
153 ret <8 x float> %shuffle
156 define <8 x float> @shuffle_v8f32_08084c4c(<8 x float> %a, <8 x float> %b) {
157 ; ALL-LABEL: @shuffle_v8f32_08084c4c
159 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm1[0,0,2,0]
160 ; ALL-NEXT: vextractf128 $1, %ymm1, %xmm1
161 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[0,0,2,0]
162 ; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm2, %ymm1
163 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm0[0,1,0,3]
164 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
165 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,1,0,3]
166 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm2, %ymm0
167 ; ALL-NEXT: vblendps {{.*}} # ymm0 = ymm0[0],ymm1[1],ymm0[2],ymm1[3],ymm0[4],ymm1[5],ymm0[6],ymm1[7]
169 %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>
170 ret <8 x float> %shuffle
173 define <8 x float> @shuffle_v8f32_8823cc67(<8 x float> %a, <8 x float> %b) {
174 ; ALL-LABEL: @shuffle_v8f32_8823cc67
176 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm1[0,0,2,3]
177 ; ALL-NEXT: vextractf128 $1, %ymm1, %xmm1
178 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[0,0,2,3]
179 ; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm2, %ymm1
180 ; ALL-NEXT: vblendps {{.*}} # ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
182 %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>
183 ret <8 x float> %shuffle
186 define <8 x float> @shuffle_v8f32_9832dc76(<8 x float> %a, <8 x float> %b) {
187 ; ALL-LABEL: @shuffle_v8f32_9832dc76
189 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm1[1,0,2,3]
190 ; ALL-NEXT: vextractf128 $1, %ymm1, %xmm1
191 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[1,0,2,3]
192 ; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm2, %ymm1
193 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm0[0,1,3,2]
194 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
195 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,1,3,2]
196 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm2, %ymm0
197 ; ALL-NEXT: vblendps {{.*}} # ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
199 %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>
200 ret <8 x float> %shuffle
203 define <8 x float> @shuffle_v8f32_9810dc54(<8 x float> %a, <8 x float> %b) {
204 ; ALL-LABEL: @shuffle_v8f32_9810dc54
206 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm1[1,0,2,3]
207 ; ALL-NEXT: vextractf128 $1, %ymm1, %xmm1
208 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[1,0,2,3]
209 ; ALL-NEXT: vinsertf128 $1, %xmm1, %ymm2, %ymm1
210 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm0[0,1,1,0]
211 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
212 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,1,1,0]
213 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm2, %ymm0
214 ; ALL-NEXT: vblendps {{.*}} # ymm0 = ymm1[0,1],ymm0[2,3],ymm1[4,5],ymm0[6,7]
216 %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>
217 ret <8 x float> %shuffle
220 define <8 x float> @shuffle_v8f32_08192a3b(<8 x float> %a, <8 x float> %b) {
221 ; ALL-LABEL: @shuffle_v8f32_08192a3b
223 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm1[0,2,2,3]
224 ; ALL-NEXT: vpermilps {{.*}} # xmm3 = xmm0[2,1,3,3]
225 ; ALL-NEXT: vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1],xmm3[2],xmm2[3]
226 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm1[0,0,2,1]
227 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,1,1,3]
228 ; ALL-NEXT: vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
229 ; ALL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
231 %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>
232 ret <8 x float> %shuffle
235 define <8 x float> @shuffle_v8f32_08991abb(<8 x float> %a, <8 x float> %b) {
236 ; ALL-LABEL: @shuffle_v8f32_08991abb
238 ; ALL-NEXT: vpermilps {{.*}} # xmm2 = xmm0[1,1,2,3]
239 ; ALL-NEXT: vpermilps {{.*}} # xmm3 = xmm1[0,2,3,3]
240 ; ALL-NEXT: vblendps {{.*}} # xmm2 = xmm2[0],xmm3[1,2,3]
241 ; ALL-NEXT: vunpcklps {{.*}} # xmm1 = xmm1[0,0,1,1]
242 ; ALL-NEXT: vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1,2,3]
243 ; ALL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
245 %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>
246 ret <8 x float> %shuffle
249 define <8 x float> @shuffle_v8f32_091b2d3f(<8 x float> %a, <8 x float> %b) {
250 ; ALL-LABEL: @shuffle_v8f32_091b2d3f
252 ; ALL-NEXT: vextractf128 $1, %ymm1, %xmm2
253 ; ALL-NEXT: vpermilps {{.*}} # xmm3 = xmm0[2,1,3,3]
254 ; ALL-NEXT: vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1],xmm3[2],xmm2[3]
255 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,1,1,3]
256 ; ALL-NEXT: vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1],xmm0[2],xmm1[3]
257 ; ALL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
259 %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>
260 ret <8 x float> %shuffle
263 define <8 x float> @shuffle_v8f32_09ab1def(<8 x float> %a, <8 x float> %b) {
264 ; ALL-LABEL: @shuffle_v8f32_09ab1def
266 ; ALL-NEXT: vextractf128 $1, %ymm1, %xmm2
267 ; ALL-NEXT: vpermilps {{.*}} # xmm3 = xmm0[1,1,2,3]
268 ; ALL-NEXT: vblendps {{.*}} # xmm2 = xmm3[0],xmm2[1,2,3]
269 ; ALL-NEXT: vblendps {{.*}} # xmm0 = xmm0[0],xmm1[1,2,3]
270 ; ALL-NEXT: vinsertf128 $1, %xmm2, %ymm0, %ymm0
272 %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>
273 ret <8 x float> %shuffle
276 define <8 x float> @shuffle_v8f32_00014445(<8 x float> %a, <8 x float> %b) {
277 ; ALL-LABEL: @shuffle_v8f32_00014445
279 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,0,1]
280 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
281 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,0,1]
282 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
284 %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>
285 ret <8 x float> %shuffle
288 define <8 x float> @shuffle_v8f32_00204464(<8 x float> %a, <8 x float> %b) {
289 ; ALL-LABEL: @shuffle_v8f32_00204464
291 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,2,0]
292 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
293 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,2,0]
294 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
296 %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>
297 ret <8 x float> %shuffle
300 define <8 x float> @shuffle_v8f32_03004744(<8 x float> %a, <8 x float> %b) {
301 ; ALL-LABEL: @shuffle_v8f32_03004744
303 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,3,0,0]
304 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
305 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,3,0,0]
306 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
308 %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>
309 ret <8 x float> %shuffle
312 define <8 x float> @shuffle_v8f32_10005444(<8 x float> %a, <8 x float> %b) {
313 ; ALL-LABEL: @shuffle_v8f32_10005444
315 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[1,0,0,0]
316 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
317 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,0,0,0]
318 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
320 %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>
321 ret <8 x float> %shuffle
324 define <8 x float> @shuffle_v8f32_22006644(<8 x float> %a, <8 x float> %b) {
325 ; ALL-LABEL: @shuffle_v8f32_22006644
327 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[2,2,0,0]
328 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
329 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[2,2,0,0]
330 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
332 %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>
333 ret <8 x float> %shuffle
336 define <8 x float> @shuffle_v8f32_33307774(<8 x float> %a, <8 x float> %b) {
337 ; ALL-LABEL: @shuffle_v8f32_33307774
339 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[3,3,3,0]
340 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
341 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[3,3,3,0]
342 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
344 %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>
345 ret <8 x float> %shuffle
348 define <8 x float> @shuffle_v8f32_32107654(<8 x float> %a, <8 x float> %b) {
349 ; ALL-LABEL: @shuffle_v8f32_32107654
351 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[3,2,1,0]
352 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
353 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[3,2,1,0]
354 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
356 %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>
357 ret <8 x float> %shuffle
360 define <8 x float> @shuffle_v8f32_00234467(<8 x float> %a, <8 x float> %b) {
361 ; ALL-LABEL: @shuffle_v8f32_00234467
363 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[0,0,2,3]
364 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
365 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,2,3]
366 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
368 %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>
369 ret <8 x float> %shuffle
372 define <8 x float> @shuffle_v8f32_00224466(<8 x float> %a, <8 x float> %b) {
373 ; ALL-LABEL: @shuffle_v8f32_00224466
375 ; ALL-NEXT: vmovsldup {{.*}} # xmm1 = xmm0[0,0,2,2]
376 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
377 ; ALL-NEXT: vmovsldup {{.*}} # xmm0 = xmm0[0,0,2,2]
378 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
380 %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>
381 ret <8 x float> %shuffle
384 define <8 x float> @shuffle_v8f32_10325476(<8 x float> %a, <8 x float> %b) {
385 ; ALL-LABEL: @shuffle_v8f32_10325476
387 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[1,0,3,2]
388 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
389 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,0,3,2]
390 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
392 %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>
393 ret <8 x float> %shuffle
396 define <8 x float> @shuffle_v8f32_11335577(<8 x float> %a, <8 x float> %b) {
397 ; ALL-LABEL: @shuffle_v8f32_11335577
399 ; ALL-NEXT: vmovshdup {{.*}} # xmm1 = xmm0[1,1,3,3]
400 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
401 ; ALL-NEXT: vmovshdup {{.*}} # xmm0 = xmm0[1,1,3,3]
402 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
404 %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>
405 ret <8 x float> %shuffle
408 define <8 x float> @shuffle_v8f32_10235467(<8 x float> %a, <8 x float> %b) {
409 ; ALL-LABEL: @shuffle_v8f32_10235467
411 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[1,0,2,3]
412 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
413 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,0,2,3]
414 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
416 %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>
417 ret <8 x float> %shuffle
420 define <8 x float> @shuffle_v8f32_10225466(<8 x float> %a, <8 x float> %b) {
421 ; ALL-LABEL: @shuffle_v8f32_10225466
423 ; ALL-NEXT: vpermilps {{.*}} # xmm1 = xmm0[1,0,2,2]
424 ; ALL-NEXT: vextractf128 $1, %ymm0, %xmm0
425 ; ALL-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,0,2,2]
426 ; ALL-NEXT: vinsertf128 $1, %xmm0, %ymm1, %ymm0
428 %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>
429 ret <8 x float> %shuffle