[Bug c++/119732] ICE (segfault) in reference_related_p(tree_node*, tree_node*)

2025-04-11 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119732 --- Comment #1 from Matthias Kretz (Vir) --- After rebuilding GCC with checking enabled I get the following trace: constexpr.core2.ii: In instantiation of ‘array convert_mask() [with _Tp = array]’: constexpr.core2.ii:10:22: required from here

[Bug c++/119732] New: ICE (segfault) in reference_related_p(tree_node*, tree_node*)

2025-04-11 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119732 Bug ID: 119732 Summary: ICE (segfault) in reference_related_p(tree_node*, tree_node*) Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: ice-on-invalid

[Bug target/119464] VEC_PERM_EXPR not optimized to pslldq instruction for AVX2 and AVX512BW

2025-03-26 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119464 --- Comment #3 from Matthias Kretz (Vir) --- Good point on recognizing even more of these shifts. Here's an extended test case: https://compiler-explorer.com/z/6MKPzxn9T typedef unsigned long long V2 __attribute__ ((vector_size (16))); typedef

[Bug target/119464] New: VEC_PERM_EXPR not optimized to pslldq instruction for AVX2 and AVX512BW

2025-03-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119464 Bug ID: 119464 Summary: VEC_PERM_EXPR not optimized to pslldq instruction for AVX2 and AVX512BW Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed

[Bug middle-end/90424] memcpy into vector builtin not optimized

2025-02-24 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90424 --- Comment #11 from Matthias Kretz (Vir) --- "two undef reads should end up the same value" folks are unreasonable anyway. ;) Losing diagnostics would be unfortunate. But I don't have enough context here. don't know if this helps: FWIW, I've s

[Bug libstdc++/118416] std::experimental::simd code detecting all zero is not optimized to simple ptest on x86-64 avx

2025-01-15 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118416 --- Comment #3 from Matthias Kretz (Vir) --- And thank you for the detailed analysis! I really would like to see this optimized, too!

[Bug target/90483] input to ptest not optimized

2025-01-15 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90483 Matthias Kretz (Vir) changed: What|Removed |Added CC||lee.imple at gmail dot com --- Co

[Bug libstdc++/118416] std::experimental::simd code detecting all zero is not optimized to simple ptest on x86-64 avx

2025-01-15 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118416 Matthias Kretz (Vir) changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/117849] constraint variable in requires expression rejected, but P2280R4 made it valid

2024-11-30 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117849 --- Comment #5 from Matthias Kretz (Vir) --- Thanks for looking into this issue! Yes, GCC is currently the compiler that comes closest to implementing P2280 - Clang fails on so many more examples here. However, WG21 just voted library wording in

[Bug c++/117849] New: constraint variable in requires expression rejected, but P2280R4 made it valid

2024-11-29 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117849 Bug ID: 117849 Summary: constraint variable in requires expression rejected, but P2280R4 made it valid Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords:

[Bug libstdc++/117016] Alignment requirements of std::simd too large

2024-10-08 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117016 --- Comment #5 from Matthias Kretz (Vir) --- Wrt. working on a larger data set you might be interested in: https://github.com/mattkretz/vir-simd?tab=readme-ov-file#simd-execution-policy-p0350 For the problem you seem to describe, I like to have

[Bug libstdc++/117016] Alignment requirements of std::simd too large

2024-10-08 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117016 Matthias Kretz (Vir) changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/116514] New: known pointer alignment is not used for constant propagation

2024-08-28 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116514 Bug ID: 116514 Summary: known pointer alignment is not used for constant propagation Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimizati

[Bug tree-optimization/114908] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-08-18 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114908 --- Comment #12 from Matthias Kretz (Vir) --- (In reply to rguent...@suse.de from comment #11) > On Wed, 17 Jul 2024, mkretz at gcc dot gnu.org wrote: > > Unless the target has a masked load instruction (e.g. AVX512) or ptr is > > known > > to

[Bug c++/115897] [14/15 Regression] vector_size attribute on alias template has no effect when used in a dependent variable template-id

2024-07-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115897 --- Comment #10 from Matthias Kretz (Vir) --- I applied your patch on recent trunk and the original code compiles as expected. 👍 I can also test your second patch in that thread if you think that would help.

[Bug c++/115897] [14/15 Regression] vector_size attribute on alias template has no effect when used in a dependent variable template-id

