aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Thumb/cortex-m0-unaligned-access.ll
blob: c4403fe7efe611957752187fdcea30be74b3e30c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
}