[libc-commits] [libc] [llvm] [libc][math][c23] Improve rsqrtf16 function for targets without fp32 FPUs. (PR #160639)

via libc-commits libc-commits at lists.llvm.org
Tue Jun 16 09:06:18 PDT 2026


================
@@ -24,6 +24,237 @@
 namespace LIBC_NAMESPACE_DECL {
 namespace math {
 
+namespace rsqrtf16_internal {
+
+using FPBits = fputil::FPBits<float16>;
----------------
lntue wrote:

We should keep the original path.  It just needs some optimizations to use the native float16 instructions when available, especially for the conversion, then it will have a much higher throughput.  It will also consume less memory than the integer implementation.

https://github.com/llvm/llvm-project/pull/160639


More information about the libc-commits mailing list