Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-25 Thread Jonathan Wakely via Gcc-patches
On Thu, 24 Jun 2021 at 15:02, Matthias Kretz wrote: > > For -ffast-math there was a missing using namespace __proposed left. The > attached patch resolves the issue. OK for trunk, please push (after adding yourself to the "Write After Approval" section of MAINTAINERS as per https://gcc.gnu.org/git

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 24, 2021 at 03:40:09PM +0100, Jonathan Wakely wrote: > On Thu, 24 Jun 2021 at 15:34, Jonathan Wakely wrote: > > Rather than use the _GLIBCXX_HAS_BUILTIN macro more widely, I'd prefer > > to not use it where it isn't needed, as in the attached (untested) > > patch. > > My rationale for

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 24 Jun 2021 at 15:34, Jonathan Wakely wrote: > Rather than use the _GLIBCXX_HAS_BUILTIN macro more widely, I'd prefer > to not use it where it isn't needed, as in the attached (untested) > patch. My rationale for this is that I'd prefer to use standardized features like __has_include and _

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 24 Jun 2021 at 15:21, Jakub Jelinek wrote: > > On Thu, Jun 24, 2021 at 03:11:01PM +0100, Jonathan Wakely wrote: > > On Thu, 24 Jun 2021 at 15:08, Jakub Jelinek wrote: > > > > > > On Thu, Jun 24, 2021 at 04:01:34PM +0200, Matthias Kretz wrote: > > > > --- a/libstdc++-v3/include/experimental

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 24, 2021 at 03:11:01PM +0100, Jonathan Wakely wrote: > On Thu, 24 Jun 2021 at 15:08, Jakub Jelinek wrote: > > > > On Thu, Jun 24, 2021 at 04:01:34PM +0200, Matthias Kretz wrote: > > > --- a/libstdc++-v3/include/experimental/bits/simd.h > > > +++ b/libstdc++-v3/include/experimental/bits/

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 24 Jun 2021 at 15:11, Jonathan Wakely wrote: > > On Thu, 24 Jun 2021 at 15:08, Jakub Jelinek wrote: > > > > On Thu, Jun 24, 2021 at 04:01:34PM +0200, Matthias Kretz wrote: > > > --- a/libstdc++-v3/include/experimental/bits/simd.h > > > +++ b/libstdc++-v3/include/experimental/bits/simd.h > >

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jonathan Wakely via Gcc-patches
On Thu, 24 Jun 2021 at 15:08, Jakub Jelinek wrote: > > On Thu, Jun 24, 2021 at 04:01:34PM +0200, Matthias Kretz wrote: > > --- a/libstdc++-v3/include/experimental/bits/simd.h > > +++ b/libstdc++-v3/include/experimental/bits/simd.h > > @@ -1598,7 +1598,9 @@ template > >_GLIBCXX_SIMD_INTRINSIC c

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Jakub Jelinek via Gcc-patches
On Thu, Jun 24, 2021 at 04:01:34PM +0200, Matthias Kretz wrote: > --- a/libstdc++-v3/include/experimental/bits/simd.h > +++ b/libstdc++-v3/include/experimental/bits/simd.h > @@ -1598,7 +1598,9 @@ template >_GLIBCXX_SIMD_INTRINSIC constexpr _To >__bit_cast(const _From __x) >{ > -//

Re: [PATCH 04/11 v3] libstdc++: Make use of __builtin_bit_cast

2021-06-24 Thread Matthias Kretz
For -ffast-math there was a missing using namespace __proposed left. The attached patch resolves the issue. From: Matthias Kretz The __bit_cast function was a hack to achieve what __builtin_bit_cast can do, therefore use __builtin_bit_cast if possible. However, __builtin_bit_cast cannot be used