[libc-commits] [PATCH] D118157: [libc] Improve hypotf performance with different algorithm correctly rounded to all rounding modes.

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Jan 25 12:20:39 PST 2022


lntue added inline comments.


================
Comment at: libc/src/math/generic/hypotf.cpp:32
+  // Take sqrt in double precision.
+  DoubleBits result(__builtin_sqrt(sumSq));
+
----------------
sivachandra wrote:
> A call to a target independent builtin for a standard function can lead to a call back to the libc. That is, compilers are free to call the `sqrt` function from the libc. We can refactor our `sqrt` implementation so that we can replace this call to `__builtin_sqrt` with a call to LLVM libc's `sqrt`.
I refactor our `sqrt` implementation in https://reviews.llvm.org/D118173
Will wait for that patch to be landed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118157/new/

https://reviews.llvm.org/D118157



More information about the libc-commits mailing list