blob: 37f84b74f7f8c3d77fbe110bcf442446c181295c [file] [log] [blame]
Evan Chengf4649a52006-04-20 17:50:10 +00001; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 1
2; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep pinsrw | wc -l | grep 2
3
4void %test(<4 x float>* %F, int %I) {
5 %tmp = load <4 x float>* %F
6 %f = cast int %I to float
7 %tmp1 = insertelement <4 x float> %tmp, float %f, uint 0
8 %tmp18 = add <4 x float> %tmp1, %tmp1
9 store <4 x float> %tmp18, <4 x float>* %F
10 ret void
11}
12
13void %test2(<4 x float>* %F, int %I, float %g) {
14 %tmp = load <4 x float>* %F
15 %f = cast int %I to float
16 %tmp1 = insertelement <4 x float> %tmp, float %f, uint 2
17 store <4 x float> %tmp1, <4 x float>* %F
18 ret void
19}