diff options
author | Tim Northover <tnorthover@apple.com> | 2016-05-10 19:17:47 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2016-05-10 19:17:47 +0000 |
commit | b5ece527a15dd3e4da40edffc0360831fe473a53 (patch) | |
tree | 12016866d3c217eb3f441e19401b7d0b1998eb0c /llvm/test/CodeGen/ARM/local-call.ll | |
parent | ecf7d15d49de4f6810c3215c3df520983746a96c (diff) | |
download | bcm5719-llvm-b5ece527a15dd3e4da40edffc0360831fe473a53.tar.gz bcm5719-llvm-b5ece527a15dd3e4da40edffc0360831fe473a53.zip |
ARM: stop emitting blx instructions for most calls on MachO.
I'm really not sure why we were in the first place, it's the linker's job to
convert between BL/BLX as necessary. Even worse, using BLX left Thumb calls
that could be locally resolved completely unencodable since all offsets to BLX
are multiples of 4.
rdar://26182344
llvm-svn: 269101
Diffstat (limited to 'llvm/test/CodeGen/ARM/local-call.ll')
-rw-r--r-- | llvm/test/CodeGen/ARM/local-call.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/ARM/local-call.ll b/llvm/test/CodeGen/ARM/local-call.ll new file mode 100644 index 00000000000..a38df62ff90 --- /dev/null +++ b/llvm/test/CodeGen/ARM/local-call.ll @@ -0,0 +1,20 @@ +; RUN: llc -mtriple=thumbv7-apple-ios -filetype=obj %s -o %t +; RUN: llvm-objdump -macho -d %t | FileCheck %s + +; This function just messes up the offsets enough to make the libcall in +; test_local_call unencodable with a blx. +define void @thing() { + ret void +} + +define i64 @__udivdi3(i64 %a, i64 %b) { + ret i64 %b +} + +define i64 @test_local_call(i64 %a, i64 %b) { +; CHECK-LABEL: test_local_call: +; CHECK: bl ___udivdi3 + +%res = udiv i64 %a, %b + ret i64 %res +}
\ No newline at end of file |