blob: 3d73a87f84d0cacd34109bd0a6aa2c463eb715b9 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse2 | grep shufps
2; RUN: llvm-upgrade < %s | llvm-as | llc -march=x86 -mattr=+sse3 | grep movddup
3
4void %test_v4sf(<4 x float>* %P, <4 x float>* %Q, float %X) {
5 %tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0
6 %tmp2 = insertelement <4 x float> %tmp, float %X, uint 1
7 %tmp4 = insertelement <4 x float> %tmp2, float %X, uint 2
8 %tmp6 = insertelement <4 x float> %tmp4, float %X, uint 3
9 %tmp8 = load <4 x float>* %Q
10 %tmp10 = mul <4 x float> %tmp8, %tmp6
11 store <4 x float> %tmp10, <4 x float>* %P
12 ret void
13}
14
15void %test_v2sd(<2 x double>* %P, <2 x double>* %Q, double %X) {
16 %tmp = insertelement <2 x double> zeroinitializer, double %X, uint 0
17 %tmp2 = insertelement <2 x double> %tmp, double %X, uint 1
18 %tmp4 = load <2 x double>* %Q
19 %tmp6 = mul <2 x double> %tmp4, %tmp2
20 store <2 x double> %tmp6, <2 x double>* %P
21 ret void
22}