OSDN Git Service

Go back to sometimes assuming intristics are local.
authorRafael Espindola <rafael.espindola@gmail.com>
Sat, 10 Mar 2018 02:42:14 +0000 (02:42 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Sat, 10 Mar 2018 02:42:14 +0000 (02:42 +0000)
commit824eedb9eb4888575924b1ed80c4250dddd5b59b
tree48f688fce7fa6afb4d0a1f3f3a75e351df216953
parent87407bd5762e39e4790697014995920084b923ef
Go back to sometimes assuming intristics are local.

This fixes pr36674.

While it is valid for shouldAssumeDSOLocal to return false anytime,
always returning false for intrinsics is not optimal on i386 and also
hits a bug in the backend.

To use a plt, the caller must first setup ebx to handle the case of
that file being linked into a PIE executable or shared library. In
those cases the generated PLT uses ebx.

Currently we can produce "calll expf@plt" without setting ebx. We
could fix that by correctly setting ebx, but this would produce worse
code for the case where the runtime library is statically linked. It
would also required other tools to handle R_386_PLT32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327198 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/TargetMachine.cpp
test/CodeGen/X86/finite-libcalls.ll
test/CodeGen/X86/fmaxnum.ll
test/CodeGen/X86/fminnum.ll
test/CodeGen/X86/fp-cvt.ll
test/CodeGen/X86/fp-intrinsics.ll
test/CodeGen/X86/half.ll
test/CodeGen/X86/memset-nonzero.ll
test/CodeGen/X86/negative-sin.ll
test/CodeGen/X86/scalar-fp-to-i64.ll
test/CodeGen/X86/vector-half-conversions.ll