summaryrefslogtreecommitdiff
path: root/test/CodeGen/XCore/unaligned_store_combine.ll
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2009-07-16 12:50:48 +0000
committerRichard Osborne <richard@xmos.com>2009-07-16 12:50:48 +0000
commitdb9e697725e81edb4c5cb80f8dc7b412431be0d0 (patch)
tree80f5ef0a5272129d63b9bf48a0254c0f685aa612 /test/CodeGen/XCore/unaligned_store_combine.ll
parent787e90f8627251fd2c63e2e5e17132e22d5d606a (diff)
downloadllvm-db9e697725e81edb4c5cb80f8dc7b412431be0d0.tar.gz
llvm-db9e697725e81edb4c5cb80f8dc7b412431be0d0.tar.bz2
llvm-db9e697725e81edb4c5cb80f8dc7b412431be0d0.tar.xz
Combine an unaligned store of unaligned load into a memmove.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/XCore/unaligned_store_combine.ll')
-rw-r--r--test/CodeGen/XCore/unaligned_store_combine.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/unaligned_store_combine.ll b/test/CodeGen/XCore/unaligned_store_combine.ll
new file mode 100644
index 0000000000..b61cf86988
--- /dev/null
+++ b/test/CodeGen/XCore/unaligned_store_combine.ll
@@ -0,0 +1,12 @@
+; RUN: llvm-as < %s | llc -march=xcore > %t1.s
+; RUN: grep "bl memmove" %t1.s | count 1
+; RUN: grep "ldc r., 8" %t1.s | count 1
+
+; Unaligned load / store pair. Should be combined into a memmove
+; of size 8
+define void @f(i64* %dst, i64* %src) nounwind {
+entry:
+ %0 = load i64* %src, align 1
+ store i64 %0, i64* %dst, align 1
+ ret void
+}