For PR1553:
[oota-llvm.git] / test / CodeGen / X86 / vec_insert.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 -o %t -f
2 ; RUN: grep movss  %t | wc -l | grep 1
3 ; RUN: grep pinsrw %t | wc -l | grep 2
4
5 void %test(<4 x float>* %F, int %I) {
6         %tmp = load <4 x float>* %F
7         %f = cast int %I to float
8         %tmp1 = insertelement <4 x float> %tmp, float %f, uint 0
9         %tmp18 = add <4 x float> %tmp1, %tmp1
10         store <4 x float> %tmp18, <4 x float>* %F
11         ret void
12 }
13
14 void %test2(<4 x float>* %F, int %I, float %g) {
15         %tmp = load <4 x float>* %F
16         %f = cast int %I to float
17         %tmp1 = insertelement <4 x float> %tmp, float %f, uint 2
18         store <4 x float> %tmp1, <4 x float>* %F
19         ret void
20 }