1 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE2
2 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mattr=+sse3 -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE3
3 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mattr=+ssse3 -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSSE3
4 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mattr=+sse4.1 -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=SSE --check-prefix=SSE41
5 ; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -mattr=+avx -x86-experimental-vector-shuffle-lowering | FileCheck %s --check-prefix=ALL --check-prefix=AVX --check-prefix=AVX1
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target triple = "x86_64-unknown-unknown"
10 define <4 x i32> @shuffle_v4i32_0001(<4 x i32> %a, <4 x i32> %b) {
11 ; ALL-LABEL: @shuffle_v4i32_0001
12 ; ALL: pshufd {{.*}} # xmm0 = xmm0[0,0,0,1]
14 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
15 ret <4 x i32> %shuffle
17 define <4 x i32> @shuffle_v4i32_0020(<4 x i32> %a, <4 x i32> %b) {
18 ; ALL-LABEL: @shuffle_v4i32_0020
19 ; ALL: pshufd {{.*}} # xmm0 = xmm0[0,0,2,0]
21 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 0, i32 2, i32 0>
22 ret <4 x i32> %shuffle
24 define <4 x i32> @shuffle_v4i32_0112(<4 x i32> %a, <4 x i32> %b) {
25 ; ALL-LABEL: @shuffle_v4i32_0112
26 ; ALL: pshufd {{.*}} # xmm0 = xmm0[0,1,1,2]
28 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 1, i32 2>
29 ret <4 x i32> %shuffle
31 define <4 x i32> @shuffle_v4i32_0300(<4 x i32> %a, <4 x i32> %b) {
32 ; ALL-LABEL: @shuffle_v4i32_0300
33 ; ALL: pshufd {{.*}} # xmm0 = xmm0[0,3,0,0]
35 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 3, i32 0, i32 0>
36 ret <4 x i32> %shuffle
38 define <4 x i32> @shuffle_v4i32_1000(<4 x i32> %a, <4 x i32> %b) {
39 ; ALL-LABEL: @shuffle_v4i32_1000
40 ; ALL: pshufd {{.*}} # xmm0 = xmm0[1,0,0,0]
42 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 0, i32 0, i32 0>
43 ret <4 x i32> %shuffle
45 define <4 x i32> @shuffle_v4i32_2200(<4 x i32> %a, <4 x i32> %b) {
46 ; ALL-LABEL: @shuffle_v4i32_2200
47 ; ALL: pshufd {{.*}} # xmm0 = xmm0[2,2,0,0]
49 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 2, i32 0, i32 0>
50 ret <4 x i32> %shuffle
52 define <4 x i32> @shuffle_v4i32_3330(<4 x i32> %a, <4 x i32> %b) {
53 ; ALL-LABEL: @shuffle_v4i32_3330
54 ; ALL: pshufd {{.*}} # xmm0 = xmm0[3,3,3,0]
56 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 3, i32 3, i32 3, i32 0>
57 ret <4 x i32> %shuffle
59 define <4 x i32> @shuffle_v4i32_3210(<4 x i32> %a, <4 x i32> %b) {
60 ; ALL-LABEL: @shuffle_v4i32_3210
61 ; ALL: pshufd {{.*}} # xmm0 = xmm0[3,2,1,0]
63 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
64 ret <4 x i32> %shuffle
67 define <4 x i32> @shuffle_v4i32_2121(<4 x i32> %a, <4 x i32> %b) {
68 ; ALL-LABEL: @shuffle_v4i32_2121
69 ; ALL: pshufd {{.*}} # xmm0 = xmm0[2,1,2,1]
71 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 1, i32 2, i32 1>
72 ret <4 x i32> %shuffle
75 define <4 x float> @shuffle_v4f32_0001(<4 x float> %a, <4 x float> %b) {
76 ; SSE-LABEL: @shuffle_v4f32_0001
78 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0,0,1]
81 ; AVX-LABEL: @shuffle_v4f32_0001
83 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,0,1]
85 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
86 ret <4 x float> %shuffle
88 define <4 x float> @shuffle_v4f32_0020(<4 x float> %a, <4 x float> %b) {
89 ; SSE-LABEL: @shuffle_v4f32_0020
91 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0,2,0]
94 ; AVX-LABEL: @shuffle_v4f32_0020
96 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,0,2,0]
98 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 0, i32 2, i32 0>
99 ret <4 x float> %shuffle
101 define <4 x float> @shuffle_v4f32_0300(<4 x float> %a, <4 x float> %b) {
102 ; SSE-LABEL: @shuffle_v4f32_0300
104 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[0,3,0,0]
107 ; AVX-LABEL: @shuffle_v4f32_0300
109 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[0,3,0,0]
111 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 3, i32 0, i32 0>
112 ret <4 x float> %shuffle
114 define <4 x float> @shuffle_v4f32_1000(<4 x float> %a, <4 x float> %b) {
115 ; SSE-LABEL: @shuffle_v4f32_1000
117 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[1,0,0,0]
120 ; AVX-LABEL: @shuffle_v4f32_1000
122 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[1,0,0,0]
124 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 0, i32 0, i32 0>
125 ret <4 x float> %shuffle
127 define <4 x float> @shuffle_v4f32_2200(<4 x float> %a, <4 x float> %b) {
128 ; SSE-LABEL: @shuffle_v4f32_2200
130 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[2,2,0,0]
133 ; AVX-LABEL: @shuffle_v4f32_2200
135 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[2,2,0,0]
137 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 2, i32 0, i32 0>
138 ret <4 x float> %shuffle
140 define <4 x float> @shuffle_v4f32_3330(<4 x float> %a, <4 x float> %b) {
141 ; SSE-LABEL: @shuffle_v4f32_3330
143 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[3,3,3,0]
146 ; AVX-LABEL: @shuffle_v4f32_3330
148 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[3,3,3,0]
150 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 3, i32 3, i32 3, i32 0>
151 ret <4 x float> %shuffle
153 define <4 x float> @shuffle_v4f32_3210(<4 x float> %a, <4 x float> %b) {
154 ; SSE-LABEL: @shuffle_v4f32_3210
156 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[3,2,1,0]
159 ; AVX-LABEL: @shuffle_v4f32_3210
161 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = xmm0[3,2,1,0]
163 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
164 ret <4 x float> %shuffle
166 define <4 x float> @shuffle_v4f32_0011(<4 x float> %a, <4 x float> %b) {
167 ; ALL-LABEL: @shuffle_v4f32_0011
168 ; ALL: unpcklps {{.*}} # xmm0 = xmm0[0,0,1,1]
170 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 0, i32 1, i32 1>
171 ret <4 x float> %shuffle
173 define <4 x float> @shuffle_v4f32_2233(<4 x float> %a, <4 x float> %b) {
174 ; ALL-LABEL: @shuffle_v4f32_2233
175 ; ALL: unpckhps {{.*}} # xmm0 = xmm0[2,2,3,3]
177 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 2, i32 2, i32 3, i32 3>
178 ret <4 x float> %shuffle
180 define <4 x float> @shuffle_v4f32_0022(<4 x float> %a, <4 x float> %b) {
181 ; SSE2-LABEL: @shuffle_v4f32_0022
182 ; SSE2: shufps {{.*}} # xmm0 = xmm0[0,0,2,2]
185 ; SSE3-LABEL: @shuffle_v4f32_0022
186 ; SSE3: movsldup {{.*}} # xmm0 = xmm0[0,0,2,2]
189 ; SSSE3-LABEL: @shuffle_v4f32_0022
190 ; SSSE3: movsldup {{.*}} # xmm0 = xmm0[0,0,2,2]
193 ; SSE41-LABEL: @shuffle_v4f32_0022
194 ; SSE41: movsldup {{.*}} # xmm0 = xmm0[0,0,2,2]
197 ; AVX-LABEL: @shuffle_v4f32_0022
198 ; AVX: vmovsldup {{.*}} # xmm0 = xmm0[0,0,2,2]
200 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 0, i32 0, i32 2, i32 2>
201 ret <4 x float> %shuffle
203 define <4 x float> @shuffle_v4f32_1133(<4 x float> %a, <4 x float> %b) {
204 ; SSE2-LABEL: @shuffle_v4f32_1133
205 ; SSE2: shufps {{.*}} # xmm0 = xmm0[1,1,3,3]
208 ; SSE3-LABEL: @shuffle_v4f32_1133
209 ; SSE3: movshdup {{.*}} # xmm0 = xmm0[1,1,3,3]
212 ; SSSE3-LABEL: @shuffle_v4f32_1133
213 ; SSSE3: movshdup {{.*}} # xmm0 = xmm0[1,1,3,3]
216 ; SSE41-LABEL: @shuffle_v4f32_1133
217 ; SSE41: movshdup {{.*}} # xmm0 = xmm0[1,1,3,3]
220 ; AVX-LABEL: @shuffle_v4f32_1133
221 ; AVX: vmovshdup {{.*}} # xmm0 = xmm0[1,1,3,3]
223 %shuffle = shufflevector <4 x float> %a, <4 x float> %b, <4 x i32> <i32 1, i32 1, i32 3, i32 3>
224 ret <4 x float> %shuffle
227 define <4 x i32> @shuffle_v4i32_0124(<4 x i32> %a, <4 x i32> %b) {
228 ; SSE2-LABEL: @shuffle_v4i32_0124
229 ; SSE2: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[2,0]
230 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,1],xmm1[2,0]
233 ; SSE3-LABEL: @shuffle_v4i32_0124
234 ; SSE3: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[2,0]
235 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,1],xmm1[2,0]
238 ; SSSE3-LABEL: @shuffle_v4i32_0124
239 ; SSSE3: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[2,0]
240 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,1],xmm1[2,0]
243 ; SSE41-LABEL: @shuffle_v4i32_0124
244 ; SSE41: insertps {{.*}} # xmm0 = xmm0[0,1,2],xmm1[0]
247 ; AVX-LABEL: @shuffle_v4i32_0124
248 ; AVX: vinsertps {{.*}} # xmm0 = xmm0[0,1,2],xmm1[0]
250 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 2, i32 4>
251 ret <4 x i32> %shuffle
253 define <4 x i32> @shuffle_v4i32_0142(<4 x i32> %a, <4 x i32> %b) {
254 ; ALL-LABEL: @shuffle_v4i32_0142
255 ; ALL: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[2,0]
256 ; ALL-NEXT: shufps {{.*}} # xmm0 = xmm0[0,1],xmm1[0,2]
258 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 4, i32 2>
259 ret <4 x i32> %shuffle
261 define <4 x i32> @shuffle_v4i32_0412(<4 x i32> %a, <4 x i32> %b) {
262 ; SSE-LABEL: @shuffle_v4i32_0412
263 ; SSE: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[0,0]
264 ; SSE-NEXT: shufps {{.*}} # xmm1 = xmm1[2,0],xmm0[1,2]
265 ; SSE-NEXT: movaps %xmm1, %xmm0
268 ; AVX-LABEL: @shuffle_v4i32_0412
269 ; AVX: vshufps {{.*}} # xmm1 = xmm1[0,0],xmm0[0,0]
270 ; AVX-NEXT: vshufps {{.*}} # xmm0 = xmm1[2,0],xmm0[1,2]
272 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 1, i32 2>
273 ret <4 x i32> %shuffle
275 define <4 x i32> @shuffle_v4i32_4012(<4 x i32> %a, <4 x i32> %b) {
276 ; SSE-LABEL: @shuffle_v4i32_4012
277 ; SSE: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[0,0]
278 ; SSE-NEXT: shufps {{.*}} # xmm1 = xmm1[0,2],xmm0[1,2]
279 ; SSE-NEXT: movaps %xmm1, %xmm0
282 ; AVX-LABEL: @shuffle_v4i32_4012
283 ; AVX: vshufps {{.*}} # xmm1 = xmm1[0,0],xmm0[0,0]
284 ; AVX-NEXT: vshufps {{.*}} # xmm0 = xmm1[0,2],xmm0[1,2]
286 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 0, i32 1, i32 2>
287 ret <4 x i32> %shuffle
289 define <4 x i32> @shuffle_v4i32_0145(<4 x i32> %a, <4 x i32> %b) {
290 ; ALL-LABEL: @shuffle_v4i32_0145
291 ; ALL: punpcklqdq {{.*}} # xmm0 = xmm0[0],xmm1[0]
293 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 1, i32 4, i32 5>
294 ret <4 x i32> %shuffle
296 define <4 x i32> @shuffle_v4i32_0451(<4 x i32> %a, <4 x i32> %b) {
297 ; ALL-LABEL: @shuffle_v4i32_0451
298 ; ALL: shufps {{.*}} # xmm0 = xmm0[0,1],xmm1[0,1]
299 ; ALL-NEXT: shufps {{.*}} # xmm0 = xmm0[0,2,3,1]
301 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 4, i32 5, i32 1>
302 ret <4 x i32> %shuffle
304 define <4 x i32> @shuffle_v4i32_4501(<4 x i32> %a, <4 x i32> %b) {
305 ; SSE-LABEL: @shuffle_v4i32_4501
306 ; SSE: punpcklqdq {{.*}} # xmm1 = xmm1[0],xmm0[0]
307 ; SSE-NEXT: movdqa %xmm1, %xmm0
310 ; AVX-LABEL: @shuffle_v4i32_4501
311 ; AVX: punpcklqdq {{.*}} # xmm0 = xmm1[0],xmm0[0]
313 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 5, i32 0, i32 1>
314 ret <4 x i32> %shuffle
316 define <4 x i32> @shuffle_v4i32_4015(<4 x i32> %a, <4 x i32> %b) {
317 ; ALL-LABEL: @shuffle_v4i32_4015
318 ; ALL: shufps {{.*}} # xmm0 = xmm0[0,1],xmm1[0,1]
319 ; ALL-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0,1,3]
321 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 4, i32 0, i32 1, i32 5>
322 ret <4 x i32> %shuffle
325 define <4 x float> @shuffle_v4f32_4zzz(<4 x float> %a) {
326 ; SSE2-LABEL: @shuffle_v4f32_4zzz
327 ; SSE2: xorps %[[X:xmm[0-9]+]], %[[X]]
328 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][1,0]
329 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,2],[[X]][2,3]
332 ; SSE3-LABEL: @shuffle_v4f32_4zzz
333 ; SSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
334 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][1,0]
335 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,2],[[X]][2,3]
338 ; SSSE3-LABEL: @shuffle_v4f32_4zzz
339 ; SSSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
340 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][1,0]
341 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,2],[[X]][2,3]
344 ; SSE41-LABEL: @shuffle_v4f32_4zzz
345 ; SSE41: xorps %[[X:xmm[0-9]+]], %[[X]]
346 ; SSE41-NEXT: blendps {{.*}} # [[X]] = xmm0[0],[[X]][1,2,3]
347 ; SSE41-NEXT: movaps %[[X]], %xmm0
350 ; AVX-LABEL: @shuffle_v4f32_4zzz
351 ; AVX: vxorps %[[X:xmm[0-9]+]], %[[X]]
352 ; AVX-NEXT: vblendps {{.*}} # xmm0 = xmm0[0],[[X]][1,2,3]
354 %shuffle = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 4, i32 1, i32 2, i32 3>
355 ret <4 x float> %shuffle
358 define <4 x float> @shuffle_v4f32_z4zz(<4 x float> %a) {
359 ; SSE2-LABEL: @shuffle_v4f32_z4zz
360 ; SSE2: xorps %[[X:xmm[0-9]+]], %[[X]]
361 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][2,0]
362 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][3,0]
365 ; SSE3-LABEL: @shuffle_v4f32_z4zz
366 ; SSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
367 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][2,0]
368 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][3,0]
371 ; SSSE3-LABEL: @shuffle_v4f32_z4zz
372 ; SSSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
373 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][2,0]
374 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][3,0]
377 ; SSE41-LABEL: @shuffle_v4f32_z4zz
378 ; SSE41: insertps {{.*}} # xmm0 = zero,xmm0[0],zero,zero
381 ; AVX-LABEL: @shuffle_v4f32_z4zz
382 ; AVX: vinsertps {{.*}} # xmm0 = zero,xmm0[0],zero,zero
384 %shuffle = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 2, i32 4, i32 3, i32 0>
385 ret <4 x float> %shuffle
388 define <4 x float> @shuffle_v4f32_zz4z(<4 x float> %a) {
389 ; SSE2-LABEL: @shuffle_v4f32_zz4z
390 ; SSE2: xorps %[[X:xmm[0-9]+]], %[[X]]
391 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][0,0]
392 ; SSE2-NEXT: shufps {{.*}} # [[X]] = [[X]][0,0],xmm0[0,2]
393 ; SSE2-NEXT: movaps %[[X]], %xmm0
396 ; SSE3-LABEL: @shuffle_v4f32_zz4z
397 ; SSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
398 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][0,0]
399 ; SSE3-NEXT: shufps {{.*}} # [[X]] = [[X]][0,0],xmm0[0,2]
400 ; SSE3-NEXT: movaps %[[X]], %xmm0
403 ; SSSE3-LABEL: @shuffle_v4f32_zz4z
404 ; SSSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
405 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],[[X]][0,0]
406 ; SSSE3-NEXT: shufps {{.*}} # [[X]] = [[X]][0,0],xmm0[0,2]
407 ; SSSE3-NEXT: movaps %[[X]], %xmm0
410 ; SSE41-LABEL: @shuffle_v4f32_zz4z
411 ; SSE41: insertps {{.*}} # xmm0 = zero,zero,xmm0[0],zero
414 ; AVX-LABEL: @shuffle_v4f32_zz4z
415 ; AVX: vinsertps {{.*}} # xmm0 = zero,zero,xmm0[0],zero
417 %shuffle = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 0, i32 0, i32 4, i32 0>
418 ret <4 x float> %shuffle
421 define <4 x float> @shuffle_v4f32_zuu4(<4 x float> %a) {
422 ; SSE2-LABEL: @shuffle_v4f32_zuu4
423 ; SSE2: xorps %[[X:xmm[0-9]+]], %[[X]]
424 ; SSE2-NEXT: shufps {{.*}} # [[X]] = [[X]][0,1],xmm0[2,0]
425 ; SSE2-NEXT: movaps %[[X]], %xmm0
428 ; SSE3-LABEL: @shuffle_v4f32_zuu4
429 ; SSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
430 ; SSE3-NEXT: shufps {{.*}} # [[X]] = [[X]][0,1],xmm0[2,0]
431 ; SSE3-NEXT: movaps %[[X]], %xmm0
434 ; SSSE3-LABEL: @shuffle_v4f32_zuu4
435 ; SSSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
436 ; SSSE3-NEXT: shufps {{.*}} # [[X]] = [[X]][0,1],xmm0[2,0]
437 ; SSSE3-NEXT: movaps %[[X]], %xmm0
440 ; SSE41-LABEL: @shuffle_v4f32_zuu4
441 ; SSE41: insertps {{.*}} # xmm0 = zero,zero,zero,xmm0[0]
444 ; AVX-LABEL: @shuffle_v4f32_zuu4
445 ; AVX: vinsertps {{.*}} # xmm0 = zero,zero,zero,xmm0[0]
447 %shuffle = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 0, i32 undef, i32 undef, i32 4>
448 ret <4 x float> %shuffle
451 define <4 x float> @shuffle_v4f32_zzz7(<4 x float> %a) {
452 ; SSE2-LABEL: @shuffle_v4f32_zzz7
453 ; SSE2: xorps %[[X:xmm[0-9]+]], %[[X]]
454 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[3,0],[[X]][2,0]
455 ; SSE2-NEXT: shufps {{.*}} # [[X]] = [[X]][0,1],xmm0[2,0]
456 ; SSE2-NEXT: movaps %[[X]], %xmm0
459 ; SSE3-LABEL: @shuffle_v4f32_zzz7
460 ; SSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
461 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[3,0],[[X]][2,0]
462 ; SSE3-NEXT: shufps {{.*}} # [[X]] = [[X]][0,1],xmm0[2,0]
463 ; SSE3-NEXT: movaps %[[X]], %xmm0
466 ; SSSE3-LABEL: @shuffle_v4f32_zzz7
467 ; SSSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
468 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[3,0],[[X]][2,0]
469 ; SSSE3-NEXT: shufps {{.*}} # [[X]] = [[X]][0,1],xmm0[2,0]
470 ; SSSE3-NEXT: movaps %[[X]], %xmm0
473 ; SSE41-LABEL: @shuffle_v4f32_zzz7
474 ; SSE41: xorps %[[X:xmm[0-9]+]], %[[X]]
475 ; SSE41-NEXT: blendps {{.*}} # [[X]] = [[X]][0,1,2],xmm0[3]
476 ; SSE41-NEXT: movaps %[[X]], %xmm0
479 ; AVX-LABEL: @shuffle_v4f32_zzz7
480 ; AVX: vxorps %[[X:xmm[0-9]+]], %[[X]]
481 ; AVX-NEXT: vblendps {{.*}} # xmm0 = [[X]][0,1,2],xmm0[3]
483 %shuffle = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 0, i32 1, i32 2, i32 7>
484 ret <4 x float> %shuffle
487 define <4 x float> @shuffle_v4f32_z6zz(<4 x float> %a) {
488 ; SSE2-LABEL: @shuffle_v4f32_z6zz
489 ; SSE2: xorps %[[X:xmm[0-9]+]], %[[X]]
490 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][0,0]
491 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][2,3]
494 ; SSE3-LABEL: @shuffle_v4f32_z6zz
495 ; SSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
496 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][0,0]
497 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][2,3]
500 ; SSSE3-LABEL: @shuffle_v4f32_z6zz
501 ; SSSE3: xorps %[[X:xmm[0-9]+]], %[[X]]
502 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][0,0]
503 ; SSSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[2,0],[[X]][2,3]
506 ; SSE41-LABEL: @shuffle_v4f32_z6zz
507 ; SSE41: insertps {{.*}} # xmm0 = zero,xmm0[2],zero,zero
510 ; AVX-LABEL: @shuffle_v4f32_z6zz
511 ; AVX: vinsertps {{.*}} # xmm0 = zero,xmm0[2],zero,zero
513 %shuffle = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 0, i32 6, i32 2, i32 3>
514 ret <4 x float> %shuffle
517 define <4 x i32> @shuffle_v4i32_4zzz(i32 %i) {
518 ; ALL-LABEL: @shuffle_v4i32_4zzz
519 ; ALL: movd {{.*}}, %xmm0
521 %a = insertelement <4 x i32> undef, i32 %i, i32 0
522 %shuffle = shufflevector <4 x i32> zeroinitializer, <4 x i32> %a, <4 x i32> <i32 4, i32 1, i32 2, i32 3>
523 ret <4 x i32> %shuffle
526 define <4 x i32> @shuffle_v4i32_z4zz(i32 %i) {
527 ; ALL-LABEL: @shuffle_v4i32_z4zz
528 ; ALL: movd {{.*}}, %xmm0
529 ; ALL-NEXT: pshufd {{.*}} # xmm0 = xmm0[1,0,1,1]
531 %a = insertelement <4 x i32> undef, i32 %i, i32 0
532 %shuffle = shufflevector <4 x i32> zeroinitializer, <4 x i32> %a, <4 x i32> <i32 2, i32 4, i32 3, i32 0>
533 ret <4 x i32> %shuffle
536 define <4 x i32> @shuffle_v4i32_zz4z(i32 %i) {
537 ; ALL-LABEL: @shuffle_v4i32_zz4z
538 ; ALL: movd {{.*}}, %xmm0
539 ; ALL-NEXT: pshufd {{.*}} # xmm0 = xmm0[1,1,0,1]
541 %a = insertelement <4 x i32> undef, i32 %i, i32 0
542 %shuffle = shufflevector <4 x i32> zeroinitializer, <4 x i32> %a, <4 x i32> <i32 0, i32 0, i32 4, i32 0>
543 ret <4 x i32> %shuffle
546 define <4 x i32> @shuffle_v4i32_zuu4(i32 %i) {
547 ; ALL-LABEL: @shuffle_v4i32_zuu4
548 ; ALL: movd {{.*}}, %xmm0
549 ; ALL-NEXT: pshufd {{.*}} # xmm0 = xmm0[1,1,1,0]
551 %a = insertelement <4 x i32> undef, i32 %i, i32 0
552 %shuffle = shufflevector <4 x i32> zeroinitializer, <4 x i32> %a, <4 x i32> <i32 0, i32 undef, i32 undef, i32 4>
553 ret <4 x i32> %shuffle
556 define <4 x i32> @shuffle_v4i32_z6zz(i32 %i) {
557 ; ALL-LABEL: @shuffle_v4i32_z6zz
558 ; ALL: movd {{.*}}, %xmm0
559 ; ALL-NEXT: pshufd {{.*}} # xmm0 = xmm0[1,0,1,1]
561 %a = insertelement <4 x i32> undef, i32 %i, i32 2
562 %shuffle = shufflevector <4 x i32> zeroinitializer, <4 x i32> %a, <4 x i32> <i32 0, i32 6, i32 2, i32 3>
563 ret <4 x i32> %shuffle
566 define <4 x i32> @shuffle_v4i32_7012(<4 x i32> %a, <4 x i32> %b) {
567 ; SSE2-LABEL: @shuffle_v4i32_7012
569 ; SSE2-NEXT: shufps {{.*}} # xmm1 = xmm1[3,0],xmm0[0,0]
570 ; SSE2-NEXT: shufps {{.*}} # xmm1 = xmm1[0,2],xmm0[1,2]
571 ; SSE2-NEXT: movaps %xmm1, %xmm0
574 ; SSE3-LABEL: @shuffle_v4i32_7012
576 ; SSE3-NEXT: shufps {{.*}} # xmm1 = xmm1[3,0],xmm0[0,0]
577 ; SSE3-NEXT: shufps {{.*}} # xmm1 = xmm1[0,2],xmm0[1,2]
578 ; SSE3-NEXT: movaps %xmm1, %xmm0
581 ; SSSE3-LABEL: @shuffle_v4i32_7012
583 ; SSSE3-NEXT: palignr $12, {{.*}} # xmm0 = xmm1[12,13,14,15],xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
586 ; SSE41-LABEL: @shuffle_v4i32_7012
588 ; SSE41-NEXT: palignr $12, {{.*}} # xmm0 = xmm1[12,13,14,15],xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
591 ; AVX-LABEL: @shuffle_v4i32_7012
593 ; AVX-NEXT: vpalignr $12, {{.*}} # xmm0 = xmm1[12,13,14,15],xmm0[0,1,2,3,4,5,6,7,8,9,10,11]
595 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 7, i32 0, i32 1, i32 2>
596 ret <4 x i32> %shuffle
599 define <4 x i32> @shuffle_v4i32_6701(<4 x i32> %a, <4 x i32> %b) {
600 ; SSE2-LABEL: @shuffle_v4i32_6701
602 ; SSE2-NEXT: shufpd {{.*}} # xmm1 = xmm1[1],xmm0[0]
603 ; SSE2-NEXT: movapd %xmm1, %xmm0
606 ; SSE3-LABEL: @shuffle_v4i32_6701
608 ; SSE3-NEXT: shufpd {{.*}} # xmm1 = xmm1[1],xmm0[0]
609 ; SSE3-NEXT: movapd %xmm1, %xmm0
612 ; SSSE3-LABEL: @shuffle_v4i32_6701
614 ; SSSE3-NEXT: palignr $8, {{.*}} # xmm0 = xmm1[8,9,10,11,12,13,14,15],xmm0[0,1,2,3,4,5,6,7]
617 ; SSE41-LABEL: @shuffle_v4i32_6701
619 ; SSE41-NEXT: palignr $8, {{.*}} # xmm0 = xmm1[8,9,10,11,12,13,14,15],xmm0[0,1,2,3,4,5,6,7]
622 ; AVX-LABEL: @shuffle_v4i32_6701
624 ; AVX-NEXT: vpalignr $8, {{.*}} # xmm0 = xmm1[8,9,10,11,12,13,14,15],xmm0[0,1,2,3,4,5,6,7]
626 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 6, i32 7, i32 0, i32 1>
627 ret <4 x i32> %shuffle
630 define <4 x i32> @shuffle_v4i32_5670(<4 x i32> %a, <4 x i32> %b) {
631 ; SSE2-LABEL: @shuffle_v4i32_5670
633 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],xmm1[3,0]
634 ; SSE2-NEXT: shufps {{.*}} # xmm1 = xmm1[1,2],xmm0[2,0]
635 ; SSE2-NEXT: movaps %xmm1, %xmm0
638 ; SSE3-LABEL: @shuffle_v4i32_5670
640 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,0],xmm1[3,0]
641 ; SSE3-NEXT: shufps {{.*}} # xmm1 = xmm1[1,2],xmm0[2,0]
642 ; SSE3-NEXT: movaps %xmm1, %xmm0
645 ; SSSE3-LABEL: @shuffle_v4i32_5670
647 ; SSSE3-NEXT: palignr $4, {{.*}} # xmm0 = xmm1[4,5,6,7,8,9,10,11,12,13,14,15],xmm0[0,1,2,3]
650 ; SSE41-LABEL: @shuffle_v4i32_5670
652 ; SSE41-NEXT: palignr $4, {{.*}} # xmm0 = xmm1[4,5,6,7,8,9,10,11,12,13,14,15],xmm0[0,1,2,3]
655 ; AVX-LABEL: @shuffle_v4i32_5670
657 ; AVX-NEXT: vpalignr $4, {{.*}} # xmm0 = xmm1[4,5,6,7,8,9,10,11,12,13,14,15],xmm0[0,1,2,3]
659 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 5, i32 6, i32 7, i32 0>
660 ret <4 x i32> %shuffle
663 define <4 x i32> @shuffle_v4i32_1234(<4 x i32> %a, <4 x i32> %b) {
664 ; SSE2-LABEL: @shuffle_v4i32_1234
666 ; SSE2-NEXT: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[3,0]
667 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[1,2],xmm1[2,0]
670 ; SSE3-LABEL: @shuffle_v4i32_1234
672 ; SSE3-NEXT: shufps {{.*}} # xmm1 = xmm1[0,0],xmm0[3,0]
673 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[1,2],xmm1[2,0]
676 ; SSSE3-LABEL: @shuffle_v4i32_1234
678 ; SSSE3-NEXT: palignr $4, {{.*}} # xmm1 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],xmm1[0,1,2,3]
679 ; SSSE3-NEXT: movdqa %xmm1, %xmm0
682 ; SSE41-LABEL: @shuffle_v4i32_1234
684 ; SSE41-NEXT: palignr $4, {{.*}} # xmm1 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],xmm1[0,1,2,3]
685 ; SSE41-NEXT: movdqa %xmm1, %xmm0
688 ; AVX-LABEL: @shuffle_v4i32_1234
690 ; AVX-NEXT: vpalignr $4, {{.*}} # xmm0 = xmm0[4,5,6,7,8,9,10,11,12,13,14,15],xmm1[0,1,2,3]
692 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 1, i32 2, i32 3, i32 4>
693 ret <4 x i32> %shuffle
696 define <4 x i32> @shuffle_v4i32_2345(<4 x i32> %a, <4 x i32> %b) {
697 ; SSE2-LABEL: @shuffle_v4i32_2345
699 ; SSE2-NEXT: shufpd {{.*}} # xmm0 = xmm0[1],xmm1[0]
702 ; SSE3-LABEL: @shuffle_v4i32_2345
704 ; SSE3-NEXT: shufpd {{.*}} # xmm0 = xmm0[1],xmm1[0]
707 ; SSSE3-LABEL: @shuffle_v4i32_2345
709 ; SSSE3-NEXT: palignr $8, {{.*}} # xmm1 = xmm0[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7]
710 ; SSSE3-NEXT: movdqa %xmm1, %xmm0
713 ; SSE41-LABEL: @shuffle_v4i32_2345
715 ; SSE41-NEXT: palignr $8, {{.*}} # xmm1 = xmm0[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7]
716 ; SSE41-NEXT: movdqa %xmm1, %xmm0
719 ; AVX-LABEL: @shuffle_v4i32_2345
721 ; AVX-NEXT: vpalignr $8, {{.*}} # xmm0 = xmm0[8,9,10,11,12,13,14,15],xmm1[0,1,2,3,4,5,6,7]
723 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 2, i32 3, i32 4, i32 5>
724 ret <4 x i32> %shuffle
727 define <4 x i32> @shuffle_v4i32_3456(<4 x i32> %a, <4 x i32> %b) {
728 ; SSE2-LABEL: @shuffle_v4i32_3456
730 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[3,0],xmm1[0,0]
731 ; SSE2-NEXT: shufps {{.*}} # xmm0 = xmm0[0,2],xmm1[1,2]
734 ; SSE3-LABEL: @shuffle_v4i32_3456
736 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[3,0],xmm1[0,0]
737 ; SSE3-NEXT: shufps {{.*}} # xmm0 = xmm0[0,2],xmm1[1,2]
740 ; SSSE3-LABEL: @shuffle_v4i32_3456
742 ; SSSE3-NEXT: palignr $12, {{.*}} # xmm1 = xmm0[12,13,14,15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
743 ; SSSE3-NEXT: movdqa %xmm1, %xmm0
746 ; SSE41-LABEL: @shuffle_v4i32_3456
748 ; SSE41-NEXT: palignr $12, {{.*}} # xmm1 = xmm0[12,13,14,15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
749 ; SSE41-NEXT: movdqa %xmm1, %xmm0
752 ; AVX-LABEL: @shuffle_v4i32_3456
754 ; AVX-NEXT: vpalignr $12, {{.*}} # xmm0 = xmm0[12,13,14,15],xmm1[0,1,2,3,4,5,6,7,8,9,10,11]
756 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 3, i32 4, i32 5, i32 6>
757 ret <4 x i32> %shuffle
760 define <4 x i32> @shuffle_v4i32_0u1u(<4 x i32> %a, <4 x i32> %b) {
761 ; ALL-LABEL: @shuffle_v4i32_0u1u
763 ; ALL-NEXT: pshufd {{.*}} # xmm0 = xmm0[0,0,1,1]
765 %shuffle = shufflevector <4 x i32> %a, <4 x i32> %b, <4 x i32> <i32 0, i32 undef, i32 1, i32 undef>
766 ret <4 x i32> %shuffle
769 define <4 x i32> @shuffle_v4i32_0z1z(<4 x i32> %a) {
770 ; SSE2-LABEL: @shuffle_v4i32_0z1z
772 ; SSE2-NEXT: pxor %[[X:xmm[0-9]+]], %[[X]]
773 ; SSE2-NEXT: punpckldq {{.*}} # xmm0 = xmm0[0],[[X]][0],xmm0[1],[[X]][1]
776 ; SSE3-LABEL: @shuffle_v4i32_0z1z
778 ; SSE3-NEXT: pxor %[[X:xmm[0-9]+]], %[[X]]
779 ; SSE3-NEXT: punpckldq {{.*}} # xmm0 = xmm0[0],[[X]][0],xmm0[1],[[X]][1]
782 ; SSSE3-LABEL: @shuffle_v4i32_0z1z
784 ; SSSE3-NEXT: pxor %[[X:xmm[0-9]+]], %[[X]]
785 ; SSSE3-NEXT: punpckldq {{.*}} # xmm0 = xmm0[0],[[X]][0],xmm0[1],[[X]][1]
788 ; SSE41-LABEL: @shuffle_v4i32_0z1z
790 ; SSE41-NEXT: pmovzxdq %xmm0, %xmm0
793 ; AVX-LABEL: @shuffle_v4i32_0z1z
795 ; AVX-NEXT: vpmovzxdq %xmm0, %xmm0
797 %shuffle = shufflevector <4 x i32> %a, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 5, i32 1, i32 7>
798 ret <4 x i32> %shuffle
801 define <4 x i32> @insert_reg_and_zero_v4i32(i32 %a) {
802 ; ALL-LABEL: @insert_reg_and_zero_v4i32
804 ; ALL-NEXT: movd %edi, %xmm0
806 %v = insertelement <4 x i32> undef, i32 %a, i32 0
807 %shuffle = shufflevector <4 x i32> %v, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
808 ret <4 x i32> %shuffle
811 define <4 x i32> @insert_mem_and_zero_v4i32(i32* %ptr) {
812 ; ALL-LABEL: @insert_mem_and_zero_v4i32
814 ; ALL-NEXT: movd (%rdi), %xmm0
817 %v = insertelement <4 x i32> undef, i32 %a, i32 0
818 %shuffle = shufflevector <4 x i32> %v, <4 x i32> zeroinitializer, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
819 ret <4 x i32> %shuffle
822 define <4 x float> @insert_reg_and_zero_v4f32(float %a) {
823 ; SSE-LABEL: @insert_reg_and_zero_v4f32
825 ; SSE-NEXT: xorps %[[X:xmm[0-9]+]], %[[X]]
826 ; SSE-NEXT: movss %xmm0, %[[X]]
827 ; SSE-NEXT: movaps %[[X]], %xmm0
830 ; AVX-LABEL: @insert_reg_and_zero_v4f32
832 ; AVX-NEXT: vxorps %[[X:xmm[0-9]+]], %[[X]], %[[X]]
833 ; AVX-NEXT: vmovss %xmm0, %[[X]], %xmm0
835 %v = insertelement <4 x float> undef, float %a, i32 0
836 %shuffle = shufflevector <4 x float> %v, <4 x float> zeroinitializer, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
837 ret <4 x float> %shuffle
840 define <4 x float> @insert_mem_and_zero_v4f32(float* %ptr) {
841 ; ALL-LABEL: @insert_mem_and_zero_v4f32
843 ; ALL-NEXT: movss (%rdi), %xmm0
845 %a = load float* %ptr
846 %v = insertelement <4 x float> undef, float %a, i32 0
847 %shuffle = shufflevector <4 x float> %v, <4 x float> zeroinitializer, <4 x i32> <i32 0, i32 5, i32 6, i32 7>
848 ret <4 x float> %shuffle
851 define <4 x float> @shuffle_mem_v4f32_3210(<4 x float>* %ptr) {
852 ; SSE-LABEL: @shuffle_mem_v4f32_3210
854 ; SSE-NEXT: movaps (%rdi), %xmm0
855 ; SSE-NEXT: shufps {{.*}} # xmm0 = xmm0[3,2,1,0]
858 ; AVX-LABEL: @shuffle_mem_v4f32_3210
860 ; AVX-NEXT: vpermilps {{.*}} # xmm0 = mem[3,2,1,0]
862 %a = load <4 x float>* %ptr
863 %shuffle = shufflevector <4 x float> %a, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
864 ret <4 x float> %shuffle