aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/i64-mem-copy.ll
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-03-12 05:59:15 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-03-12 05:59:15 +0000
commit536e66764b93fd1368ce4d1f753cbe909c05b62d (patch)
tree5eb23f5f6b44671db2e35e80554adfdb80a6374c /test/CodeGen/X86/i64-mem-copy.ll
parent1285295e6152ce7f33c35c034519d3f9dff5b178 (diff)
downloadexternal_llvm-536e66764b93fd1368ce4d1f753cbe909c05b62d.zip
external_llvm-536e66764b93fd1368ce4d1f753cbe909c05b62d.tar.gz
external_llvm-536e66764b93fd1368ce4d1f753cbe909c05b62d.tar.bz2
On x86, if the only use of a i64 load is a i64 store, generate a pair of double load and store instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/i64-mem-copy.ll')
-rw-r--r--test/CodeGen/X86/i64-mem-copy.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/X86/i64-mem-copy.ll b/test/CodeGen/X86/i64-mem-copy.ll
new file mode 100644
index 0000000..ce54011
--- /dev/null
+++ b/test/CodeGen/X86/i64-mem-copy.ll
@@ -0,0 +1,13 @@
+; RUN: llvm-as < %s | llc -march=x86-64 | grep {movq.*(%rsi), %rax}
+; RUN: llvm-as < %s | llc -march=x86 -mattr=+sse2 | grep {movsd.*(%eax),}
+
+; Uses movsd to load / store i64 values in sse2 is available.
+
+; rdar://6659858
+
+define void @foo(i64* %x, i64* %y) nounwind {
+entry:
+ %tmp1 = load i64* %y, align 8 ; <i64> [#uses=1]
+ store i64 %tmp1, i64* %x, align 8
+ ret void
+}