[PATCH] D44334: Go back to sometimes assuming intristics are local

Rafael Avila de Espindola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 9 16:00:16 PST 2018


espindola created this revision.
espindola added a reviewer: rnk.

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 at 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.


https://reviews.llvm.org/D44334

Files:
  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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44334.137864.patch
Type: text/x-patch
Size: 64331 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180310/27ac9760/attachment-0001.bin>


More information about the llvm-commits mailing list