1 ; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2,-sse41 -o %t -f
2 ; RUN: grep movss %t | count 3
3 ; RUN: grep movhlps %t | count 1
4 ; RUN: grep pshufd %t | count 1
5 ; RUN: grep unpckhpd %t | count 1
7 define void @test1(<4 x float>* %F, float* %f) nounwind {
8 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
9 %tmp7 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
10 %tmp2 = extractelement <4 x float> %tmp7, i32 0 ; <float> [#uses=1]
11 store float %tmp2, float* %f
15 define float @test2(<4 x float>* %F, float* %f) nounwind {
16 %tmp = load <4 x float>* %F ; <<4 x float>> [#uses=2]
17 %tmp7 = add <4 x float> %tmp, %tmp ; <<4 x float>> [#uses=1]
18 %tmp2 = extractelement <4 x float> %tmp7, i32 2 ; <float> [#uses=1]
22 define void @test3(float* %R, <4 x float>* %P1) nounwind {
23 %X = load <4 x float>* %P1 ; <<4 x float>> [#uses=1]
24 %tmp = extractelement <4 x float> %X, i32 3 ; <float> [#uses=1]
25 store float %tmp, float* %R
29 define double @test4(double %A) nounwind {
30 %tmp1 = call <2 x double> @foo( ) ; <<2 x double>> [#uses=1]
31 %tmp2 = extractelement <2 x double> %tmp1, i32 1 ; <double> [#uses=1]
32 %tmp3 = add double %tmp2, %A ; <double> [#uses=1]
36 declare <2 x double> @foo()