aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-25 05:58:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-25 05:58:52 +0000
commitf09d3ce67179e893342448376efb7503862ac4ad (patch)
tree095a23c99a88b9dc4ef380b95a7f05a8d2f60df8 /test
parentea93f639640f8f1a80c7ffef3a465bc6017b0d35 (diff)
downloadexternal_llvm-f09d3ce67179e893342448376efb7503862ac4ad.zip
external_llvm-f09d3ce67179e893342448376efb7503862ac4ad.tar.gz
external_llvm-f09d3ce67179e893342448376efb7503862ac4ad.tar.bz2
Added a scalar to vector with zero extension testcase
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/CodeGen/X86/vec_zexts2v.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_zexts2v.ll b/test/CodeGen/X86/vec_zexts2v.ll
new file mode 100644
index 0000000..a2ff6c8
--- /dev/null
+++ b/test/CodeGen/X86/vec_zexts2v.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movss | wc -l | grep 2
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep xorps | wc -l | grep 1
+
+void %test1(<4 x float>* %b, float %X) {
+ %tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0
+ %tmp1 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1
+ %tmp2 = insertelement <4 x float> %tmp1, float 0.000000e+00, uint 2
+ %tmp3 = insertelement <4 x float> %tmp2, float 0.000000e+00, uint 3
+ store <4 x float> %tmp3, <4 x float>* %b
+ ret void
+}
+
+void %test2(<4 x float>* %b, float %X, float %Y) {
+ %tmp2 = mul float %X, %Y
+ %tmp = insertelement <4 x float> zeroinitializer, float %tmp2, uint 0
+ %tmp4 = insertelement <4 x float> %tmp, float 0.000000e+00, uint 1
+ %tmp5 = insertelement <4 x float> %tmp4, float 0.000000e+00, uint 2
+ %tmp6 = insertelement <4 x float> %tmp5, float 0.000000e+00, uint 3
+ store <4 x float> %tmp6, <4 x float>* %b
+ ret void
+}