2024-07-18 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115897 --- Comment #8 from Matthias Kretz (Vir) --- I can work around 'wrong1' and 'wrong3' by replacing std::is_same_v<...> with __is_same(...).

[Bug c++/115897] [14/15 Regression] vector_size attribute on alias template has no effect when used in a dependent variable template-id

2024-07-18 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115897 Matthias Kretz (Vir) changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXE

[Bug tree-optimization/114908] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-07-17 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114908 --- Comment #10 from Matthias Kretz (Vir) --- (In reply to Richard Biener from comment #9) > One issue with > > V load3(const unsigned long* ptr) > { > V ret = {}; > __builtin_memcpy(&ret, ptr, 3 * sizeof(unsigned long)); > > is that we ca

[Bug c++/115897] [14/15 Regression] __is_same fails for vector builtin

2024-07-12 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115897 --- Comment #1 from Matthias Kretz (Vir) --- It seems '__is_same' is not the problem here. New test case (https://compiler-explorer.com/z/fsoc3hzMK): --- template constexpr bool same_size_v = s

[Bug c++/115897] New: [14/15 Regression] __is_same fails for vector builtin

2024-07-12 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115897 Bug ID: 115897 Summary: [14/15 Regression] __is_same fails for vector builtin Product: gcc Version: 14.1.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal

[Bug libstdc++/115575] experimental/simd/pr115454_find_last_set.cc FAILs

2024-06-21 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115575 --- Comment #5 from Matthias Kretz (Vir) --- Still trying to somehow verify on SPARC... diff --git a/libstdc++-v3/testsuite/experimental/simd/pr115454_find_last_set.cc b/libstdc++-v3/testsuite/experimental/simd/pr115454_find_last_set.cc index b

[Bug libstdc++/115575] experimental/simd/pr115454_find_last_set.cc FAILs

2024-06-21 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115575 --- Comment #4 from Matthias Kretz (Vir) --- The test fails on x86_64 because the effective target selector 'avx512f' is always true. Thus on non-AVX512 systems the test fails with 'illegal instruction(s)'. That's a different issue than on SPARC

[Bug libstdc++/115575] experimental/simd/pr115454_find_last_set.cc FAILs

2024-06-21 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115575 --- Comment #3 from Matthias Kretz (Vir) --- As a simple "solution" I could change the target selector of 'dg-do run' to 'target avx512f', which makes the test match the original PR. And then make this PR about find_last_set not working on all o

[Bug libstdc++/115575] experimental/simd/pr115454_find_last_set.cc FAILs

2024-06-21 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115575 Matthias Kretz (Vir) changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mkretz at gcc dot gnu.org

[Bug libstdc++/115308] std::experimental::simd is not convertible to NEON intrinsic type with Clang

2024-06-20 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115308 Matthias Kretz (Vir) changed: What|Removed |Added Target Milestone|--- |12.5 --- Comment #6 from Matthia

[Bug c++/109739] bogus warning due to -Wmissing-field-initializers in C++20 with designated initializers on struct with empty base class

2024-06-17 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109739 Matthias Kretz (Vir) changed: What|Removed |Added CC||mkretz at gcc dot gnu.org

[Bug libstdc++/115454] std::experimental::find_last_set is buggy on x86-64-v4

2024-06-14 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115454 --- Comment #2 from Matthias Kretz (Vir) --- Actually, find_last_set needs to clear padding bits as well. This fixes the issue. Regression tests are running now. commit b85ff52c1fb059f75bcedf103a15fce9db8bc92b Author: Matthias Kretz Date: F

[Bug libstdc++/115454] std::experimental::find_last_set is buggy on x86-64-v4

2024-06-14 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115454 Matthias Kretz (Vir) changed: What|Removed |Added Target Milestone|--- |11.5

[Bug libstdc++/115454] std::experimental::find_last_set is buggy on x86-64-v4

2024-06-13 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115454 Matthias Kretz (Vir) changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug libstdc++/115308] std::experimental::simd is not convertible to NEON intrinsic type with Clang

