blob: 021685e509e2498e559297a32f9f788c0f04807e [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; 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
5void %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
14void %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}