blob: 03d71b99d297b580413016545416b0b6c7ba7498 [file] [log] [blame]
Evan Chengcb095c12006-04-20 17:59:30 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 3
2; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep unpckhps | wc -l | grep 1
3; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pshufd | wc -l | grep 1
4
5void %test1(<4 x float>* %F, float* %f) {
6 %tmp = load <4 x float>* %F
7 %tmp7 = add <4 x float> %tmp, %tmp
8 %tmp2 = extractelement <4 x float> %tmp7, uint 0
9 store float %tmp2, float* %f
10 ret void
11}
12
13float %test2(<4 x float>* %F, float* %f) {
14 %tmp = load <4 x float>* %F
15 %tmp7 = add <4 x float> %tmp, %tmp
16 %tmp2 = extractelement <4 x float> %tmp7, uint 2
17 ret float %tmp2
18}
19
20void %test2(float* %R, <4 x float>* %P1) {
21 %X = load <4 x float>* %P1
22 %tmp = extractelement <4 x float> %X, uint 2
23 store float %tmp, float* %R
24 ret void
25}