e66a3d48d3828f9bd77827c2fd475d79cf016009
[oota-llvm.git] / test / CodeGen / X86 / avx-shuffle.ll
1 ; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
2
3 ; PR11102
4 define <4 x float> @test1(<4 x float> %a) nounwind {
5   %b = shufflevector <4 x float> zeroinitializer, <4 x float> %a, <4 x i32> <i32 2, i32 5, i32 undef, i32 undef>
6   ret <4 x float> %b
7 ; CHECK: test1:
8 ; CHECK: vshufps
9 ; CHECK: vpshufd
10 }
11
12 ; rdar://10538417
13 define <3 x i64> @test2(<3 x i64> %v) nounwind readnone {
14 ; CHECK: test2:
15 ; CHECK: vxorps
16 ; CHECK: vmovsd
17   %1 = shufflevector <2 x i64> undef, <2 x i64> undef, <3 x i32> <i32 0, i32 1, i32 undef>
18   %2 = shufflevector <3 x i64> zeroinitializer, <3 x i64> %1, <3 x i32> <i32 3, i32 4, i32 2>
19   ret <3 x i64> %2
20 }