This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Refactor libcall lookups for RTLIB::POWI_*
ClosedPublic

Authored by bjope on May 24 2021, 2:44 PM.

Details

Summary

Use RuntimeLibcalls to get a common way to pick correct RTLIB::POWI_*
libcall for a given value type.

This includes a small refactoring of ExpandFPLibCall and
ExpandArgFPLibCall in SelectionDAGLegalize to share a bit of code,
plus adding an ExpandFPLibCall version that can be called directly
when expanding FPOWI/STRICT_FPOWI to ensure that we actually use
the same RTLIB::Libcall when expanding the libcall as we used when
checking the legality of such a call by doing a getLibcallName check.

Diff Detail