aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Thumb/cortex-m0-unaligned-access.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Thumb/cortex-m0-unaligned-access.ll')
-rw-r--r--test/CodeGen/Thumb/cortex-m0-unaligned-access.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb/cortex-m0-unaligned-access.ll b/test/CodeGen/Thumb/cortex-m0-unaligned-access.ll
new file mode 100644
index 0000000..c4403fe
--- /dev/null
+++ b/test/CodeGen/Thumb/cortex-m0-unaligned-access.ll
@@ -0,0 +1,13 @@
+; RUN: llc -mtriple=thumbv6m-apple-unknown-macho < %s | FileCheck --check-prefix=V6M %s
+; RUN: llc -mtriple=thumbv7m-apple-unknown-macho < %s | FileCheck --check-prefix=V7M %s
+
+define i32 @split_load(i32* %p) nounwind {
+; V6M-LABEL: split_load
+; V6M: ldrh
+; V6M: ldrh
+; V7M-LABEL: split_load
+; V7M-NOT: ldrh
+; V7M: bx lr
+ %val = load i32* %p, align 2
+ ret i32 %val
+}