Skip to content

[libc] Remove constexpr from asin_eval() #151528

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2025
Merged

[libc] Remove constexpr from asin_eval() #151528

merged 1 commit into from
Jul 31, 2025

Conversation

saturn691
Copy link
Contributor

fputil::multiply_add is conditionally constexpr, on some architectures, it selects the non-constexpr version, resulting in a compile error.

fputil::multiply_add is conditionally constexpr, on some
architectures, it selects the non-constexpr version, resulting
in a compile error.
@llvmbot
Copy link
Member

llvmbot commented Jul 31, 2025

@llvm/pr-subscribers-libc

Author: William Huynh (saturn691)

Changes

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 --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]);

@lntue lntue merged commit 38fa11f into llvm:main Jul 31, 2025
21 checks passed
@saturn691 saturn691 deleted the libc-asin branch July 31, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants