aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-05-24 00:10:02 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-05-24 00:10:02 +0000
commitef1ba3844d4bcd118a0b944c7f107cc1af10c37d (patch)
tree42e6fe8ddb365f698d638d32e8efa32d39455791
parent4797f61657fc32d2e4e806f9f8faadf3fee3e64c (diff)
New loadl_pd and loadh_pd tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51525 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/X86/vec_loadhl.ll19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/CodeGen/X86/vec_loadhl.ll b/test/CodeGen/X86/vec_loadhl.ll
new file mode 100644
index 0000000000..88e303d4a0
--- /dev/null
+++ b/test/CodeGen/X86/vec_loadhl.ll
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movlpd
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep movhpd
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | not grep movsd
+
+define void @t1(<2 x double>* %r, <2 x double>* %A, double %B) nounwind {
+ %tmp3 = load <2 x double>* %A, align 16
+ %tmp7 = insertelement <2 x double> undef, double %B, i32 0
+ %tmp9 = shufflevector <2 x double> %tmp3, <2 x double> %tmp7, <2 x i32> < i32 2, i32 1 >
+ store <2 x double> %tmp9, <2 x double>* %r, align 16
+ ret void
+}
+
+define void @t2(<2 x double>* %r, <2 x double>* %A, double %B) nounwind {
+ %tmp3 = load <2 x double>* %A, align 16
+ %tmp7 = insertelement <2 x double> undef, double %B, i32 0
+ %tmp9 = shufflevector <2 x double> %tmp3, <2 x double> %tmp7, <2 x i32> < i32 0, i32 2 >
+ store <2 x double> %tmp9, <2 x double>* %r, align 16
+ ret void
+}