Evan Cheng | cb095c1 | 2006-04-20 17:59:30 +0000 | [diff] [blame^] | 1 | ; 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 | |
| 5 | void %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 | |
| 13 | float %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 | |
| 20 | void %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 | } |