2121
2222namespace LIBC_NAMESPACE_DECL {
2323
24+ #ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
2425static constexpr size_t N_EXCEPTS = 2 ;
2526
2627// Exceptional values when |x| <= 0.5
@@ -40,6 +41,7 @@ static constexpr fputil::ExceptValues<float, N_EXCEPTS> ASINF_EXCEPTS_HI = {{
4041 // x = 0x1.ee836cp-1, asinf(x) = 0x1.4f0654p0 (RZ)
4142 {0x3f7741b6 , 0x3fa7832a , 1 , 0 , 0 },
4243}};
44+ #endif // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
4345
4446LLVM_LIBC_FUNCTION (float , asinf, (float x)) {
4547 using FPBits = typename fputil::FPBits<float >;
@@ -82,10 +84,12 @@ LLVM_LIBC_FUNCTION(float, asinf, (float x)) {
8284#endif // LIBC_TARGET_CPU_HAS_FMA_FLOAT
8385 }
8486
87+ #ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
8588 // Check for exceptional values
8689 if (auto r = ASINF_EXCEPTS_LO.lookup_odd (x_abs, x_sign);
8790 LIBC_UNLIKELY (r.has_value ()))
8891 return r.value ();
92+ #endif // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
8993
9094 // For |x| <= 0.5, we approximate asinf(x) by:
9195 // asin(x) = x * P(x^2)
@@ -111,10 +115,12 @@ LLVM_LIBC_FUNCTION(float, asinf, (float x)) {
111115 return FPBits::quiet_nan ().get_val ();
112116 }
113117
118+ #ifndef LIBC_MATH_HAS_SKIP_ACCURATE_PASS
114119 // Check for exceptional values
115120 if (auto r = ASINF_EXCEPTS_HI.lookup_odd (x_abs, x_sign);
116121 LIBC_UNLIKELY (r.has_value ()))
117122 return r.value ();
123+ #endif // !LIBC_MATH_HAS_SKIP_ACCURATE_PASS
118124
119125 // When |x| > 0.5, we perform range reduction as follow:
120126 //
0 commit comments