[committed] Re: [PATCH] libstdc++: Add missing constexpr to simd

2023-05-23 Thread Matthias Kretz via Gcc-patches
I pushed the attached patch. I kept the operator names... too late, there were already operator names in the stdx::simd implemenation anyway. ;) - Matthias On Monday, 22 May 2023 22:51:49 CEST Jonathan Wakely wrote: > On Mon, 22 May 2023 at 21:27, Matthias Kretz wrote: > > On Monda

[PATCH] libstdc++: Add missing constexpr to simd_neon

2023-05-23 Thread Matthias Kretz via Gcc-patches
Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR libstdc++/109261 * include/experimental/bits/simd_neon.h (_S_reduce): Add constexpr and make NEON implementation conditional on not __builtin_is_constant_evaluated. --- .../include/experimental/bits

[PATCH] libstdc++: Fix SFINAE for __is_intrinsic_type on ARM

2023-05-24 Thread Matthias Kretz via Gcc-patches
OK for master and all branches? (this issue only surfaced because of the new test) 8< - On ARM NEON doesn't support double, so __is_intrinsic_type_v should say false (instead of being ill-formed). Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog:

[PATCH] libstdc++: Fix type of first argument to vec_cntm call

2023-05-24 Thread Matthias Kretz via Gcc-patches
OK for master and backports? (also a long-standing bug that didn't surface until the new constexpr test was added) tested on powerpc64le-linux-gnu - 8< - Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: PR libstdc++/109949 *

Re: [PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-03-31 Thread Matthias Kretz via Gcc-patches
elif defined _GLIBCXX_ASSERTIONS > +__builtin_trap(); > +#else > +__builtin_unreachable(); > +#endif > + } -- ── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz Centre for Heavy Ion Research https://gsi.de stdₓ::simd ──

Re: [PATCH] libstdc++: Implement std::unreachable() for C++23 (P0627R6)

2022-04-01 Thread Matthias Kretz via Gcc-patches
On Friday, 1 April 2022 13:33:42 CEST Jonathan Wakely wrote: > Matthias didn't like my Princess Bride easter egg :-) > Would the attached be better? LGTM. -- ── Dr. Matthias Kretz

Re: [PATCH] libstdc++: ppc: conditionalize vsx-only simd intrinsics

2022-04-28 Thread Matthias Kretz via Gcc-patches
[long] double on PPC w/o VSX"); The missing condition here was an incorrect omission. With -mlong-double-64 and without VSX no assertion caught the issue. IIRC, a user won't get to see this error message unless there's a bug in the simd library implementation, so the er

Re: [PATCH] libstdc++: ppc: conditionalize vsx-only simd intrinsics

2022-04-29 Thread Matthias Kretz via Gcc-patches
other mail. If `__vector double` without VSX was always ill-formed then I must be misremembering something. Cheers, Matthias -- ── Dr. Matthias Kretz https://mattkretz.github.io GSI Helmholtz

[PATCH 0/2] Make std::experimental::simd (more) usable with Clang

2023-03-21 Thread Matthias Kretz via Gcc-patches
Up to now, compiling std::experimental::simd with Clang would lead to wrong code, not compiling, or ICEs. After these patches I hope it's only ICEs. Tested on x86_64-pc-linux-gnu. Matthias Kretz (2): libstdc++: Fix simd test compilation with Clang libstdc++: Fix simd compilation with

[PATCH 1/2] libstdc++: Fix simd test compilation with Clang

2023-03-21 Thread Matthias Kretz via Gcc-patches
Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * testsuite/experimental/simd/tests/operators.cc: Clang doesn't define __GCC_IEC_559. Use __STDC_IEC_559__ instead. --- .../testsuite/experimental/simd/tests/operators.cc | 9 - 1 file changed, 8 inser

[PATCH 2/2] libstdc++: Fix simd compilation with Clang

2023-03-21 Thread Matthias Kretz via Gcc-patches
to vector-mask before using a vector blend ?:. A similar change is required for the masked unary implementation, because the GCC builtins do not exist on Clang. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_detail.h: Don't declar

[committed] libstdc++: Fix simd compilation with Clang

2023-03-21 Thread Matthias Kretz via Gcc-patches
do not exist on Clang. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_detail.h: Don't declare the simd API as constexpr with Clang. * include/experimental/bits/simd_x86.h (__movm): New. (_S_blend_avx512): Resol

[PATCH] libstdc++: Skip integer division optimization for Clang

2023-03-21 Thread Matthias Kretz via Gcc-patches
Tested on x86_64-pc-linux-gnu. - 8< --- Clang ICEs on _SimdImplX86::_S_divides. The function is only working around a missed optimization and not necessary for correctness. Therefore, don't use it for Clang. Signed-off-by: Matthias Kretz libstdc++-v3/C

[PATCH] libstdc++: Use more precise __RECIPROCAL_MATH__ macro

2023-03-21 Thread Matthias Kretz via Gcc-patches
Tested on x86_64-pc-linux-gnu. - 8< --- Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_x86.h (_SimdImplX86::_S_divides): Replace test for __GCC_IEC_559 == 0 with __RECIPROCAL_MATH__. --- libstdc++-v3/incl

[PATCH] libstdc++: Add missing trait is_simd_flag_type

2023-03-28 Thread Matthias Kretz via Gcc-patches
I don't know how, but I forgot to implement the is_simd_flag_type trait. This fixes it. No new check-simd failures on x86_64-pc-linux-gnu --- 8< -- Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd.h (is_simd_f

[committed] libstdc++: Fix operator% implementation for Clang

2023-03-28 Thread Matthias Kretz via Gcc-patches
This resolves a regression of my previous fix where Clang would ICE on _S_divides. Signed-off-by: Matthias Kretz libstdc++-v3/ChangeLog: * include/experimental/bits/simd_x86.h (_SimdImplX86): Use _Base::_S_divides if the optimized _S_divides function is hidden via the

<    1   2   3