2024-06-04 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115308 --- Comment #2 from Matthias Kretz (Vir) --- Resolved on trunk, will backport later

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-06-02 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 --- Comment #15 from Matthias Kretz (Vir) --- I don't know _GLIBCXX_USE_C99_MATH_TR1. AFAIK the simd headers are relying on standard C++ . But with it's easy to make incorrect assumptions. Other tests have a line: // { dg-require-cmath "" } I

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 --- Comment #13 from Matthias Kretz (Vir) --- I opened PR115308 for the __clang__ issue.

[Bug libstdc++/115308] std::experimental::simd is not convertible to NEON intrinsic type with Clang

2024-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115308 Matthias Kretz (Vir) changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug libstdc++/115308] New: std::experimental::simd is not convertible to NEON intrinsic type with Clang

2024-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115308 Bug ID: 115308 Summary: std::experimental::simd is not convertible to NEON intrinsic type with Clang Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: n

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 --- Comment #12 from Matthias Kretz (Vir) --- I noticed that weird special case for __clang__ and don't recall why it was needed. I should dig up the reason or remove it, I guess.

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 --- Comment #9 from Matthias Kretz (Vir) --- (In reply to Alexandre Oliva from comment #7) > FWIW, since the backport, this test started failing in gcc-13 on arm and > aarch64 targets. Presumably this affects earlier branches as well. > > .../

[Bug libstdc++/115247] experimental/simd/pr109261_constexpr_simd.cc FAILs on 32-bit x86

2024-05-29 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115247 Matthias Kretz (Vir) changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/114958] use __builtin_shufflevector for std::experimental::simd split and concat (at least the common cases) to enable better optimizations

2024-05-29 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114958 --- Comment #7 from Matthias Kretz (Vir) --- the regression is now PR115247

[Bug libstdc++/115247] experimental/simd/pr109261_constexpr_simd.cc FAILs on 32-bit x86

2024-05-27 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115247 Matthias Kretz (Vir) changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|

[Bug middle-end/28831] [11/12/13/14/15 Regression] Aggregate copy not elided when using a return value as a pass-by-value parameter

2024-05-27 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28831 --- Comment #45 from Matthias Kretz (Vir) --- (Alright, let's ignore the "oversized" vector for now - my std(::experimental)::simd implementation doesn't use them anyway. It uses aggregates of vectors matching the target SIMD width. FWIW, I pass

[Bug middle-end/28831] [11/12/13/14/15 Regression] Aggregate copy not elided when using a return value as a pass-by-value parameter

2024-05-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=28831 --- Comment #43 from Matthias Kretz (Vir) --- I see this issue in SIMD programming. Example (on x86_64 with only '-O2', i.e. without AVX512) https://compiler-explorer.com/z/K64djP356: typedef int V __attribute__((vector_size(64))); V gen(); vo

[Bug target/115204] unnecessary stack usage and copies (of temporaries)

2024-05-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115204 --- Comment #1 from Matthias Kretz (Vir) --- That's why I tagged is as 'target'. I'd be happy to learn that it can be resolved target-independently.

[Bug target/115204] New: unnecessary stack usage and copies (of temporaries)

2024-05-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115204 Bug ID: 115204 Summary: unnecessary stack usage and copies (of temporaries) Product: gcc Version: 15.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal

[Bug libstdc++/114958] use __builtin_shufflevector for std::experimental::simd split and concat (at least the common cases) to enable better optimizations

2024-05-15 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114958 --- Comment #6 from Matthias Kretz (Vir) --- The last commit introduced a regression on i686 where __builtin_shufflevector was producing MMX vectors (which can mess up the FPU). Untested patch which resolves the issue: libstdc++-v3/ChangeLog:

[Bug libstdc++/109822] Converting std::experimental::simd masks yields an error

2024-05-10 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109822 --- Comment #12 from Matthias Kretz (Vir) --- Fixed powerpc test failure on all branches.

[Bug libstdc++/110054] stdx::simd masked store should not use non-temporal store instruction

2024-05-10 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110054 Matthias Kretz (Vir) changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNE

[Bug libstdc++/114750] converting load/store of simd fails compilation on ARM

2024-05-10 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114750 Matthias Kretz (Vir) changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNE

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-05-10 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 Matthias Kretz (Vir) changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/114966] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-05-07 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114966 --- Comment #4 from Matthias Kretz (Vir) --- I'm fairly sure it's not the same source anymore. I'll try to understand where it goes wrong in the library, because the vector_t{0, data[0], data[1], data[2]} expression is still optimized as expecte

