aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/XCore
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/XCore')
-rw-r--r--test/CodeGen/XCore/unaligned_load.ll9
-rw-r--r--test/CodeGen/XCore/unaligned_store.ll9
2 files changed, 18 insertions, 0 deletions
diff --git a/test/CodeGen/XCore/unaligned_load.ll b/test/CodeGen/XCore/unaligned_load.ll
new file mode 100644
index 0000000..a6a5089
--- /dev/null
+++ b/test/CodeGen/XCore/unaligned_load.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=xcore > %t1.s
+; RUN: grep "bl __misaligned_load" %t1.s | count 1
+
+; Byte aligned load. Expands to call to __misaligned_load.
+define i32 @align1(i32* %p) nounwind {
+entry:
+ %0 = load i32* %p, align 1 ; <i32> [#uses=1]
+ ret i32 %0
+}
diff --git a/test/CodeGen/XCore/unaligned_store.ll b/test/CodeGen/XCore/unaligned_store.ll
new file mode 100644
index 0000000..b7a5192
--- /dev/null
+++ b/test/CodeGen/XCore/unaligned_store.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -march=xcore > %t1.s
+; RUN: grep "bl __misaligned_store" %t1.s | count 1
+
+; Byte aligned store. Expands to call to __misaligned_store.
+define void @align1(i32* %p, i32 %val) nounwind {
+entry:
+ store i32 %val, i32* %p, align 1
+ ret void
+}