Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-26 Thread Tomasz Kaminski
On LWG reflector it was pointed out that returning copy of F, may also impact the result of overload resolution, as without forwarding pointer parameters can be initialized from 0: #include struct S { void operator()(long, long); // 1 void operator()(int, void*); // 2 }; void foo() {

[PATCH] libsupc++: Change _Unordered comparison value to minimum value of signed char.

2025-08-26 Thread Tomasz Kamiński
For any minimum value of a signed type, its negation (with wraparound) results in the same value, behaving like zero. Representing the unordered result with this minimum value, along with 0 for equal, 1 for greater, and -1 for less in partial_ordering, allows its value to be reversed using unary ne

[PATCH] Bail out early during gimplify_asm_expr [PR121391]

2025-08-26 Thread Stefan Schulze Frielinghaus
Bootstrapped and regtested on x86_64 and s390. Ok for mainline? -- >8 -- In case an asm operand is an error node, constraints etc. are still validated. Furthermore, all other operands are gimplified, although an error is returned in the end anyway. For hard register constraints an operand is r

Re: [PATCH] x86-64: Better compare source operands of *tls_dynamic_gnu2_call_64_di

2025-08-26 Thread Hongtao Liu
On Wed, Aug 27, 2025 at 6:32 AM H.J. Lu wrote: > > Source operands of 2 *tls_dynamic_gnu2_call_64_di patterns in > > (insn 10 9 11 3 (set (reg:DI 100) > (unspec:DI [ > (symbol_ref:DI ("caml_state") [flags 0x10] 0x7fe10e1d9e40 caml_state>) > ] UNSPEC_TLSDESC))

[PUSHED] testsuite; Fix unprotected-allocas-1.c at -O3 [PR121684]

2025-08-26 Thread Andrew Pinski
The problem here is after r16-101, the 2 functions containing alloca/VLA start to be cloned and then we un-VLA happens in using_vararray so this is no longer testing what it should be testing. The obvious fix is to mark using_vararray and using_alloca as noclone too. Pushed as obvious after a qui

[PATCH] Restrict avx256_avoid_vec_perm only for loop vectorization.

2025-08-26 Thread liuhongt
Since kind == vec_perm may not be a real vec_perm, just a broadcast or simple load in BB vectorizer. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ready push to trunk. gcc/ChangeLog: * config/i386/i386.cc (ix86_vector_costs::finish_cost): Restrict tune avx256_avoid_ve

Re: [PATCH] x86-64: Emit the TLS call after debug marker

2025-08-26 Thread Hongtao Liu
On Wed, Aug 27, 2025 at 11:59 AM H.J. Lu wrote: > > On Tue, Aug 26, 2025 at 8:50 PM Hongtao Liu wrote: > > > > On Wed, Aug 27, 2025 at 6:30 AM H.J. Lu wrote: > > > > > > For a basic block with only a debug marker: > > > > > > (note 3 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK) > > > (note 2 3 5 2 NOTE_I

Re: [PATCH] x86-64: Emit the TLS call after debug marker

2025-08-26 Thread H.J. Lu
On Tue, Aug 26, 2025 at 8:50 PM Hongtao Liu wrote: > > On Wed, Aug 27, 2025 at 6:30 AM H.J. Lu wrote: > > > > For a basic block with only a debug marker: > > > > (note 3 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK) > > (note 2 3 5 2 NOTE_INSN_FUNCTION_BEG) > > (debug_insn 5 2 16 2 (debug_marker) "x.c":6:3

Re: [PATCH] x86-64: Emit the TLS call after debug marker

2025-08-26 Thread Hongtao Liu
On Wed, Aug 27, 2025 at 6:30 AM H.J. Lu wrote: > > For a basic block with only a debug marker: > > (note 3 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK) > (note 2 3 5 2 NOTE_INSN_FUNCTION_BEG) > (debug_insn 5 2 16 2 (debug_marker) "x.c":6:3 -1 (nil)) > > emit the TLS call after debug marker. > > gcc/ > >

FW: [r16-3364 Regression] FAIL: gcc.target/i386/shift-gf2p8affine-7.c scan-assembler-times vgf2p8affineqb 53 on Linux/x86_64

2025-08-26 Thread Jiang, Haochen
On Linux/x86_64, 001cd39749f94ece8276b63f91eb864babb81a5d is the first bad commit commit 001cd39749f94ece8276b63f91eb864babb81a5d Author: Andi Kleen Date: Sun Aug 3 17:35:39 2025 -0700 Use x86 GFNI for vectorized constant byte shifts/rotates caused FAIL: gcc.target/i386/shift-gf2p8affine

[r16-3379 Regression] FAIL: gcc.dg/debug/ctf/ctf-array-7.c (test for excess errors) on Linux/x86_64

2025-08-26 Thread Jiang, Haochen
On Linux/x86_64, c77d79785d32b30502c8bcd6aa53b63d715bb124 is the first bad commit commit c77d79785d32b30502c8bcd6aa53b63d715bb124 Author: David Faust Date: Wed Aug 6 09:24:40 2025 -0700 ctf: avoid overflow for array num elements [PR121411] caused FAIL: gcc.dg/debug/ctf/ctf-array-7.c (tes

[ping] Re: [PATCH v2] MicroBlaze : Enhance support for atomics. Fix PR118280

2025-08-26 Thread Gopi Kumar Bulusu
On Thu, Aug 14, 2025, 12:17 PM Gopi Kumar Bulusu wrote: > > namaskaaram > > This patch has been reviewed by Neal Frager - his comments are present in > bugzilla PR 118280 > > If needed I can submit an updated patch with the patch comment updated as > follows > > Reviewed-by: Neal Frager > > > dh

[committed] More RISC-V testsuite hygiene

2025-08-26 Thread Jeff Law
More testsuite hygiene. Some of the thead tests are expecting to find xtheadvdot in the extension set, but it's not defined as a valid extension anywhere. I'm just removing xtheadvdot. Someone more familiar with these cores can add it back properly if they're so inclined. Second, there's a

[PATCH] testsuite: Remove xfail from g++.dg/ipa/devirt-23.C

2025-08-26 Thread Thiago Jung Bauermann
As Andrew Pinski noted in PR60674: devirt-23.C started to pass with r16-101-g132d01d96ea9d6. So just need to update the testcase removing the xfail and close this bug as fixed. The reason why this was not fixed until r16-101-g132d01d96ea9d6 is because the call is from main which is kno

Re: [PATCH, Fortran] PR114611 Issue error message for H edit descriptor

2025-08-26 Thread Steve Kargl
On Tue, Aug 26, 2025 at 11:54:34AM -0700, Jerry D wrote: > The attached patch provides an error with -std=f95 or higher. > > Regression tested on x86_64. > > OK for trunk? > Yes. Thanks for the patch. -- Steve

[PATCH V2 1/2] Match: Support SAT_TRUNC variant NARROW_CLIP

2025-08-26 Thread Edwin Lu
This patch tries to add support for a variant of SAT_TRUNC where negative numbers are clipped to 0 instead of NARROW_TYPE_MAX_VALUE. This form is seen in x264, aka UT clip (T a) { return a & (UT)(-1) ? (-a) >> 31 : a; } Where sizeof(UT) < sizeof(T) I'm unable to get the SAT_TRUNC pattern to ap

[PATCH V2 2/2] RISC-V: Support vnclip idiom testcase [PR120378]

2025-08-26 Thread Edwin Lu
This patch contains testcases for PR120378 after the change made to support the vnclipu variant of the SAT_TRUNC pattern. PR target/120378 gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/pr120378-1.c: New test. * gcc.target/riscv/rvv/autovec/pr120378-2.c: New test

[PATCH V2 0/2] Add support for vectorizing x264 vnclipu idiom [PR120378]

2025-08-26 Thread Edwin Lu
Respin of https://gcc.gnu.org/pipermail/gcc-patches/2025-August/691426.html but separates the middle end vectorizer changes from the RISC-V target specific changes. The patch changes the riscv loop codegen from vsetvli a5,a2,e32,m1,ta,mu vle32.v v1,0(a1) sllia4,a5,2

Re: [PATCH] Move pr121656.c to gcc.dg/torture

2025-08-26 Thread Sam James
"H.J. Lu" writes: > Move pr121656.c to gcc.dg/torture and replace weak attribute with noipa > attribute. Verified by reverting > > 56ca14c4c4f Fix invalid right shift count with recent ifcvt changes > > to trigger > > FAIL: gcc.dg/torture/pr121656.c -O1 execution test > FAIL: gcc.dg/torture/p

[PATCH] Move pr121656.c to gcc.dg/torture

2025-08-26 Thread H.J. Lu
Move pr121656.c to gcc.dg/torture and replace weak attribute with noipa attribute. Verified by reverting 56ca14c4c4f Fix invalid right shift count with recent ifcvt changes to trigger FAIL: gcc.dg/torture/pr121656.c -O1 execution test FAIL: gcc.dg/torture/pr121656.c -O2 execution test FAI

[committed] RISC-V Testsuite hygiene

2025-08-26 Thread Jeff Law
Shreya and I were working through some testsuite failures and noticed that many of the current failures on the pioneer were just silly. We have tests that expect to see full architecture strings in their expected output when the bulk (some might say all) of the architecture string is irrelev

[PATCH] x86-64: Better compare source operands of *tls_dynamic_gnu2_call_64_di

2025-08-26 Thread H.J. Lu
Source operands of 2 *tls_dynamic_gnu2_call_64_di patterns in (insn 10 9 11 3 (set (reg:DI 100) (unspec:DI [ (symbol_ref:DI ("caml_state") [flags 0x10] ) ] UNSPEC_TLSDESC)) "x.c":7:16 1674 {*tls_dynamic_gnu2_lea_64_di} (nil)) (insn 11 10 12 3 (parallel [

[PATCH] x86-64: Emit the TLS call after debug marker

2025-08-26 Thread H.J. Lu
For a basic block with only a debug marker: (note 3 0 2 2 [bb 2] NOTE_INSN_BASIC_BLOCK) (note 2 3 5 2 NOTE_INSN_FUNCTION_BEG) (debug_insn 5 2 16 2 (debug_marker) "x.c":6:3 -1 (nil)) emit the TLS call after debug marker. gcc/ PR target/121668 * config/i386/i386-features.cc (ix86_

Ping: [PATCH, V8] Fix PR 118541, do not generate unordered fp compares

2025-08-26 Thread Michael Meissner
Ping patch: | Date: Thu, 31 Jul 2025 02:25:19 -0400 | Subject: [PATCH, V8] Fix PR 118541, do not generate unordered fp compares | Message-ID: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/691248.html -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linu

Ping #3: [PATCH, V4] Add -mcpu=future to the PowerPC

2025-08-26 Thread Michael Meissner
Ping #3 to add -mcpu=future support to the PowerPC posted on July 23rd, 2025: | Date: Wed, 23 Jul 2025 15:17:41 -0400 | Subject: [PATCH, V4] Add -mcpu=future to the PowerPC | Message-ID: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690398.html I am back now, and I would like to see if we

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Tobias Burnus
Jakub Jelinek wrote: It of course makes a lot of sense. declare simd is used mostly on the host in the wild, outside of target regions. On "normal" Linux for instance in /usr/include/bits/math-vector.h, albeit most of the time -fopenmp is not active such that the "simd" attribute is used inste

Re: [PATCH v3 0/3] implement defer statements as per ts 25755

2025-08-26 Thread Anna (navi) Figueiredo Gomes
On Tue Aug 26, 2025 at 9:53 PM CEST, Joseph Myers wrote: > There has been a significant discussion on the reflector in the past few > days concerning jumping backwards across a defer block within a scope. > How do you handle this case, what is the rationale for the decisions made > about that c

[PATCH] testsuite: add check_effective_target_ptr64plus

2025-08-26 Thread David Faust
Similar to the existing ptr32plus, add a proc returning whether the target uses 64-bit or larger pointers. It can be useful immediately in the CTF testsuite, and likely elsewhere. Tested on x86_64-pc-linux-gnu and with cross for arm-eabi cortex-m3 in the CTF testsuite. gcc/testsuite/ *

Re: [PATCH v3 0/3] implement defer statements as per ts 25755

2025-08-26 Thread Joseph Myers
There has been a significant discussion on the reflector in the past few days concerning jumping backwards across a defer block within a scope. How do you handle this case, what is the rationale for the decisions made about that case, and are there appropriate testcases for it included? int v

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Tue, 26 Aug 2025, Tomasz Kaminski wrote: > > > On Tue, Aug 26, 2025 at 5:50 PM Patrick Palka wrote: > On Tue, 26 Aug 2025, Jonathan Wakely wrote: > > > On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back

Re: [PATCH] ctf: avoid overflow for array num elements [PR121411]

2025-08-26 Thread David Faust
On 8/26/25 11:54, H.J. Lu wrote: > On Mon, Aug 25, 2025 at 12:11 PM David Faust wrote: >> >> >> >> On 8/25/25 10:33, Indu Bhagat wrote: >>> On 8/25/25 8:08 AM, David Faust wrote: On 8/22/25 23:49, Indu Bhagat wrote: > On 8/6/25 9:26 AM, David Faust wrote: >> CTF array enc

[committed] testsuite: restrict ctf-array-7 test to 64-bit targets [PR121411]

2025-08-26 Thread David Faust
The test fails to compile on 32-bit targets because the arrays are too large. Restrict to targets where the array index type is 64-bits. Also note the relevant PR in the test comment. Tested on x86_64-pc-linux-gnu host and arm-eabi cross target. Pushed as obvious. PR debug/121411 gcc/te

Re: [PATCH v3] testsuite: arm: Disable sched2 and sched3 in unsigned-extend-2.c

2025-08-26 Thread Torbjorn SVENSSON
On 2025-08-26 15:27, Richard Earnshaw wrote: On 10/08/2025 12:51, Torbjörn SVENSSON wrote: Ok for trunk and releases/gcc-15? For releases/gcc-15, I would also want to cherry-pick r16-562- g20c25919132 that converts the test to use function body instead of three scan-assembler. Changes sinc

Re: [PATCH] ctf: avoid overflow for array num elements [PR121411]

2025-08-26 Thread H.J. Lu
On Mon, Aug 25, 2025 at 12:11 PM David Faust wrote: > > > > On 8/25/25 10:33, Indu Bhagat wrote: > > On 8/25/25 8:08 AM, David Faust wrote: > >> > >> > >> On 8/22/25 23:49, Indu Bhagat wrote: > >>> On 8/6/25 9:26 AM, David Faust wrote: > CTF array encoding uses uint32 for number of elements.

[PATCH, Fortran] PR114611 Issue error message for H edit descriptor

2025-08-26 Thread Jerry D
The attached patch provides an error with -std=f95 or higher. Regression tested on x86_64. OK for trunk? Regards, Jerry Author: Jerry DeLisle Date: Tue Aug 26 11:36:25 2025 -0700 Fortran: H edit descriptor error with -std=f95 PR fortran/114611 gcc/fortran/ChangeLog:

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Sandra Loosemore
On 8/26/25 08:47, Tobias Burnus wrote: Hi Sandra, Sandra Loosemore wrote: On 8/26/25 05:26, Jakub Jelinek wrote: I wouldn't emit sorry for targets where we already implement it "correctly", i.e. at least all targets which have NULL targetm.simd_clone.compute_vecsize_and_simdlen There the argu

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Jakub Jelinek
On Tue, Aug 26, 2025 at 12:46:51PM -0600, Sandra Loosemore wrote: > > There is also no means to obtain > >   targetm.simd_clone.compute_vecsize_and_simdlen > > on the non-offload compiler for the offload compiler (but see below). > > Right, this is what I was getting at. It doesn't make sense fo

Re: [PATCH v3] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-26 Thread Qing Zhao
Hi, Kees, > On Aug 26, 2025, at 13:25, Kees Cook wrote: > > The __attribute__((__copy__)) functionality was crashing when copying > sanitizer-related attributes because these attributes violated the standard > GCC attribute infrastructure by storing INTEGER_CST values directly instead > of wrapp

[PATCHv4] libstdc++: Move tai_- and gps_clock::now impls out of ABI

2025-08-26 Thread Nathan Myers
Changes in v4: * Move global symbols to correct list. * Fix up commit annotations: Changelog, title. Changes in v3: * Add to global symbols list. Changes in v2: * tai_clock and gps_clock remain "is_steady = false". * Note adjustments to the exported global symbols list are not yet included

[PATCH v3] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-26 Thread Kees Cook
The __attribute__((__copy__)) functionality was crashing when copying sanitizer-related attributes because these attributes violated the standard GCC attribute infrastructure by storing INTEGER_CST values directly instead of wrapping them in TREE_LIST like all other attributes. Wrap sanitizer attr

[PATCHv3] libstdc++: Remove tai_- and gps_clock::now impls from ABI (RHEL-105230)

2025-08-26 Thread Nathan Myers
Change in v3: * Add two new symbols to config/abi/pre/gnu.ver Changes in v2: * tai_clock and gps_clock remain "is_steady = false". * Note adjustments to the exported global symbols list are not yet included in this patch. This moves std::tai_clock::now() and std::tai_clock::now() definitions

Re: [PATCH v2] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-26 Thread Kees Cook
On Tue, Aug 26, 2025 at 03:54:13PM +0300, Claudiu Zissulescu-Ianculescu wrote: > I think the tests are missing. Argh. I will send a v3... -- Kees Cook

Re: [PATCHv3] libstdc++: Remove tai_- and gps_clock::now impls from ABI (RHEL-105230)

2025-08-26 Thread Jonathan Wakely
On Tue, 26 Aug 2025 at 17:21, Nathan Myers wrote: > > Change in v3: > * Add two new symbols to config/abi/pre/gnu.ver > > Changes in v2: > * tai_clock and gps_clock remain "is_steady = false". > * Note adjustments to the exported global symbols list are > not yet included in this patch. > > T

[committed v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kamiński
This patch refactors the implementation of bind_front and bind_back to avoid using std::tuple for argument storage. Instead, bound arguments are now: * stored directly if there is only one, * within a dedicated _Bound_arg_storage otherwise. _Bound_arg_storage is less expensive to instantiate and a

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 5:50 PM Patrick Palka wrote: > On Tue, 26 Aug 2025, Jonathan Wakely wrote: > > > On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back to > > > avoid using std::tuple for argument storage. Instead, bound a

RE: [v3 PATCH 0/6] aarch64: Support for user-defined aarch64 tuning

2025-08-26 Thread Tamar Christina
> -Original Message- > From: soum...@nvidia.com > Sent: Monday, August 25, 2025 12:00 PM > To: gcc-patches@gcc.gnu.org > Cc: ktkac...@nvidia.com; rdsandif...@googlemail.com; pins...@gmail.com > Subject: [v3 PATCH 0/6] aarch64: Support for user-defined aarch64 tuning > > From: Soumya AR >

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Tue, 26 Aug 2025, Jonathan Wakely wrote: > On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: > > This patch refactors the implementation of bind_front and bind_back to > > avoid using std::tuple for argument storage. Instead, bound arguments are > > now: > > * stored directly if there is only one

Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-26 Thread Jonathan Wakely
On Wed, 20 Aug 2025 at 11:08, Tomasz Kamiński wrote: > > This patch adjusts the implementation of bind_front(f) and bind_back(f) > (with zero bound arguments), so it returns an auto(f) (a copy of the > functor), rather than a specialization of Bind_front/Bind_back. This change > is mostly unobserv

Re: [PATCH v2] libstdc++: Do not require assignment for vector::resize(n, v) [PR90192]

2025-08-26 Thread Jonathan Wakely
On Tue, 26 Aug 2025 at 16:29, Tomasz Kamiński wrote: > > This patch introduces a new function, _M_fill_append, which is invoked when > copies of the same value are appended to the end of a vector. Unlike > _M_fill_insert(end(), n, v), _M_fill_append never permute elements in place, > so it does no

Re: [PATCH] libstdc++: Reduce chances of object aliasing for function wrapper.

2025-08-26 Thread Jonathan Wakely
On Tue, 19 Aug 2025 at 16:12, Tomasz Kamiński wrote: > > Previously, an empty functor (EmptyIdFunc) stored inside a > std::move_only_function being first member of a Composite class could have the > same address as the base of the EmptyIdFunc type (see included test cases), > resulting in two obje

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 4:30 PM Patrick Palka wrote: > On Tue, 26 Aug 2025, Tomasz Kaminski wrote: > > > > > > > On Tue, Aug 26, 2025 at 3:54 PM Patrick Palka wrote: > > On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > > > > > This patch refactors the implementation of bind_front and >

[PATCH v2] libstdc++: Do not require assignment for vector::resize(n, v) [PR90192]

2025-08-26 Thread Tomasz Kamiński
This patch introduces a new function, _M_fill_append, which is invoked when copies of the same value are appended to the end of a vector. Unlike _M_fill_insert(end(), n, v), _M_fill_append never permute elements in place, so it does not require: * vector element type to be assignable; * a copy of t

[PATCH v5] rs6000: Adding missed ISA 3.0 atomic memory operation instructions.

2025-08-26 Thread jeevitha
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. Changes from V4: * Refined AMO tests with proper variable names. * Added tests for missed checks. * Reworded comments. Changes from V3: Replaced named operands with positional operands in inline assembly for be

Re: [PATCH] libstdc++: Optimized bind_front/bind_back for zero bound args.

2025-08-26 Thread Patrick Palka
On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > This patch adjusts the implementation of bind_front(f) and bind_back(f) > (with zero bound arguments), so it returns an auto(f) (a copy of the > functor), rather than a specialization of Bind_front/Bind_back. This change > is mostly unobservable, as st

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Jonathan Wakely
On 20/08/25 10:13 +0200, Tomasz Kamiński wrote: This patch refactors the implementation of bind_front and bind_back to avoid using std::tuple for argument storage. Instead, bound arguments are now: * stored directly if there is only one, * within a dedicated _Bound_arg_storage otehrwise. "otehr

Re: [PATCH v3 3/3] c: implement the defer keyword

2025-08-26 Thread Jakub Jelinek
On Tue, Aug 26, 2025 at 04:09:11PM +0200, Anna (navi) Figueiredo Gomes wrote: > --- a/gcc/c-family/c-common.h > +++ b/gcc/c-family/c-common.h > @@ -97,11 +97,11 @@ enum rid >RID_IMAGINARY, > >/* C */ > - RID_INT, RID_CHAR, RID_FLOAT,RID_DOUBLE, RID_VOID, > - RID_ENUM,RID_S

Re: [PATCH v3 3/3] c: implement the defer keyword

2025-08-26 Thread Anna (navi) Figueiredo Gomes
> Why do you reformat everything? > The enumerators aren't sorted alphabetically, just add the new one > after RID_BITINT. i thought it was, but now i see it's not really, it can go in the end. > >> @@ -434,20 +434,21 @@ extern machine_mode c_default_pointer_mode; >> #define D_CXXONLY 0x0002

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Tobias Burnus
Hi Sandra, Sandra Loosemore wrote: On 8/26/25 05:26, Jakub Jelinek wrote: I wouldn't emit sorry for targets where we already implement it "correctly", i.e. at least all targets which have NULL targetm.simd_clone.compute_vecsize_and_simdlen There the argument transformation is identity. That

Re: [PATCH] libstdc++: Reduce chances of object aliasing for function wrapper.

2025-08-26 Thread Patrick Palka
On Tue, 19 Aug 2025, Tomasz Kamiński wrote: > Previously, an empty functor (EmptyIdFunc) stored inside a > std::move_only_function being first member of a Composite class could have the > same address as the base of the EmptyIdFunc type (see included test cases), > resulting in two objects of the

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Tue, 26 Aug 2025, Tomasz Kaminski wrote: > > > On Tue, Aug 26, 2025 at 3:54 PM Patrick Palka wrote: > On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back to > > avoid using std::tuple for argument storage. I

[PATCH v3 2/3] c: introduce jump barriers for statement expressions

2025-08-26 Thread Anna (navi) Figueiredo Gomes
represent the start and end of scope which a local jump is not allowed to cross as a jump barrier, moving this logic out into a function allows for defer statements to use the same codepath gcc/c/ChangeLog: * c-decl.cc (struct c_jump_barrier): New structure. (struct c_spot_binding

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 3:54 PM Patrick Palka wrote: > On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > > > This patch refactors the implementation of bind_front and bind_back to > > avoid using std::tuple for argument storage. Instead, bound arguments are > > now: > > * stored directly if there is

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Sandra Loosemore
On 8/26/25 05:26, Jakub Jelinek wrote: On Mon, Aug 25, 2025 at 08:24:18PM -0600, Sandra Loosemore wrote: On 8/25/25 00:13, Jakub Jelinek wrote: Yes, GCC doesn't have it implemented fully, but that doesn't mean it should be ripped off, the implementation should be simply finished. Well, I have

[PATCH v3 3/3] c: implement the defer keyword

2025-08-26 Thread Anna (navi) Figueiredo Gomes
based on the technical specification n3589[1], and set behind the command line flag '-fdefer-ts' deferred statements execute at the end of the scope they're added on, similar to the cleanup attribute, and they have much of the same constraints as statement expressions, with added limitation that n

[PATCH v3 1/3] c: handle expression nodes in push_cleanup

2025-08-26 Thread Anna (navi) Figueiredo Gomes
for future use with defer statements, as they do not have a declaration associated, and are bound to the scope with a BIND_EXPR gcc/c/ChangeLog: * c-typeck.cc (push_cleanup): Adjust. Signed-off-by: Anna (navi) Figueiredo Gomes --- gcc/c/c-typeck.cc | 10 -- 1 file changed, 8 in

[PATCH v3 0/3] implement defer statements as per ts 25755

2025-08-26 Thread Anna (navi) Figueiredo Gomes
* remove the need of -std=c2y for -fdefer-ts to take effect --- * added a test jumping into a defer block from above. * reworded the lookup_label_for_goto error message to mention the error is a jump into the defer block, instead of out. * moved the 'defer' keyword behind a -fdefer-ts flag, and a

Re: [PATCH 1/2] [PR121604] aarch64: Fix folding of svbrka/b + svpmov_lane with pfalse arguments

2025-08-26 Thread Alex Coplan
On 26/08/2025 13:39, Jennifer Schmitz wrote: > The function gimple_folder::fold_pfalse that was introduced in > g5289540ed58e42ae66255e31f22afe4ca0a6e15e > inappropriately folds > 1) svbrka/b with _m if the inactive operand is pfalse > 2) svpmov_lane with _m if the non-governing predicate operand i

Re: [PATCH v2] libstdc++: Refactor bound arguments storage for bind_front/back

2025-08-26 Thread Patrick Palka
On Wed, 20 Aug 2025, Tomasz Kamiński wrote: > This patch refactors the implementation of bind_front and bind_back to > avoid using std::tuple for argument storage. Instead, bound arguments are > now: > * stored directly if there is only one, > * within a dedicated _Bound_arg_storage otehrwise. I

Re: [PATCH v3] libstdc++: Implement LWG4222 'expected' constructor from a single value missing a constraint

2025-08-26 Thread Yrong
Got it, thanks! Patrick Palka 于2025年8月23日 周六02:59写道: > On Fri, 22 Aug 2025, Yrong wrote: > > > friendly ping~ > > > > Yrong 于2025年8月19日周二 23:58写道: > > Thanks for the review! But I don't have a commit access, could you > help me to commit this patch? Many thanks! > > The patch will be pushe

[PATCH 2/2] [PR121604] aarch64: Fold svbrka/b with ptrue predicate and operand to pfalse.

2025-08-26 Thread Jennifer Schmitz
We can fold svbrka/b to pfalse, if the governing predicate and the operand are both ptrue. We implemented this optimization during gimple folding in svbrk_unary_impl::fold. The patch was bootstrapped and tested on aarch64-linux-gnu, no regression. OK for trunk? Signed-off-by: Jennifer Schmitz g

[PATCH 1/2] [PR121604] aarch64: Fix folding of svbrka/b + svpmov_lane with pfalse arguments

2025-08-26 Thread Jennifer Schmitz
The function gimple_folder::fold_pfalse that was introduced in g5289540ed58e42ae66255e31f22afe4ca0a6e15e inappropriately folds 1) svbrka/b with _m if the inactive operand is pfalse 2) svpmov_lane with _m if the non-governing predicate operand is pfalse. To fix this, we added extra checks in the fol

Re: [PATCH] libstdc++, v2: library side of C++26 P2786R13 - Trivial Relocatability [PR119064]

2025-08-26 Thread Tomasz Kaminski
On Tue, Aug 26, 2025 at 3:23 PM Jakub Jelinek wrote: > On Mon, Jul 14, 2025 at 12:11:18PM +0200, Tomasz Kaminski wrote: > > We have a preference to use [[likely]] attribute when possible. > > Done. > > > > + for (; __first != __last; ++__first, ++__result) > > > + { > > > +

Re: [PATCH v3] testsuite: arm: Disable sched2 and sched3 in unsigned-extend-2.c

2025-08-26 Thread Richard Earnshaw
On 10/08/2025 12:51, Torbjörn SVENSSON wrote: Ok for trunk and releases/gcc-15? For releases/gcc-15, I would also want to cherry-pick r16-562-g20c25919132 that converts the test to use function body instead of three scan-assembler. Changes since v1: - Removed the acceptance of LDR as it's only

[PATCH 2/2]rs6000: Fix type selection for vec_slo and vec_sll [PR118480]

2025-08-26 Thread jeevitha
Hi All, The following patch has been bootstrapped and regtested on powerpc64le-linux. Previously, vec_slo/vec_sll always default to V4SI, inserting unwanted VIEW_CONVERT_EXPR int casts. This caused widening of char/short vectors, constants exceeding vspltisb/xxspltib range. For example: v

Re: [PATCH] libstdc++: Do not require assignment for vector::resize(n, v) [PR90192]

2025-08-26 Thread Jonathan Wakely
On Mon, 25 Aug 2025 at 13:42, Tomasz Kamiński wrote: > > This patch introduces a new function, _M_fill_append, which is invoked when > copies of the same value are appended to the end of a vector. Unlike > _M_fill_insert(end(), n, v), _M_fill_append never permute elements in place, > so it does no

Re: [PATCH v2] match.pd: Fold pattern of round semantics.

2025-08-26 Thread Richard Biener
On Tue, 26 Aug 2025, Zhou Zhao wrote: > > 在 2025/8/26 下午6:52, Richard Biener 写道: > > On Tue, 26 Aug 2025, Zhou Zhao wrote: > > > >> 在 2025/8/26 下午3:37, Richard Biener 写道: > >>> On Thu, 21 Aug 2025, Zhou Zhao wrote: > >>> > This patch is a respond of the patch posted at > https://gcc.gnu

Re: [PATCH] libstdc++: Specialize _Never_valueless_alt for jthread, stop_token and stop_source

2025-08-26 Thread Jonathan Wakely
On Thu, 21 Aug 2025 at 17:10, Tomasz Kamiński wrote: > > The move constructors for stop_source and stop_token are equivalent to > copying and clearing the raw pointer, as they are wrappers for a > counted-shared state. > > For jthread, the move constructor performs a member-wise move of stop_sourc

Re: [PATCH v9 06/13] c/c++: Add target_[version/clones] to decl diagnostics formatting.

2025-08-26 Thread Jason Merrill
On 8/26/25 6:39 AM, Alfie Richards wrote: The 08/19/2025 14:06, Jason Merrill wrote: On 8/19/25 4:49 AM, Alfie Richards wrote: Adds the target_version and target_clones attributes to diagnostic messages for target_version semantics. This is because the target_version/target_clones attributes a

Re: [PATCH v9 05/13] fmv: Change target_version semantics to follow ACLE specification.

2025-08-26 Thread Jason Merrill
On 8/26/25 6:33 AM, Alfie Richards wrote: The 08/22/2025 12:22, Jason Merrill wrote: On 8/19/25 4:48 AM, Alfie Richards wrote: This patch changes the semantics of target_version and target_clones attributes to match the behavior described in the Arm C Language extension. The changes to behavio

Re: [PATCH v2] [x86] Enable unroll in the vectorizer when there's reduction for FMA/DOT_PROD_EXPR/SAD_EXPR

2025-08-26 Thread Hongtao Liu
On Tue, Aug 26, 2025 at 5:31 PM Jan Hubicka wrote: > > > > > > > In general we should have a look at register pressure, I > > > > > > suppose issue_rate / m_num_reductions ensures we're never > > > > > > getting close to this in practice. > > > > > > > > > > Bootstrapped and regtested on x86_64-pc

Re: [PATCH v2] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-26 Thread Claudiu Zissulescu-Ianculescu
Hi Kees, I think the tests are missing. Best wishes, Claudiu On 8/26/25 9:17 AM, Kees Cook wrote: > The __attribute__((__copy__)) functionality was crashing when copying > sanitizer-related attributes because these attributes violated the standard > GCC attribute infrastructure by storing INTEGE

Re: [committed] arm: testsuite: make gcc.target/arm/bics_3.c generate bics again

2025-08-26 Thread Jeff Law
On 8/26/25 6:06 AM, Richard Earnshaw wrote: The compiler is getting too smart! We try, we try :-) But this test is really intended to test that we generate BICS instead of BIC+CMP, so make the test use something that we can't subsequently fold away into a bit minipulation of a store-flag va

Re: [PATCH] RISC-V: Add pattern for reverse floating-point divide

2025-08-26 Thread Jeff Law
On 8/26/25 4:02 AM, Paul-Antoine Arras wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a div RTL instruction. The vec_duplicate is the dividend operand. Before this patch, we have two instructions, e.g.: vfmv.v.f v2,

Re: [PATCH] RISC-V: Add pattern for vector-scalar single-width floating-point multiply

2025-08-26 Thread Jeff Law
On 8/20/25 12:53 PM, Paul-Antoine Arras wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a mult RTL instruction. Before this patch, we have two instructions, e.g.: vfmv.v.f v2,fa0 vfmul.vv v1,v1,v2 After, we

[committed] Fix RISC-V bootstrap

2025-08-26 Thread Jeff Law
Recent changes from Kito have an unused parameter. On the assumption that he's going to likely want it as part of the API, I've simply removed the parameter's name until such time as Kito needs it. This should restore bootstrapping to the RISC-V port. Committing now rather than waiting for t

[committed] arm: testsuite: make gcc.target/arm/bics_3.c generate bics again

2025-08-26 Thread Richard Earnshaw
The compiler is getting too smart! But this test is really intended to test that we generate BICS instead of BIC+CMP, so make the test use something that we can't subsequently fold away into a bit minipulation of a store-flag value. I've also added a couple of extra tests, so we now cover both th

Re: [PATCH v2] match.pd: Fold pattern of round semantics.

2025-08-26 Thread Zhou Zhao
在 2025/8/26 下午6:52, Richard Biener 写道: On Tue, 26 Aug 2025, Zhou Zhao wrote: 在 2025/8/26 下午3:37, Richard Biener 写道: On Thu, 21 Aug 2025, Zhou Zhao wrote: This patch is a respond of the patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673051.html as some suggestion by

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Tobias Burnus
Dear Jakub, dear Sandra, hello world, Jakub Jelinek wrote: Starting with OpenMP 5.2, the spec explicitly says differently for C++: "The function variant is determined by base language standard name lookup rules ([basic.lookup]) of variant-name using the argument types at the call site..." I th

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-26 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 08:24:18PM -0600, Sandra Loosemore wrote: > On 8/25/25 00:13, Jakub Jelinek wrote: > > Yes, GCC doesn't have it implemented fully, but that doesn't mean it should > > be ripped off, the implementation should be simply finished. > > Well, I have no idea how to make this work

[PATCH] tree-optimization/121659 - bogus swap of reduction operands

2025-08-26 Thread Richard Biener
The following addresses a bogus swapping of SLP operands of a reduction operation which gets STMT_VINFO_REDUC_IDX out of sync with the SLP operand order. In fact the most obvious mistake is that we simply swap operands even on the first stmt even when there's no difference in the comparison operat

Re: [PATCH v2] match.pd: Fold pattern of round semantics.

2025-08-26 Thread Richard Biener
On Tue, 26 Aug 2025, Zhou Zhao wrote: > > 在 2025/8/26 下午3:37, Richard Biener 写道: > > On Thu, 21 Aug 2025, Zhou Zhao wrote: > > > >> This patch is a respond of the patch posted at > >> https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673051.html > >> as some suggestion by Richard Biener, I h

Re: [PATCH v9 06/13] c/c++: Add target_[version/clones] to decl diagnostics formatting.

2025-08-26 Thread Alfie Richards
The 08/19/2025 14:06, Jason Merrill wrote: > On 8/19/25 4:49 AM, Alfie Richards wrote: > > 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 > >

Re: [PATCH v9 05/13] fmv: Change target_version semantics to follow ACLE specification.

2025-08-26 Thread Alfie Richards
The 08/22/2025 12:22, Jason Merrill wrote: > On 8/19/25 4:48 AM, Alfie Richards wrote: > > This patch changes the semantics of target_version and target_clones > > attributes > > to match the behavior described in the Arm C Language extension. > > > > The changes to behavior are: > > > > - The s

[PATCH] RISC-V: Add pattern for reverse floating-point divide

2025-08-26 Thread Paul-Antoine Arras
This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into a div RTL instruction. The vec_duplicate is the dividend operand. Before this patch, we have two instructions, e.g.: vfmv.v.f v2,fa0 vfdiv.vv v1,v2,v1 After, we get only on

Re: [PATCH] fortran: implement conditional expression for fortran 2023

2025-08-26 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: I addressed some review comments and included additional feedback. Thanks for the update. I know that the patch is incomplete, but as I started with bootstrapping, I start with the following. I bet the issues are known to you: First, your patch does not bootstrap* h

Re: [PATCH v2] match.pd: Fold pattern of round semantics.

2025-08-26 Thread Zhou Zhao
在 2025/8/26 下午3:37, Richard Biener 写道: On Thu, 21 Aug 2025, Zhou Zhao wrote: This patch is a respond of the patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673051.html as some suggestion by Richard Biener, I have adopted these suggestions and regenerated the patch. In

Re: [PATCH v2] [x86] Enable unroll in the vectorizer when there's reduction for FMA/DOT_PROD_EXPR/SAD_EXPR

2025-08-26 Thread Jan Hubicka
> > > > > In general we should have a look at register pressure, I > > > > > suppose issue_rate / m_num_reductions ensures we're never > > > > > getting close to this in practice. > > > > > > > > Bootstrapped and regtested on x86_64-pc-linu-gnu{-m32,}. > > > > > > This looks reasonable from my side

[PATCH] RISC-V: Allow profiles input in '--with-arch' option.

2025-08-26 Thread Jiawei
This patch allows profiles input in '--with-arch'. With this change, profile names such as `rva22*`, `rvb23*`, or `rvi*` can be passed directly to `--with-arch` without triggering configure errors. This makes it easier to configure and build a toolchain targeting RISC-V profiles, since the input

RE: [PATCH][aarch64] Compute vect_reduc_type off SLP node instead of stmt-info

2025-08-26 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, August 26, 2025 8:59 AM > To: gcc-patches@gcc.gnu.org > Cc: Tamar Christina > Subject: [PATCH][aarch64] Compute vect_reduc_type off SLP node instead of > stmt-info > > The following changes the vect_reduc_type API to work on th

[PATCH] Fix UBSAN issue with load-store data refactoring

2025-08-26 Thread Richard Biener
The following makes sure to read from the lanes_ifn member only when necessary (and thus it was set). Bootstrap and regtest running on x86_64-unknown-linux-gnu. * tree-vect-stmts.cc (vectorizable_store): Access lanes_ifn only when VMAT_LOAD_STORE_LANES. (vectorizable_load)

  1   2   >