[libc-commits] [libc] [libc] Remove constexpr from asin_eval() (PR #151528)
via libc-commits
libc-commits at lists.llvm.org
Thu Jul 31 07:33:34 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: William Huynh (saturn691)
<details>
<summary>Changes</summary>
fputil::multiply_add is conditionally constexpr, on some architectures, it selects the non-constexpr version, resulting in a compile error.
---
Full diff: https://github.com/llvm/llvm-project/pull/151528.diff
1 Files Affected:
- (modified) libc/src/__support/math/asin_utils.h (+1-1)
``````````diff
diff --git a/libc/src/__support/math/asin_utils.h b/libc/src/__support/math/asin_utils.h
index e0c9096e2bb78..efe779c8a81fd 100644
--- a/libc/src/__support/math/asin_utils.h
+++ b/libc/src/__support/math/asin_utils.h
@@ -45,7 +45,7 @@ static constexpr double ASIN_COEFFS[12] = {
0x1.2b5993bda1d9bp-6, -0x1.806aff270bf25p-7, 0x1.02614e5ed3936p-5,
};
-LIBC_INLINE static constexpr double asin_eval(double u) {
+LIBC_INLINE double asin_eval(double u) {
double u2 = u * u;
double c0 = fputil::multiply_add(u, ASIN_COEFFS[1], ASIN_COEFFS[0]);
double c1 = fputil::multiply_add(u, ASIN_COEFFS[3], ASIN_COEFFS[2]);
``````````
</details>
https://github.com/llvm/llvm-project/pull/151528
More information about the libc-commits
mailing list