Skip to content

[libc] Fix unused statements in asin when accurate path is not needed.#150726

Merged
lntue merged 1 commit intollvm:mainfrom
lntue:fix
Jul 26, 2025
Merged

[libc] Fix unused statements in asin when accurate path is not needed.#150726
lntue merged 1 commit intollvm:mainfrom
lntue:fix

Conversation

@lntue
Copy link
Copy Markdown
Contributor

@lntue lntue commented Jul 26, 2025

@lntue lntue requested review from Kewen12, bassiounix and jhuber6 July 26, 2025 01:00
@llvmbot llvmbot added the libc label Jul 26, 2025
@llvmbot
Copy link
Copy Markdown
Member

llvmbot commented Jul 26, 2025

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

Fix offload build bots: https://lab.llvm.org/buildbot/#/builders/10/builds/10213


Full diff: https://github.com/llvm/llvm-project/pull/150726.diff

1 Files Affected:

  • (modified) libc/src/__support/math/asin.h (+3-2)
diff --git a/libc/src/__support/math/asin.h b/libc/src/__support/math/asin.h
index 9734f349688c0..84fc1cfd5679e 100644
--- a/libc/src/__support/math/asin.h
+++ b/libc/src/__support/math/asin.h
@@ -27,8 +27,6 @@ namespace math {
 
 static constexpr double asin(double x) {
   using namespace asin_internal;
-  using Float128 = fputil::DyadicFloat<128>;
-  using DoubleDouble = fputil::DoubleDouble;
   using FPBits = fputil::FPBits<double>;
 
   FPBits xbits(x);
@@ -76,6 +74,9 @@ static constexpr double asin(double x) {
 #ifdef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
     return x * asin_eval(x * x);
 #else
+    using Float128 = fputil::DyadicFloat<128>;
+    using DoubleDouble = fputil::DoubleDouble;
+
     unsigned idx = 0;
     DoubleDouble x_sq = fputil::exact_mult(x, x);
     double err = xbits.abs().get_val() * 0x1.0p-51;

@lntue lntue merged commit 37ccb45 into llvm:main Jul 26, 2025
16 of 21 checks passed
@lntue lntue deleted the fix branch July 26, 2025 01:38
@Kewen12
Copy link
Copy Markdown
Contributor

Kewen12 commented Jul 26, 2025

Thanks for the fix! Our bot is happy.

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