Convert tests using "| wc -l | grep ..." to use the count script.
[oota-llvm.git] / test / CodeGen / X86 / vec_extract.ll
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
6
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
12         ret void
13 }
14
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
19         ret float %tmp2
20 }
21
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
26         ret void
27 }
28
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
33         ret double %tmp3
34 }
35
36 declare <2 x double> %foo()