[Bug tree-optimization/114966] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-05-07 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114966 Matthias Kretz (Vir) changed: What|Removed |Added CC||mkretz at gcc dot gnu.org --- Co

[Bug libstdc++/114958] use __builtin_shufflevector for std::experimental::simd split and concat (at least the common cases) to enable better optimizations

2024-05-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114958 --- Comment #3 from Matthias Kretz (Vir) --- Hmm, it actually fails on Clang because Clang requires the vector width of both arguments to be equal. But yes, I guess I should make __vec_shuffle friendlier to non-GCC compilers. I'm not sure about

[Bug libstdc++/114958] use __builtin_shufflevector for std::experimental::simd split and concat (at least the common cases) to enable better optimizations

2024-05-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114958 Matthias Kretz (Vir) changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Ever confirmed|0

[Bug tree-optimization/114908] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-05-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114908 --- Comment #7 from Matthias Kretz (Vir) --- I suspect resolving this is only one part of it. But I'm happy to be proven wrong. :) I opened PR114958 to track the simd implementation change.

[Bug libstdc++/114958] New: use __builtin_shufflevector for std::experimental::simd split and concat (at least the common cases) to enable better optimizations

2024-05-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114958 Bug ID: 114958 Summary: use __builtin_shufflevector for std::experimental::simd split and concat (at least the common cases) to enable better optimizations Product: gcc

[Bug tree-optimization/114908] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-05-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114908 --- Comment #5 from Matthias Kretz (Vir) --- https://godbolt.org/z/P6cfbjT9f #include typedef uint64_t T; typedef T V [[gnu::vector_size(32)]]; typedef struct simd4 { V data; } simd4; typedef struct simd1 { T data; } simd1; typede

[Bug tree-optimization/114908] fails to optimize avx2 in-register permute written with std::experimental::simd

2024-05-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114908 --- Comment #3 from Matthias Kretz (Vir) --- The stdx::simd implementation in this area is old and mainly tuned to be correct. I can rewrite the split and concat implementation to use __builtin_shufflevector (which wasn't available in GCC at the

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 --- Comment #2 from Matthias Kretz (Vir) --- Fixed in master, still need to backport.

[Bug libstdc++/114803] simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 Matthias Kretz (Vir) changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug libstdc++/114803] New: simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114803 Bug ID: 114803 Summary: simd conversion to [[gnu::vector_size(N)]] type hits invalid code in experimental/bits/simd_builtin.h Product: gcc Version: 14.0 Status: UNCONFIR

[Bug libstdc++/114750] converting load/store of simd fails compilation on ARM

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114750 --- Comment #2 from Matthias Kretz (Vir) --- Resolved on master. Still need to backport.

[Bug libstdc++/114417] std::experimental::simd is not a POD (by ABI definitions) and is always passed by reference instead of by value

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114417 Matthias Kretz (Vir) changed: What|Removed |Added Resolution|--- |INVALID Status|UNCON

[Bug libstdc++/114417] std::experimental::simd is not a POD (by ABI definitions) and is always passed by reference instead of by value

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114417 Matthias Kretz (Vir) changed: What|Removed |Added CC||mkretz at gcc dot gnu.org --- Co

[Bug target/85048] [missed optimization] vector conversions

2024-04-22 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85048 --- Comment #15 from Matthias Kretz (Vir) --- So it seems that if at least one of the vector builtins involved in the expression is 512 bits GCC needs to locally increase prefer-vector-width to 512? Or, more generally: prefer-vector-width = max(

[Bug target/114783] New: [14 Regression] Equality compares of vector builtins spill one operand to the stack

2024-04-19 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114783 Bug ID: 114783 Summary: [14 Regression] Equality compares of vector builtins spill one operand to the stack Product: gcc Version: 14.0 Status: UNCONFIRMED Keyw

[Bug target/85048] [missed optimization] vector conversions

2024-04-19 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85048 --- Comment #13 from Matthias Kretz (Vir) --- Should I open a new PR for the remaining ((u)int64, 16) <-> (float, 16) conversions? https://godbolt.org/z/x3xPMYKj3 Note that __builtin_convertvector produces the code we want. template using V [

[Bug libstdc++/114750] converting load/store of simd fails compilation on ARM

