[libc-commits] [libc] [llvm] [libc][math] Refactor sqrtf128 to header only (PR #177760)
via libc-commits
libc-commits at lists.llvm.org
Thu Jan 29 10:39:44 PST 2026
Iasonaskrpr wrote:
Note on constexpr and static Constraints
I have reverted sqrtf128 to a standard LIBC_INLINE function and adjusted the prod_hi specializations. After attempting to implement the suggested constexpr qualifiers, I encountered the following blocking issues during the build:
constexpr: The sqrtf128 function relies on fputil::get_round() to handle dynamic rounding modes. Since get_round() reads hardware registers at runtime, it is not a constexpr function. This causes the program to not compile with -Winvalid-constexpr
Template Specialization Storage Class: Applying static to the explicit specializations of prod_hi resulted in a compilation failure (error: explicit specialization cannot have a storage class). Doesn't build with -Werror,-Wexplicit-specialization-storage-class
The implementation now builds successfully with -Werror across both Ninja and Bazel build systems.
The full error can be seen above in the Linux x64 test details
https://github.com/llvm/llvm-project/pull/177760
More information about the libc-commits
mailing list