blob: 8ee0484fda1076c3fdce01e85fcfd202f017617e [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
Dan Gohman8c89a502007-08-15 13:36:28 +00002; RUN: grep movss %t | count 1
3; RUN: grep pinsrw %t | count 2
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
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}