1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/CodeGen/ARM/tail-call-weak.ll
Tim Northover 3173845201 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
2016-05-10 19:17:47 +00:00

19 lines
638 B
LLVM

; RUN: llc -mtriple thumbv7-windows-coff -filetype asm -o - %s | FileCheck %s -check-prefix CHECK-COFF
; RUN: llc -mtriple thumbv7-elf -filetype asm -o - %s | FileCheck %s -check-prefix CHECK-OTHER
; RUN: llc -mtriple thumbv7-macho -filetype asm -o - %s | FileCheck %s -check-prefix CHECK-OTHER
declare i8* @f()
declare extern_weak i8* @g(i8*)
; weak symbol resolution occurs statically in PE/COFF, ensure that we permit
; tail calls on weak externals when targeting a COFF environment.
define void @test() {
%call = tail call i8* @f()
%call1 = tail call i8* @g(i8* %call)
ret void
}
; CHECK-COFF: b g
; CHECK-OTHER: bl {{_?}}g