public inbox for libstdc++-cvs@sourceware.org help / color / mirror / Atom feed
From: Matthias Kretz <mkretz@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r12-9184] libstdc++: Fix incorrect function call in -ffast-math optimization Date: Thu, 16 Feb 2023 21:04:25 +0000 (GMT) [thread overview] Message-ID: <20230216210425.68F43385828E@sourceware.org> (raw) https://gcc.gnu.org/g:c70a6414d74431a9370c6806ea04882185774fe9 commit r12-9184-gc70a6414d74431a9370c6806ea04882185774fe9 Author: Matthias Kretz <m.kretz@gsi.de> Date: Fri Feb 3 17:47:05 2023 +0100 libstdc++: Fix incorrect function call in -ffast-math optimization Signed-off-by: Matthias Kretz <m.kretz@gsi.de> libstdc++-v3/ChangeLog: * include/experimental/bits/simd_math.h (__hypot): Bitcasting between scalars requires the __bit_cast helper function instead of simd_bit_cast. (cherry picked from commit a5de17d9120dde7e6598a05ea4d1556c2783c69b) Diff: --- libstdc++-v3/include/experimental/bits/simd_math.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/experimental/bits/simd_math.h b/libstdc++-v3/include/experimental/bits/simd_math.h index 5fe44adceb5..b008139c11c 100644 --- a/libstdc++-v3/include/experimental/bits/simd_math.h +++ b/libstdc++-v3/include/experimental/bits/simd_math.h @@ -1010,7 +1010,7 @@ template <typename _VV, typename = __detail::__odr_helper> using _IV = rebind_simd_t<_Ip, _V>; const auto __as_int = simd_bit_cast<_IV>(__hi_exp); const _V __scale - = simd_bit_cast<_V>(2 * simd_bit_cast<_Ip>(_Tp(1)) - __as_int); + = simd_bit_cast<_V>(2 * __bit_cast<_Ip>(_Tp(1)) - __as_int); #else const _V __scale = (__hi_exp ^ __inf) * _Tp(.5); #endif @@ -1180,7 +1180,7 @@ _GLIBCXX_SIMD_CVTING2(hypot) using _IV = rebind_simd_t<_Ip, _V>; const auto __as_int = simd_bit_cast<_IV>(__hi_exp); const _V __scale - = simd_bit_cast<_V>(2 * simd_bit_cast<_Ip>(_Tp(1)) - __as_int); + = simd_bit_cast<_V>(2 * __bit_cast<_Ip>(_Tp(1)) - __as_int); #else const _V __scale = (__hi_exp ^ __inf) * _Tp(.5); #endif
reply other threads:[~2023-02-16 21:04 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230216210425.68F43385828E@sourceware.org \ --to=mkretz@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).