2024-04-17 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114750 Matthias Kretz (Vir) changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mkretz at gcc dot gnu.org

[Bug libstdc++/114750] New: converting load/store of simd fails compilation on ARM

2024-04-17 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114750 Bug ID: 114750 Summary: converting load/store of simd fails compilation on ARM Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Comp

[Bug libstdc++/114742] New: invalid use of '__ieee128' in and

2024-04-16 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114742 Bug ID: 114742 Summary: invalid use of '__ieee128' in and Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Com

[Bug target/109964] auto-vectorization of shift ignores integral promotions

2024-04-15 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109964 --- Comment #7 from Matthias Kretz (Vir) --- looks good to me

[Bug libstdc++/77776] C++17 std::hypot implementation is poor

2024-03-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6 --- Comment #24 from Matthias Kretz (Vir) --- (In reply to g.peterhoff from comment #23) > * How do you create the benchmarks? https://github.com/mattkretz/simd-benchmarks Look at hypot3.cpp :)

[Bug target/91861] invalid vectorization of isless, islessequal, etc. (with default of -ftrapping-math)

2024-03-17 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91861 --- Comment #4 from Matthias Kretz (Vir) --- > But NLT_UQ does not exist for non-VEX encoded Right, one needs to compare integers and check for NaN. Like noted in the description. Also implemented in the std::experimental::simd overloads: https:

[Bug libstdc++/77776] C++17 std::hypot implementation is poor

2024-03-12 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6 --- Comment #22 from Matthias Kretz (Vir) --- I took your hypot3_scale and reduced latency and throughput. I don't think the sqrtmax/sqrtmin limits are correct (sqrtmax² * 3 -> infinity). TYPE Latency Speed

[Bug libstdc++/77776] C++17 std::hypot implementation is poor

2024-03-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6 --- Comment #20 from Matthias Kretz (Vir) --- Thanks, I'd be very happy if such a relatively clear implementation could make it! > branchfree code is always better. Don't say it like that. Smart branching, making use of how static branch-predic

[Bug libstdc++/77776] C++17 std::hypot implementation is poor

2024-03-04 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6 --- Comment #17 from Matthias Kretz (Vir) --- hypotf(a, b) is implemented using double precision and hypot(a, b) uses 80-bit long double on i386 and x86_64 hypot does what you describe, right? std::experimental::simd benchmarks of hypot(a, b), w

[Bug libstdc++/77776] C++17 std::hypot implementation is poor

2024-03-04 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=6 --- Comment #15 from Matthias Kretz (Vir) --- Your implementation still needs to solve: 1. Loss of precision because of division & subsequent scaling by max. Users comparing std::hypot(x, y, z) against a simple std::sqrt(x * x + y * y + z * z) m

[Bug target/112698] gcc r14-5617-gb8592186611 introduces regressions in bfloat16_vector_typecheck_1.c for cortex-m0 and cortex-m3

2023-11-30 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112698 --- Comment #5 from Matthias Kretz (Vir) --- OK, I can follow that reasoning. It's still a breaking change for everyone that was using int up to this point. I guess the argument is that using int was wrong in the first place and it just happened

[Bug libstdc++/111302] aligned std::experimental::simd loads and stores are not constant expressions

2023-09-05 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111302 Matthias Kretz (Vir) changed: What|Removed |Added Target Milestone|--- |14.0 Last reconfirmed|

[Bug libstdc++/111302] New: aligned std::experimental::simd loads and stores are not constant expressions

2023-09-05 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111302 Bug ID: 111302 Summary: aligned std::experimental::simd loads and stores are not constant expressions Product: gcc Version: 14.0 Status: UNCONFIRMED Severity:

[Bug target/110583] New: [x86] missed optimizations in vector concatenation patterns

2023-07-07 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110583 Bug ID: 110583 Summary: [x86] missed optimizations in vector concatenation patterns Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimizatio

[Bug target/108742] Incorrect constant folding with (or exposed by) -fexcess-precision=standard

2023-06-30 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108742 Matthias Kretz (Vir) changed: What|Removed |Added CC||mkretz at gcc dot gnu.org --- Co

[Bug c++/110477] -fexcess-precision=standard not applied consistently

2023-06-29 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110477 Matthias Kretz (Vir) changed: What|Removed |Added CC||mkretz at gcc dot gnu.org --- Co

