1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -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 void %test1(<4 x float>* %F, float* %f) {
8 %tmp = load <4 x float>* %F
9 %tmp7 = add <4 x float> %tmp, %tmp
10 %tmp2 = extractelement <4 x float> %tmp7, uint 0
11 store float %tmp2, float* %f
15 float %test2(<4 x float>* %F, float* %f) {
16 %tmp = load <4 x float>* %F
17 %tmp7 = add <4 x float> %tmp, %tmp
18 %tmp2 = extractelement <4 x float> %tmp7, uint 2
22 void %test3(float* %R, <4 x float>* %P1) {
23 %X = load <4 x float>* %P1
24 %tmp = extractelement <4 x float> %X, uint 3
25 store float %tmp, float* %R
29 double %test4(double %A) {
30 %tmp1 = call <2 x double> %foo()
31 %tmp2 = extractelement <2 x double> %tmp1, uint 1
32 %tmp3 = add double %tmp2, %A
36 declare <2 x double> %foo()