[PATCH] D41338: [CodeGen] lower math intrinsics to finite version of libcalls when possible (PR35672)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 27 08:22:32 PST 2017


spatel updated this revision to Diff 128236.
spatel added a comment.

Patch updated:

1. Fixed the availability checking for finite functions in TargetLibraryInfoImpl - these only exist on Linux.
2. Added a darwin triple to the test file to show that is behaving as expected (no finite calls there).

IIUC, if we're going to improve the long double availability / lowering, then we'll want to do that for all of the math functions (not just the finite variants). So I deferred making any changes related to that here. Also, I haven't added {exp2, log, log10, log2, pow} yet just to keep the patch small until we're sure this is correct. If it is correct, then the other nodes should be simple edits of how we handle exp, and I'll add them.


https://reviews.llvm.org/D41338

Files:
  include/llvm/CodeGen/RuntimeLibcalls.def
  include/llvm/CodeGen/SelectionDAG.h
  lib/Analysis/TargetLibraryInfo.cpp
  lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  test/CodeGen/X86/finite-libcalls.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41338.128236.patch
Type: text/x-patch
Size: 12050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171227/60bdc270/attachment-0001.bin>


More information about the llvm-commits mailing list