summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/XCore/unaligned_store_combine.ll
diff options
context:
space:
mode:
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 0000000..493ca6a
--- /dev/null
+++ b/test/CodeGen/XCore/unaligned_store_combine.ll
@@ -0,0 +1,12 @@
+; RUN: llc < %s -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
+}
OpenPOWER on IntegriCloud