summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/vec_splat.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-22 21:39:25 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-22 21:39:25 +0000
commit7de48c143adcea967a12279cbac3f4486393fe8f (patch)
treee109d2ca17152d2bc75cbc244ccbf137a6275040 /test/CodeGen/X86/vec_splat.ll
parente9aba8bcc0ced4eb3d8683db8fb7d7ef9c1d54ec (diff)
downloadllvm-7de48c143adcea967a12279cbac3f4486393fe8f.tar.gz
llvm-7de48c143adcea967a12279cbac3f4486393fe8f.tar.bz2
llvm-7de48c143adcea967a12279cbac3f4486393fe8f.tar.xz
Replace vector splat test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26963 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/vec_splat.ll')
-rw-r--r--test/CodeGen/X86/vec_splat.ll22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_splat.ll b/test/CodeGen/X86/vec_splat.ll
new file mode 100644
index 0000000000..2d4bd2d5f0
--- /dev/null
+++ b/test/CodeGen/X86/vec_splat.ll
@@ -0,0 +1,22 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep shufps
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlhps
+
+void %test_v4sf(<4 x float>* %P, <4 x float>* %Q, float %X) {
+ %tmp = insertelement <4 x float> zeroinitializer, float %X, uint 0
+ %tmp2 = insertelement <4 x float> %tmp, float %X, uint 1
+ %tmp4 = insertelement <4 x float> %tmp2, float %X, uint 2
+ %tmp6 = insertelement <4 x float> %tmp4, float %X, uint 3
+ %tmp8 = load <4 x float>* %Q
+ %tmp10 = mul <4 x float> %tmp8, %tmp6
+ store <4 x float> %tmp10, <4 x float>* %P
+ ret void
+}
+
+void %test_v2sd(<2 x double>* %P, <2 x double>* %Q, double %X) {
+ %tmp = insertelement <2 x double> zeroinitializer, double %X, uint 0
+ %tmp2 = insertelement <2 x double> %tmp, double %X, uint 1
+ %tmp4 = load <2 x double>* %Q
+ %tmp6 = mul <2 x double> %tmp4, %tmp2
+ store <2 x double> %tmp6, <2 x double>* %P
+ ret void
+}