mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-15 16:09:02 +00:00
557221a0e1
The "long call" option forces the use of the indirect calling sequence for all calls (even those that don't really need it). GCC provides this option; This is helpful, under certain circumstances, for building very-large binaries, and some other specialized use cases. Fixes PR19098. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@280040 91177308-0d34-0410-b5e6-96231b3b80d8
27 lines
588 B
LLVM
27 lines
588 B
LLVM
; RUN: llc < %s | FileCheck %s
|
|
target datalayout = "E-m:e-i64:64-n32:64"
|
|
target triple = "powerpc64-unknown-linux-gnu"
|
|
|
|
; Function Attrs: nounwind
|
|
define void @bar() local_unnamed_addr #0 {
|
|
entry:
|
|
tail call void @foo() #1
|
|
ret void
|
|
|
|
; CHECK-LABEL: @bar
|
|
; CHECK: ld [[FD:[0-9]+]], .LC0@toc@l({{[0-9]+}})
|
|
; CHECK: ld [[ADDR:[0-9]+]], 0([[FD]])
|
|
; CHECK: mtctr [[ADDR]]
|
|
; CHECK: bctrl
|
|
; CHECK-NOT: bl foo
|
|
; CHECK: blr
|
|
}
|
|
|
|
; CHECK: .tc foo
|
|
|
|
declare void @foo() local_unnamed_addr
|
|
|
|
attributes #0 = { nounwind "target-cpu"="ppc64" "target-features"="+longcall" }
|
|
attributes #1 = { nounwind }
|
|
|