ARM: permit tail calls to weak externals on COFF
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 3 Jan 2015 21:35:00 +0000 (21:35 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 3 Jan 2015 21:35:00 +0000 (21:35 +0000)
commit97f8f69a7fe4d28743c92bdb0daf169558a3e3ba
tree878ea2743d443bd1d9405dbf3a61b1d9c1e2561d
parente05b232c20fb179d89acd469bea1cb6d1ea6c81f
ARM: permit tail calls to weak externals on COFF

Weak externals are resolved statically, so we can actually generate the tail
call on PE/COFF targets without breaking the requirements.  It is questionable
whether we want to propagate the current behaviour for MachO as the requirements
are part of the ARM ELF specifications, and it seems that prior to the SVN
r215890, we would have tail'ed the call.  For now, be conservative and only
permit it on PE/COFF where the call will always be fully resolved.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@225119 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/tail-call-weak.ll [new file with mode: 0644]