blob: eaa523e6e573f382a7ac550b6d823bcbfb2e83a1 [file] [log] [blame]
Evan Chengdea99362008-05-29 08:22:04 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psllq | grep 32
2; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pslldq | grep 12
3; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psrldq | grep 8
4; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep psrldq | grep 12
5
6define void @t1(i32 %a, <1 x i64>* %P) nounwind {
7 %tmp12 = shl i32 %a, 12
8 %tmp21 = insertelement <2 x i32> undef, i32 %tmp12, i32 1
9 %tmp22 = insertelement <2 x i32> %tmp21, i32 0, i32 0
10 %tmp23 = bitcast <2 x i32> %tmp22 to <1 x i64>
11 store <1 x i64> %tmp23, <1 x i64>* %P
12 ret void
13}
14
15define <4 x float> @t2(<4 x float>* %P) nounwind {
16 %tmp1 = load <4 x float>* %P
17 %tmp2 = shufflevector <4 x float> %tmp1, <4 x float> zeroinitializer, <4 x i32> < i32 4, i32 4, i32 4, i32 0 >
18 ret <4 x float> %tmp2
19}
20
21define <4 x float> @t3(<4 x float>* %P) nounwind {
22 %tmp1 = load <4 x float>* %P
23 %tmp2 = shufflevector <4 x float> %tmp1, <4 x float> zeroinitializer, <4 x i32> < i32 2, i32 3, i32 4, i32 4 >
24 ret <4 x float> %tmp2
25}
26
27define <4 x float> @t4(<4 x float>* %P) nounwind {
28 %tmp1 = load <4 x float>* %P
29 %tmp2 = shufflevector <4 x float> zeroinitializer, <4 x float> %tmp1, <4 x i32> < i32 7, i32 0, i32 0, i32 0 >
30 ret <4 x float> %tmp2
31}