Re: [PATCH 3/3] OpenMP: Handle more cases in user/condition selector

2025-05-29 Thread Tobias Burnus
Sandra Loosemore wrote: Like the attached V2 patch? LGTM. However, I think in metadirective-condition-template.C the "scan-tree-dump" should now be changed to "scan-tree-dump-times", given that there are several tests. Thanks, Tobias

[PATCH] C: Flex array in union followed by a structure field is not reported [PR120354]

2025-05-29 Thread Qing Zhao
There is only one last_field for a structure type, but there might be multiple last_fields for a union type, therefore we should ORed the result of TYPE_INCLUDES_FLEXARRAY for multiple last_fields of a union type. The patch has been bootstrapped and regression tested on both x86 and aarch64. Okay

[PATCH v3] c++: Unwrap type traits defined in terms of builtins within diagnostics [PR117294]

2025-05-29 Thread Nathaniel Shead
On Wed, May 28, 2025 at 02:14:06PM -0400, Patrick Palka wrote: > On Tue, 27 May 2025, Nathaniel Shead wrote: > > > On Wed, Nov 27, 2024 at 11:45:40AM -0500, Patrick Palka wrote: > > > On Fri, 8 Nov 2024, Nathaniel Shead wrote: > > > > > > > Does this approach seem reasonable? I'm pretty sure tha

Re: [PATCH 1/2] forwprop: Change test in loop of optimize_memcpy_to_memset

2025-05-29 Thread Andrew Pinski
On Tue, May 27, 2025 at 5:14 AM Richard Biener wrote: > > On Tue, May 27, 2025 at 5:02 AM Andrew Pinski > wrote: > > > > This was noticed in the review of copy propagation for aggregates > > patch, instead of checking for a NULL or a non-ssa name of vuse, > > we should instead check if it the vu

Re: [PATCH] c++tools: Don't check --enable-default-pie.

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 8:06 AM Kito Cheng wrote: > > `--enable-default-pie` is an option to specify whether to enable > position-independent executables by default for `target`. > > However c++tools is build for `host`, so it should just follow > `--enable-host-pie` option to determine whether to

[PATCH v1 3/3] RISC-V: Add test cases for avg_ceil vaadd implementation

2025-05-29 Thread pan2 . li
From: Pan Li Add asm and run testcase for avg_ceil vaadd implementation. The below test suites are passed for this patch series. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/avg.h: Add test helper macros. * gcc.target/riscv/rvv/au

[PATCH v1 2/3] RISC-V: Reconcile the existing test for avg_ceil

2025-05-29 Thread pan2 . li
From: Pan Li Some existing avg_floor test need updated due to change to leverage vaadd.vv directly. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/vls/avg-4.c: Update asm check to vaadd. * gcc.target/riscv/rvv/autovec/vls/avg-5.c: Ditto. * gcc.target/ris

[PATCH v1 1/3] RISC-V: Leverage vaadd.vv for signed standard name avg_ceil

