libstdc++: Use more precise __RECIPROCAL_MATH__ macro
Commit Message
Tested on x86_64-pc-linux-gnu.
--------- 8< -----------
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
libstdc++-v3/ChangeLog:
* include/experimental/bits/simd_x86.h
(_SimdImplX86::_S_divides): Replace test for __GCC_IEC_559 == 0
with __RECIPROCAL_MATH__.
---
libstdc++-v3/include/experimental/bits/simd_x86.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--
──────────────────────────────────────────────────────────────────────────
Dr. Matthias Kretz https://mattkretz.github.io
GSI Helmholtz Centre for Heavy Ion Research https://gsi.de
stdₓ::simd
──────────────────────────────────────────────────────────────────────────
Comments
On Tue, 21 Mar 2023 at 17:05, Matthias Kretz via Libstdc++ <
libstdc++@gcc.gnu.org> wrote:
> Tested on x86_64-pc-linux-gnu.
>
> --------- 8< -----------
>
> Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
>
> libstdc++-v3/ChangeLog:
>
> * include/experimental/bits/simd_x86.h
> (_SimdImplX86::_S_divides): Replace test for __GCC_IEC_559 == 0
> with __RECIPROCAL_MATH__.
OK
@@ -1469,7 +1469,7 @@ _CsrGuard()
[&__xf, &__yf](auto __i) _GLIBCXX_SIMD_ALWAYS_INLINE_LAMBDA
-> _SimdWrapper<_Float, __n_intermediate>
{
-#if __GCC_IEC_559 == 0
+#if __RECIPROCAL_MATH__
// If -freciprocal-math is active, using the `/` operator is
// incorrect because it may be translated to an imprecise
// multiplication with reciprocal. We need to use inline