1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 12:12:47 +01:00
llvm-mirror/test/CodeGen/ARM/arm-macho-tail.ll
Tim Northover 5bb9dd7c78 ARM: use an external relocation for calls from MachO ARM mode.
The internal (__text-relative) relocation risks the offset not being encodable
if the destination is Thumb.

llvm-svn: 311187
2017-08-18 19:13:56 +00:00

17 lines
457 B
LLVM

; RUN: llc -mtriple=thumbv7-apple-watchos %s -filetype=obj -o %t
; RUN: llvm-objdump -r %t | FileCheck %s
; Relocation needs to explicitly mention _bar rather than be __text relative
; because the __text relative offset is not encodable in an ARM instruction.
; CHECK: ARM_RELOC_BR24 _bar
define void @foo() "target-features"="-thumb-mode" {
tail call void @bar()
ret void
}
define void @one_inst() { ret void }
define void @bar() {
ret void
}