blob: 6f411b82cb3246aaf5dbac770d704395272310f1 [file] [log] [blame]
Evan Cheng22591412006-04-21 04:58:23 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 3 &&
Evan Chengcb309062006-05-31 00:48:09 +00002; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhlps | wc -l | grep 1 &&
Evan Chengcb095c12006-04-20 17:59:30 +00003; 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
Evan Chengcb309062006-05-31 00:48:09 +000022 %tmp = extractelement <4 x float> %X, uint 3
Evan Chengcb095c12006-04-20 17:59:30 +000023 store float %tmp, float* %R
24 ret void
25}