[Bug libstdc++/110054] stdx::simd masked store should not use non-temporal store instruction

2023-06-06 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110054 --- Comment #3 from Matthias Kretz (Vir) --- Fixed on master. Will backport later.

[Bug libstdc++/110050] experimental/simd/pr109822_cast_functions.cc fails on arm after g:668d43502f465d48adbc1fe2956b979f36657e5f

2023-06-02 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110050 --- Comment #7 from Matthias Kretz (Vir) --- Yes, I still need to backport because the new test is also present on the branches.

[Bug libstdc++/110050] experimental/simd/pr109822_cast_functions.cc fails on arm after g:668d43502f465d48adbc1fe2956b979f36657e5f

2023-06-01 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110050 --- Comment #5 from Matthias Kretz (Vir) --- The issue was an incorrect condition for SIMD support, which wanted to say only single-precision float SIMD is available. It did that by excluding double, failing to also exclude long double.

[Bug libstdc++/110050] experimental/simd/pr109822_cast_functions.cc fails on arm after g:668d43502f465d48adbc1fe2956b979f36657e5f

2023-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110050 Matthias Kretz (Vir) changed: What|Removed |Added Last reconfirmed||2023-05-31 Assignee|un

[Bug libstdc++/110054] stdx::simd masked store should not use non-temporal store instruction

2023-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110054 Matthias Kretz (Vir) changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug libstdc++/110054] New: stdx::simd masked store should not use non-temporal store instruction

2023-05-31 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110054 Bug ID: 110054 Summary: stdx::simd masked store should not use non-temporal store instruction Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal

[Bug libstdc++/109822] Converting std::experimental::simd masks yields an error

2023-05-30 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109822 Matthias Kretz (Vir) changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNE

[Bug target/109964] New: auto-vectorization of shift ignores integral promotions

2023-05-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109964 Bug ID: 109964 Summary: auto-vectorization of shift ignores integral promotions Product: gcc Version: 13.1.0 Status: UNCONFIRMED Keywords: wrong-code

[Bug libstdc++/108030] `std::experimental::simd` not inlined

2023-05-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108030 Matthias Kretz (Vir) changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/108856] Increment and decrement on std::experimental::where_expression should optimize better

2023-05-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108856 Matthias Kretz (Vir) changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug libstdc++/109261] std::experimental::simd is not usable in several constant expressions

2023-05-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109261 Matthias Kretz (Vir) changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNE

[Bug libstdc++/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-25 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 Matthias Kretz (Vir) changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNE

[Bug libstdc++/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-24 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 --- Comment #8 from Matthias Kretz (Vir) --- Created attachment 55150 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55150&action=edit proposed solution This patch allows unsigned intrinsic types and calls vec_cntm correctly.

[Bug target/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-24 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 --- Comment #7 from Matthias Kretz (Vir) --- > You should backport to N-1 first [...] That was my intent. My workflow had not yet adapted to the existence of releases/gcc-13. Fixed. > never use -mpower9-vector and friends I use -mpcu in my de

[Bug target/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-24 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 --- Comment #4 from Matthias Kretz (Vir) --- With -mcpu=power10 I see the issue. The problem has been there all the time and only surfaced with this test. (It should also have shown on `make check-simd` in libstdc++.)

[Bug target/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-24 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 --- Comment #3 from Matthias Kretz (Vir) --- I need help on how to reproduce this error. Your first lines say that the test was compiled with `-maltivec -mpower9-vector -O2 -Wno-psabi` but that it only happens with POWER 10? Do I need different

[Bug target/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 Matthias Kretz (Vir) changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |mkretz at gcc dot gnu.org

[Bug target/109949] new test case experimental/simd/pr109261_constexpr_simd.cc in r12-9647-g3acbaf1b253215 fails

2023-05-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109949 --- Comment #2 from Matthias Kretz (Vir) --- Yes, I stopped my backporting efforts when I became aware that it's failing on ARM. I'll get to PPC ASAP and then continue with the backports.

[Bug libstdc++/109261] std::experimental::simd is not usable in several constant expressions

2023-05-23 Thread mkretz at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109261 --- Comment #7 from Matthias Kretz (Vir) --- Created attachment 55146 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55146&action=edit patch that resolves it for me

  1   2   >