2025-05-29 Thread pan2 . li
From: Pan Li The avg_ceil has the rounding mode towards +inf, while the vaadd.vv has the rnu which totally match the sematics. From RVV spec, the fixed vaadd.vv with rnu, roundoff_signed(v, d) = (signed(v) >> d) + r r = v[d - 1] For vaadd, d = 1, then we have roundoff_signed(v, 1) = (signed(v

[PATCH v1 0/3] Refine the avg_ceil with fixed point vaadd

2025-05-29 Thread pan2 . li
From: Pan Li Similar to the avg_floor, the avg_ceil has the rounding mode towards +inf, while the vaadd.vv has the rnu which totally match the sematics. From RVV spec, the fixed vaadd.vv with rnu, roundoff_signed(v, d) = (signed(v) >> d) + r r = v[d - 1] For vaadd, d = 1, then we have roundof

Re: [PATCH] rtl-ssa: Reject non-address uses of autoinc regs [PR120347]

2025-05-29 Thread Richard Biener
On Wed, May 28, 2025 at 6:55 PM Richard Sandiford wrote: > > Richard Biener writes: > > On Thu, May 22, 2025 at 12:19 PM Richard Sandiford > > wrote: > >> > >> As the rtl.texi documentation of RTX_AUTOINC expressions says: > >> > >> If a register used as the operand of these expressions is use

Re: [PATCH] expmed: Prevent non-canonical subreg generation in store_bit_field [PR118873]

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 12:27 PM Konstantinos Eleftheriou wrote: > > Hi Richard, thanks for the response. > > On Mon, May 26, 2025 at 11:55 AM Richard Biener wrote: > > > > On Mon, 26 May 2025, Konstantinos Eleftheriou wrote: > > > > > In `store_bit_field_1`, when the value to be written in the b

Re: [PATCH] Fix crash with constant initializer caused by IPA

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 11:38 AM Eric Botcazou wrote: > > Hi, > > the attached Ada testcase compiled with -O2 -gnatn makes the compiler crash in > vect_can_force_dr_alignment_p during SLP vectorization: > > if (decl_in_symtab_p (decl) > && !symtab_node::get (decl)->can_increase_alignment_p

Re: [PATCH 1/2] forwprop: Change test in loop of optimize_memcpy_to_memset

2025-05-29 Thread Richard Biener
On Thu, May 29, 2025 at 11:48 PM Andrew Pinski wrote: > > On Tue, May 27, 2025 at 5:14 AM Richard Biener > wrote: > > > > On Tue, May 27, 2025 at 5:02 AM Andrew Pinski > > wrote: > > > > > > This was noticed in the review of copy propagation for aggregates > > > patch, instead of checking for a

Re: [PATCH] scc_copy: conditional return TODO_cleanup_cfg.

2025-05-29 Thread Richard Biener
On Fri, May 30, 2025 at 3:53 AM Andrew Pinski wrote: > > Only have cleanup cfg happen if scc copy did some proping. > This should be a small compile time improvement by not doing cleanup > cfg if scc copy does nothing. > > Also removes TODO_update_ssa since it should not be needed. OK. Richard.

RE: [PATCH][GCC16][GCC15] aarch64: Add support for FUJITSU-MONAKA (-mcpu=fujitsu-monaka) CPU

2025-05-29 Thread Yuta Mukai (Fujitsu)
Hi Kyrill-san Thank you for the review and for pushing. Yuta > -Original Message- > From: Kyrylo Tkachov > Sent: Thursday, May 29, 2025 6:45 PM > To: Mukai, Yuta/向井 優太 > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford ; > andre.simoesdiasvie...@arm.com > Subject: Re: [PATCH][GCC16][GCC15

Re: [PATCH 3/3] OpenMP: Handle more cases in user/condition selector

2025-05-29 Thread Sandra Loosemore
On 5/29/25 02:51, Tobias Burnus wrote: @Jason – The idea is make semantics.cc's maybe_convert_cond callable from parser.cc + pt.cc, i.e. to make it a non-static function. Any reasons not do so? Sandra Loosemore wrote: […] By using the existing front-end hooks for the implicit conversion to boo

[PATCH] scc_copy: conditional return TODO_cleanup_cfg.

2025-05-29 Thread Andrew Pinski
Only have cleanup cfg happen if scc copy did some proping. This should be a small compile time improvement by not doing cleanup cfg if scc copy does nothing. Also removes TODO_update_ssa since it should not be needed. gcc/ChangeLog: * gimple-ssa-sccopy.cc (scc_copy_prop::replace_scc_by_v

Re: [PATCH v4 4/8] libstdc++: Implement layout_right from mdspan.

2025-05-29 Thread Luc Grosheintz
On 5/28/25 16:22, Tomasz Kaminski wrote: On Mon, May 26, 2025 at 4:15 PM Luc Grosheintz wrote: Implement the parts of layout_left that depend on layout_right; and the parts of layout_right that don't depend on layout_stride. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_ri

Re: [PATCH] expmed: Prevent non-canonical subreg generation in store_bit_field [PR118873]

2025-05-29 Thread Konstantinos Eleftheriou
Hi Richard, thanks for the response. On Mon, May 26, 2025 at 11:55 AM Richard Biener wrote: > > On Mon, 26 May 2025, Konstantinos Eleftheriou wrote: > > > In `store_bit_field_1`, when the value to be written in the bitfield > > and/or the bitfield itself have vector modes, non-canonical subregs >

[PATCH] RISC-V: Add smcntrpmf extension.

2025-05-29 Thread Dongyan Chen
This patch support smcntrpmf extension[1]. To enable GCC to recognize and process smcntrpmf extension correctly at compile time. [1]https://github.com/riscvarchive/riscv-smcntrpmf gcc/ChangeLog: * config/riscv/riscv-ext.def: New extension defs. * config/riscv/riscv-ext.opt: Ditt

[committed] libstdc++: Disable -Wlong-long warnings in boost_concept_check.h

2025-05-29 Thread Jonathan Wakely
The _IntegerConcept, _SignedIntegerConcept and _UnsignedIntegerConcept class template are specialized for long long, which gives warnings with -Wsystem-headers in C++98 mode. libstdc++-v3/ChangeLog: * include/bits/boost_concept_check.h: Disable -Wlong-long warnings. * test

[committed] libstdc++: Document that -std cannot be used in --target_board now

2025-05-29 Thread Jonathan Wakely
Only using GLIBCXX_TESTSUITE_STDS or v3_std_list works now. libstdc++-v3/ChangeLog: * doc/xml/manual/test.xml: Remove outdated documentation on testing with -std options in --target_board. * doc/html/manual/test.html: Regenerate. --- Pushed to trunk. libstdc++-v3/doc/ht

Re: [PATCH] [AUTOFDO] Enable autofdo tests for aarch64

2025-05-29 Thread Jan Hubicka
> I also noticed that some tests are only enabled for x86. I am also seeing: > ./gcc/testsuite/gcc/gcc.sum:UNSUPPORTED: gcc.dg/tree-prof/pr66295.c This is testing a former ifun bug which reproduced with -fprofile-use > ./gcc/testsuite/gcc/gcc.sum:UNSUPPORTED: gcc.dg/tree-prof/split-1.c This is test

[PATCH] c++, coroutines: Fix identification of coroutine ramps [PR120453].

2025-05-29 Thread Iain Sandoe
Tested on x86_64-darwin, confirming that the original reported code fails without the change here. Unfortunately, if we add a move constructor to the reduced case, it no longer fails on unpatched trunk - so not proposing to add that as a testcase (since it tests something unrelated to coroutines).

[PATCH v2 00/16] libstdc++: Atomic wait/notify ABI stabilization

2025-05-29 Thread Jonathan Wakely
This series complete Tom's work to refactor the C++20 atomic wait/notify code, and includes several follow-up patches from me. The goal is to move the core implementation pieces into libstdc++.so instead of defining everything inline in the headers. This is a necessary step for stabilizing C++20 su

[PATCH v2 03/16] libstdc++: Whitespace fixes in atomic wait/notify code

2025-05-29 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h: Whitespace fixes. * include/bits/atomic_wait.h: Likewise. --- libstdc++-v3/include/bits/atomic_timed_wait.h | 206 +- libstdc++-v3/include/bits/atomic_wait.h | 8 +- 2 files changed, 104 insertions

[PATCH v2 08/16] libstdc++: Remove reinterpret_cast uses in atomic wait/notify

2025-05-29 Thread Jonathan Wakely
We can pass around void* instead of casting incompatible pointers to __platform_wait_t*, and then only static_cast to __platform_wait_t* when we know that's valid. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__wait_until_impl): Change first parameter to const void*

[PATCH v2 05/16] libstdc++: Fix race condition in new atomic notify code

2025-05-29 Thread Jonathan Wakely
When using a proxy object for atomic waiting and notifying operations, we need to ensure that the _M_ver value is always incremented by a notifying operation, even if we return early without doing the futex wake syscall. Otherwise we get missed wake-ups because the notifying thread doesn't modify t

[PATCH v2 07/16] libstdc++: Simplify futex wrapper functions for atomic wait/notify

2025-05-29 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/atomic_wait.h (__platform_wait): Change function template to a normal function. The parameter is always __platform_wait_t* which is just int* for this implementation of the function. (__platform_notify): Likewise. ---

[PATCH v2 02/16] libstdc++: Pass __wait_args to internal API by const pointer

2025-05-29 Thread Jonathan Wakely
From: Thomas Rodgers This change splits the __wait_args data members to a new struct __wait_args_base and then passes that type by const pointer to the low level implementation functions. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__spin_until_impl): Accept __wa

[PATCH v2 09/16] libstdc++: Rename __atomic_compare to __atomic_eq

2025-05-29 Thread Jonathan Wakely
This is an equality comparison rather than a three-way comparison like memcmp and <=>, so name it more precisely. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__atomic_wait_address_until_v): Replace __atomic_compare with __atomic_eq. (__atomic_wait_a

[PATCH v2 04/16] libstdc++: Various fixes for atomic wait/notify code

2025-05-29 Thread Jonathan Wakely
Pass __wait_args_base by const reference instead of const pointer. I don't see a reason it needs to be passed by pointer to the internals. We can also avoid constructing a __wait_args from __wait_args_base in some places, instaad just using the latter directly. The code using the __wait_flags bitm

[PATCH v2 01/16] libstdc++: Atomic wait/notify ABI stabilization

2025-05-29 Thread Jonathan Wakely
From: Thomas Rodgers This represents a major refactoring of the previous atomic::wait and atomic::notify implementation detail. The aim of this change is to simplify the implementation details and position the resulting implementation so that much of the current header-only detail can be moved in

[PATCH v2 06/16] libstdc++: Fix time_point conversion in atomic timed waits

2025-05-29 Thread Jonathan Wakely
Even if a time_point already uses the right clock, we might still need to convert it to use the expected duration. Calling __to_wait_clock will perform that conversion, so use that even when the clock is correct. libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h (__to_wait_clock)

[PATCH v2 14/16] libstdc++: Create new base class of std::barrier for non-dependent code

2025-05-29 Thread Jonathan Wakely
This moves all non-dependent state and logic for std::barrier into a new non-template base class, to avoid template bloat. This would permit moving the _M_arrive function into the library instead of the header. libstdc++-v3/ChangeLog: * include/std/barrier (__tree_barrier_base): New clas

[PATCH v2 11/16] libstdc++: Move atomic wait/notify entry points into the library

2025-05-29 Thread Jonathan Wakely
This moves the implementation details of atomic wait/notify functions into the library, so that only a small API surface is exposed to users. This also fixes some race conditions present in the design for proxied waits: - The stores to _M_ver in __notify_impl must be protected by the mutex, and

[PATCH v2 13/16] libstdc++: Fix std::barrier for constant initialization [PR118395]

2025-05-29 Thread Jonathan Wakely
The std::barrier constructor should be constexpr, which means we need to defer the dynamic allocation if the constructor is called during constant-initialization. We can defer it to the first call to barrier::arrive, using compare-and-swap on an atomic (instead of the unique_ptr currently used). A

[PATCH v2 10/16] libstdc++: Rename __waiter_pool_impl to __waitable_state

2025-05-29 Thread Jonathan Wakely
The name __waiter_pool_impl is misleading. An object of that type is a member of the pool, not the pool itself, and it's not an "impl" of any abstract base class or generic concept. Just call it __waitable_state since it maintains the state used for waiting/notifying a waitable atomic object. Simi

[PATCH v2 15/16] libstdc++: Rewrite std::counting_semaphore base class [PR118494]

2025-05-29 Thread Jonathan Wakely
Remove __platform_semaphore. Replace __atomic_semaphore with __semaphore_base and change its counter to be ptrdiff_t when the count doesn't fit in __platform_wait_t (PR 118494). Make the std::counting_semaphore constructor constexpr to support constant initialization (PR 110854). Add precondition

[PATCH v2 12/16] libstdc++: Optimise std::latch::arrive_and_wait

2025-05-29 Thread Jonathan Wakely
We don't need to wait if we know the counter has reached zero. libstdc++-v3/ChangeLog: * include/std/latch (latch::arrive_and_wait): Optimise. --- libstdc++-v3/include/std/latch | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/st

[PATCH v2 16/16] libstdc++: Define __wait_result_type for atomic waiting

2025-05-29 Thread Jonathan Wakely
libstdc++-v3/ChangeLog: * include/bits/atomic_timed_wait.h: Use __wait_result_type. * include/bits/atomic_wait.h (__wait_result_type): New struct. (__wait_args::_M_prep_for_wait_on): Rename to _M_setup_wait, use __wait_result_type. (__atomic_wait_address): A

[PATCH v2] libstdc++: Implement stringstream from string_view [PR119741]

2025-05-29 Thread Nathan Myers
Change in V2: * apply all review comments * remove redundant drive-by "requires" on ctor from string allocator arg * check allocators are plumbed through -- >8 -- Implement PR libstdc++/119741 (P2495R3) Add constructors to stringbuf, stringstream, istringstream, and ostringstream, and a matchi

Re: [PATCH] libstdc++: Pass small trivial types by value in polymorphic wrappers

2025-05-29 Thread Tomasz Kaminski
On Wed, May 28, 2025 at 5:25 PM Patrick Palka wrote: > On Wed, 28 May 2025, Tomasz Kaminski wrote: > > > > > > > On Wed, May 28, 2025 at 4:53 PM Patrick Palka wrote: > > On Wed, 28 May 2025, Tomasz Kamiński wrote: > > > > > This patch adjust the passing of parameters for the > move_o

Re: [PATCH v4 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-29 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 4:13 PM Luc Grosheintz wrote: > Implements the remaining parts of layout_left and layout_right; and all > of layout_stride. > > The implementation of layout_stride::mapping::is_exhaustive applies > the following change to the standard: > > 4266. layout_stride::mapping sh

Re: [PATCH 3/3] OpenMP: Handle more cases in user/condition selector

2025-05-29 Thread Tobias Burnus
@Jason – The idea is make semantics.cc's maybe_convert_cond callable from parser.cc + pt.cc, i.e. to make it a non-static function. Any reasons not do so? Sandra Loosemore wrote: […] By using the existing front-end hooks for the implicit conversion to bool in conditional expressions, we also ge

Re: [PATCH] [AUTOFDO] Enable autofdo tests for aarch64

2025-05-29 Thread Kugan Vivekanandarajah
> On 29 May 2025, at 5:58 pm, Jan Hubicka wrote: > > External email: Use caution opening links or attachments > > >> Hi, >> autofdo tests are now running only for x86. This patch makes it >> run for aarch64 too. Verified that perf and create_gcov are running >> as expected. >> >> gcc/ChangeL

Re: [PATCH v4 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-05-29 Thread Jonathan Wakely
On Mon, 26 May 2025 at 15:21, Luc Grosheintz wrote: > > [mdspan.layout.left.cons] of N4950 states that this ctor is not > noexcept. Since, all other ctors of layout_left, layout_right or > layout_stride are noexcept, the choice was made, based on > [res.on.exception.handling], to make this ctor no

Re: [PATCH v4 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-05-29 Thread Jonathan Wakely
On Thu, 29 May 2025 at 10:31, Jonathan Wakely wrote: > > On Mon, 26 May 2025 at 15:21, Luc Grosheintz wrote: > > > > [mdspan.layout.left.cons] of N4950 states that this ctor is not > > noexcept. Since, all other ctors of layout_left, layout_right or > > layout_stride are noexcept, the choice was

[PATCH] Fix crash with constant initializer caused by IPA

2025-05-29 Thread Eric Botcazou
Hi, the attached Ada testcase compiled with -O2 -gnatn makes the compiler crash in vect_can_force_dr_alignment_p during SLP vectorization: if (decl_in_symtab_p (decl) && !symtab_node::get (decl)->can_increase_alignment_p ()) return false; because symtab_node::get (decl) returns a nu

Re: [PATCH v4 7/8] libstdc++: Add tests for layout_stride.

2025-05-29 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 4:25 PM Luc Grosheintz wrote: > Implements the tests for layout_stride and for the features of the other > two layouts that depend on layout_stride. > > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add > tests f

Re: [PATCH v4 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-05-29 Thread Tomasz Kaminski
On Mon, May 26, 2025 at 4:22 PM Luc Grosheintz wrote: > [mdspan.layout.left.cons] of N4950 states that this ctor is not > noexcept. Since, all other ctors of layout_left, layout_right or > layout_stride are noexcept, the choice was made, based on > [res.on.exception.handling], to make this ctor n

Re: [PATCH] [AUTOFDO] Enable autofdo tests for aarch64

2025-05-29 Thread Jan Hubicka
> Hi, > autofdo tests are now running only for x86. This patch makes it > run for aarch64 too. Verified that perf and create_gcov are running > as expected. > > gcc/ChangeLog: > > * config/aarch64/gcc-auto-profile: Make script executable. > > gcc/testsuite/ChangeLog: > > * lib/t

Re: [PATCH v4 7/8] libstdc++: Add tests for layout_stride.

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 9:49 AM Tomasz Kaminski wrote: > > > On Mon, May 26, 2025 at 4:25 PM Luc Grosheintz > wrote: > >> Implements the tests for layout_stride and for the features of the other >> two layouts that depend on layout_stride. >> >> libstdc++-v3/ChangeLog: >> >> * testsuite/

[PATCH] widening_mul: Make better use of overflowing operations in codegen of min/max(a, add/sub(a, b))

2025-05-29 Thread dhruvc
From: Dhruv Chawla This patch folds the following patterns: - max (a, add (a, b)) -> [sum, ovf] = addo (a, b); !ovf ? sum : a - max (a, sub (a, b)) -> [sum, ovf] = subo (a, b); !ovf ? a : sum - min (a, add (a, b)) -> [sum, ovf] = addo (a, b); !ovf ? a : sum - min (a, sub (a, b)) -> [sum, ovf] = a

Re: [PATCH v4 6/8] libstdc++: Implement layout_stride from mdspan.

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 9:23 AM Tomasz Kaminski wrote: > > > > On Mon, May 26, 2025 at 4:13 PM Luc Grosheintz > wrote: > >> Implements the remaining parts of layout_left and layout_right; and all >> of layout_stride. >> >> The implementation of layout_stride::mapping::is_exhaustive applies >> th

[PATCH] i386: Add more peephole2 for APX NDD

2025-05-29 Thread Hu, Lin1
Hi, The patch aims to optimize movb(%rdi), %al movq%rdi, %rbx xorl%esi, %eax, %edx movb%dl, (%rdi) cmpb%sil, %al jne to xorb%sil, (%rdi) movq%rdi, %rbx jne Reduce 2 mov and 1 cmp instructi

Re: [PATCH v2] libstdc++: Implement stringstream from string_view [PR119741]

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 9:21 AM Nathan Myers wrote: > Change in V2: > * apply all review comments > * remove redundant drive-by "requires" on ctor from string allocator arg > * check allocators are plumbed through > > -- >8 -- > > Implement PR libstdc++/119741 (P2495R3) > Add constructors to s

Re: [PATCH] ggc-page: Fix up build on non-USING_MMAP hosts [PR120464]

2025-05-29 Thread Richard Biener
> Am 29.05.2025 um 08:28 schrieb Jakub Jelinek : > > On Tue, Apr 22, 2025 at 01:27:34PM +0200, Richard Biener wrote: >> This is OK for trunk after we've released GCC 15.1. > > This change broke build on non-USING_MMAP hosts. > I don't have access to one, so I've just added #undef USING_MMAP >

Re: [PATCH][GCC16][GCC15] aarch64: Add support for FUJITSU-MONAKA (-mcpu=fujitsu-monaka) CPU

2025-05-29 Thread Kyrylo Tkachov
> On 28 May 2025, at 13:36, Kyrylo Tkachov wrote: > > Hi Yuta-san > >> On 23 May 2025, at 07:49, Yuta Mukai (Fujitsu) >> wrote: >> >> Hello, >> >> We would like to enable features for FUJITSU-MONAKA that were implemented in >> GCC after we added support for FUJITSU-MONAKA. >> As the featu

Re: [PATCH v3] libstdc++: Implement stringstream from string_view [PR119741]

2025-05-29 Thread Jonathan Wakely
On 29/05/25 09:50 -0400, Nathan Myers wrote: Change in V3: * Comment that p2495 specifies a drive-by constraint omitted as redundant * Adjust whitespace to fit in 80 columns Change in V2: * apply all review comments * remove redundant drive-by "requires" on ctor from string allocator arg * check

Re: [PATCH] libstdc++: Compare keys and values separately in flat_map::operator==

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 3:56 PM Patrick Palka wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? > > -- >8 -- > > Instead of effectively doing a zipped comparison of the keys and values, > compare them separately to leverage the underlying containers' optimized > equality imp

Re: [AUTOFDO] Fix annotated profile for de-duplicated call

2025-05-29 Thread Jan Hubicka
> diff --git a/gcc/auto-profile.cc b/gcc/auto-profile.cc > index 7e0e8c66124..8a317d85277 100644 > --- a/gcc/auto-profile.cc > +++ b/gcc/auto-profile.cc > @@ -1129,6 +1129,26 @@ afdo_set_bb_count (basic_block bb, const stmt_set > &promoted) >gimple *stmt = gsi_stmt (gsi); >if (gimp

[PATCH v3] libstdc++: Implement stringstream from string_view [PR119741]

2025-05-29 Thread Nathan Myers
Change in V3: * Comment that p2495 specifies a drive-by constraint omitted as redundant * Adjust whitespace to fit in 80 columns Change in V2: * apply all review comments * remove redundant drive-by "requires" on ctor from string allocator arg * check allocators are plumbed through -- >8 --

[PATCH] libstdc++: Compare keys and values separately in flat_map::operator==

2025-05-29 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? -- >8 -- Instead of effectively doing a zipped comparison of the keys and values, compare them separately to leverage the underlying containers' optimized equality implementations. libstdc++-v3/ChangeLog: * include/std/flat_

Re: [PATCH] libstdc++: Compare keys and values separately in flat_map::operator==

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 4:37 PM Tomasz Kaminski wrote: > > > On Thu, May 29, 2025 at 3:56 PM Patrick Palka wrote: > >> Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? >> >> -- >8 -- >> >> Instead of effectively doing a zipped comparison of the keys and values, >> compare them sepa

Re: [PATCH] libstdc++: Compare keys and values separately in flat_map::operator==

2025-05-29 Thread Jonathan Wakely
On Thu, 29 May 2025 at 15:42, Tomasz Kaminski wrote: > > > > On Thu, May 29, 2025 at 3:56 PM Patrick Palka wrote: >> >> Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? >> >> -- >8 -- >> >> Instead of effectively doing a zipped comparison of the keys and values, >> compare them sepa

[pushed] c++: C++17 constexpr lambda and goto/static

2025-05-29 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- We only want the error for these cases for functions explicitly declared constexpr, but we still want to set invalid_constexpr on C++17 lambdas so maybe_save_constexpr_fundef doesn't make them implicitly constexpr. The potential_constant_ex

Re: [PATCH] RISC-V: Add 'bclr+binv' peephole2 optimization.

2025-05-29 Thread Jeff Law
On 5/28/25 9:05 PM, Jiawei wrote: This seems like it would be much better as a combine pattern.   In fact, I'm a bit surprised that combine didn't simplify this series of operations into a IOR.  So I'd really like to see the .combine dump with and without this hunk for the relevant testcas

Re: [EXT] Re: [PATCH v3] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-05-29 Thread Peter Bergner
On 5/29/25 5:35 AM, Segher Boessenkool wrote: > > Add yourself to suthors as well? Agreed. Just add your name/email address directly under mine, like so: 2025-05-29 Peter Bergner Jeevitha Palanisamy >> +{ \ >>

Re: [PATCH] libstdc++: Compare keys and values separately in flat_map::operator==

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 4:49 PM Jonathan Wakely wrote: > On Thu, 29 May 2025 at 15:48, Jonathan Wakely wrote: > > > > On Thu, 29 May 2025 at 15:42, Tomasz Kaminski > wrote: > > > > > > > > > > > > On Thu, May 29, 2025 at 3:56 PM Patrick Palka > wrote: > > >> > > >> Tested on x86_64-pc-linux-gn

Re: [PATCH v4 0/8] Implement layouts from mdspan.

2025-05-29 Thread Tomasz Kaminski
Sending a bit after the fact, but: I have finished the review, and most of the commits have really minimal cosmetic changes. The only major functional one I have requested are for layout_stride implementation, On Wed, May 28, 2025 at 4:36 PM Tomasz Kaminski wrote: > I have reviewed and posted fe

Re: [PATCH] libstdc++: Define flat_set::operator== in terms of ==

2025-05-29 Thread Tomasz Kaminski
On Thu, May 29, 2025 at 7:14 PM Patrick Palka wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? > > -- >8 -- > > ... for consistency with the other standard container adaptors > (stack, queue, etc). > > libstdc++-v3/ChangeLog: > > * include/std/flat_set (_Flat_set_im

Re: [AUTOFDO] Fix annotated profile for de-duplicated call

2025-05-29 Thread Jan Hubicka
> > However i do not quite follow the old or new logic here. > So if I have only one unknown edge out (or in) from BB and I know > its count, I can determine count of that edge by Kirhoff law. > > But then the old code computes number of edges out of the BB > and if it is only one it updates the

[pushed] c++, coroutines: Delete now unused code for parm guards.

2025-05-29 Thread Iain Sandoe
tested on x86_64-darwin, powerpc64le-linux; NFC pushed as obvious, thanks, Iain --- 8< --- Since r16-775-g18df4a10bc9694 we use nested cleanups to handle parameter copy destructors in the ramp (and pass a list of cleanups required to the actor which will only be invoked if the parameter copies we

Re: [PATCH v5 01/24] ppc: Add PowerPC FMV symbol tests.

2025-05-29 Thread Jeff Law
On 5/29/25 6:40 AM, Alfie Richards wrote: From: Alice Carlotti This tests the mangling of function assembly names when annotated with target_clones attributes. gcc/testsuite/ChangeLog: * g++.target/powerpc/mvc-symbols1.C: New test. * g++.target/powerpc/mvc-symbols2.C: New t

Re: [PATCH v5 02/24] i386: Add x86 FMV symbol tests

2025-05-29 Thread Jeff Law
On 5/29/25 6:40 AM, Alfie Richards wrote: From: Alice Carlotti This is for testing the x86 mangling of FMV versioned function assembly names. gcc/testsuite/ChangeLog: * g++.target/i386/mv-symbols1.C: New test. * g++.target/i386/mv-symbols2.C: New test. * g++.target/

[PATCH v4] libstdc++: stringstream ctors from string_view [PR119741]

2025-05-29 Thread Nathan Myers
Change in V4: * Rename tests to string_view.cc * Adapt tests to cons/wchar_t directories * Define symbol __cpp_lib_sstream_from_string_view as 202406 * Define symbol __glibcxx_want_sstream_from_string_view before version.h * Include version.h after other includes * No include type_traits * D

[PATCH v5 11/24] Add clone_identifier function.

2025-05-29 Thread Alfie Richards
This is similar to clone_function_name and its siblings but takes an identifier tree node rather than a function declaration. This is to be used in conjunction with the identifier node stored in cgraph_function_version_info::assembler_name to mangle FMV functions in later patches. gcc/ChangeLog:

[PATCH v5 21/24] aarch64: Remove FMV beta warning.

2025-05-29 Thread Alfie Richards
This patch removes the warning for target_version and target_clones in aarch64 as it is now spec compliant. gcc/ChangeLog: * config/aarch64/aarch64.cc (aarch64_process_target_version_attr): Remove warning. * config/aarch64/aarch64.opt: Mark -Wno-experimental-fmv-target

[PATCH v5 22/24] c: Add target_version attribute support.

2025-05-29 Thread Alfie Richards
This commit introduces support for the target_version attribute in the c frontend, following the behavior defined in the Arm C Language Extension. Key changes include: - During pushdecl, the compiler now checks whether the current symbol is part of a multiversioned set. - New versions are add

[PATCH] RISC-V: Add svbare extension.

2025-05-29 Thread Dongyan Chen
This patch support svbare extension, which is an extension in RVA23 profile. To enable GCC to recognize and process svbare extension correctly at compile time. --- gcc/config/riscv/riscv-ext.def | 13 + gcc/config/riscv/riscv-ext.opt | 2 ++ gcc/doc/riscv-ext.texi

Minor patch committed.

2025-05-29 Thread Jerry D
This was a followup to make the error message a little better. Committed. commit c69afa2f1bd7455457ab4e028a6bc51211b2dd20 (HEAD -> master, origin/master, origin/HEAD) Author: Jerry DeLisle Date: Thu May 29 10:02:00 2025 -0700 Fortran: Make minor adjustment to error message.

[PATCH] libstdc++: Define flat_set::operator== in terms of ==

2025-05-29 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? -- >8 -- ... for consistency with the other standard container adaptors (stack, queue, etc). libstdc++-v3/ChangeLog: * include/std/flat_set (_Flat_set_impl::operator==): Define in terms of ==, not std::equal. --- li

Re: [PATCH] aarch64: Use LDR for first-element loads for Advanced SIMD

2025-05-29 Thread Richard Sandiford
Dhruv Chawla writes: > On 08/05/25 18:43, Richard Sandiford wrote: >> Otherwise it looks good. But I think we should think about how we >> plan to integrate the related optimisation for register inputs. E.g.: >> >> int32x4_t foo(int32_t x) { >> return vsetq_lane_s32(x, vdupq_n_s32(0), 0);

[pushed] c++: xobj lambda 'this' capture [PR113563]

2025-05-29 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- Various places were still making assumptions that we could get to the 'this' capture through current_class_ref in a lambda op(), which is incorrect for an explicit object op(). PR c++/113563 gcc/cp/ChangeLog: * lambda.cc (

[PATCH v5 14/24] fmv: Add reject_target_clone hook for filtering target_clone versions.

2025-05-29 Thread Alfie Richards
This patch introduces the TARGET_REJECT_FUNCTION_CLONE_VERSION hook which is used to determine if a target_clones version string parses. If true is returned, a warning is emitted and from then on the version is ignored. This is as specified in the Arm C Language Extension. The purpose of this is

[PATCH v5 16/24] c/c++: Add target_[version/clones] to decl diagnostics formatting.

2025-05-29 Thread Alfie Richards
Adds the target_version and target_clones attributes to diagnostic messages for target_version semantics. This is because the target_version/target_clones attributes affect the identity of the decls, so need to be represented in diagnostics for them. After this change diagnostics look like: ```

[committed] libstdc++: Fix another 17_intro/names.cc failure on AIX

2025-05-29 Thread Jonathan Wakely
FAIL: 17_intro/names.cc -std=gnu++98 (test for excess errors) Also fix typo in experimental/names.cc where I did #undef for the wrong name in r16-901-gd1ced2a5ea6b09. libstdc++-v3/ChangeLog: * testsuite/17_intro/names.cc [_AIX] (a): Undefine. * testsuite/experimental/names.cc [_

[committed] libstdc++: Re-enable some XPASS tests for AIX

2025-05-29 Thread Jonathan Wakely
The deque shrink_to_fit.cc test always passes on AIX, I think it should not have been disabled. The 96088.cc tests pass for C++20 and later (I don't know why) so make them require C++20, as they fail otherwise. libstdc++-v3/ChangeLog: * testsuite/23_containers/deque/capacity/shrink_to_fi

[PATCH v5 07/24] Change make_attribute to take string_slice.

2025-05-29 Thread Alfie Richards
gcc/ChangeLog: * attribs.cc (make_attribute): Change arguments. * attribs.h (make_attribute): Change arguments. Approved by Richard Sandiford. --- gcc/attribs.cc | 16 +--- gcc/attribs.h | 2 +- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/gcc/att

[PATCH v5 23/24] c/aarch64: Add FMV diagnostic tests.

2025-05-29 Thread Alfie Richards
Adds some aarch64 C fmv diagnostic tests. This mostly tests C front end code, but has to be target specific at FMV is requires specifying target extensions. gcc/testsuite/ChangeLog: * gcc.target/aarch64/mv-and-mvc-error1.c: New test. * gcc.target/aarch64/mv-and-mvc-error2.c: New

[PATCH v5 05/24] Update is_function_default_version to work with target_version.

2025-05-29 Thread Alfie Richards
Notably this respects target_version semantics where an unannotated function can be the default version. gcc/ChangeLog: * attribs.cc (is_function_default_version): Add target_version logic. Approved by Richard Sandiford. --- gcc/attribs.cc | 27 --- 1 file change

[PATCH v5 20/24] aarch64: testsuite: Add diagnostic tests for Aarch64 FMV.

2025-05-29 Thread Alfie Richards
Add tests covering many FMV errors for Aarch64, including redeclaration, and mixing target_clones and target_versions. gcc/testsuite/ChangeLog: * g++.target/aarch64/mv-and-mvc-error1.C: New test. * g++.target/aarch64/mv-and-mvc-error2.C: New test. * g++.target/aarch64/mv-a

[committed] libstdc++: Fix lwg4084.cc test FAIL on AIX

2025-05-29 Thread Jonathan Wakely
On AIX printf formats a quiet NaN as "NaNQ" and it doesn't matter whether %f or %F is used. Similarly, it always prints "INF" for infinity, even when %f is used. Adjust a test that currently fails due to this AIX-specific (and non-conforming) behaviour. libstdc++-v3/ChangeLog: * testsuite

[PATCH] RISC-V: Imply zicsr for svade and svadu extensions.

2025-05-29 Thread Dongyan Chen
This patch implies zicsr for svade and svadu extensions. According to the riscv-privileged spec, the svade and svadu extensions are privileged instructions, so they should imply zicsr. gcc/ChangeLog: * config/riscv/riscv-ext.def: Imply zicsr. --- gcc/config/riscv/riscv-ext.def | 4 ++--

Re: [PATCH RFA (diagnostic)] c++: modules and #pragma diagnostic

2025-05-29 Thread Jason Merrill
On 5/27/25 5:12 PM, Jason Merrill wrote: On 5/27/25 4:47 PM, Jason Merrill wrote: On 5/27/25 1:33 PM, David Malcolm wrote: On Fri, 2025-05-23 at 16:58 -0400, Jason Merrill wrote: On 4/14/25 9:57 AM, Jason Merrill wrote: On 1/9/25 10:00 PM, Jason Merrill wrote: Tested x86_64-pc-linux-gnu.  Is

Re: [PATCH] c++, coroutines: Fix identification of coroutine ramps [PR120453].

2025-05-29 Thread Jason Merrill
On 5/29/25 6:56 AM, Iain Sandoe wrote: Tested on x86_64-darwin, confirming that the original reported code fails without the change here. Unfortunately, if we add a move constructor to the reduced case, it no longer fails on unpatched trunk - so not proposing to add that as a testcase (since it

Re: [PATCH] ipa: When inlining, don't combine PT JFs changing signedness (PR120295)

2025-05-29 Thread Jan Hubicka
> Hi, > > in GCC 15 we allowed jump-function generation code to skip over a > type-cast converting one integer to another as long as the latter can > hold all the values of the former or has at least the same precision. > This works well for IPA-CP where we do then evaluate each jump > function as

[PATCH] c++, coroutines: Simplify initial_await_resume_called.

2025-05-29 Thread Iain Sandoe
Tested on x86_64-darwin, powerpc64le-linux, OK for trunk? thanks Iain --- 8< --- We do not need to generate this code early, since it does not affect any of the analysis. Lowering it later takes less code, and avoids modifying the initial await expresssion which will simplify changes to analysis

Re: [PATCH] libstdc++: Compare keys and values separately in flat_map::operator==

2025-05-29 Thread Patrick Palka
On Thu, 29 May 2025, Tomasz Kaminski wrote: > > > On Thu, May 29, 2025 at 4:37 PM Tomasz Kaminski wrote: > > > On Thu, May 29, 2025 at 3:56 PM Patrick Palka wrote: > Tested on x86_64-pc-linux-gnu, does this look OK for trunk/15? > > -- >8 -- > > Instead of effectively doi

  1   2   >