Re: [PATCH v2] vect: Add vector lowering for MULT_EXPR for constant pow2 multiplication. [PR122065]

2025-11-02 Thread Richard Biener
On Mon, 3 Nov 2025, Avinash Jayakar wrote: > On Fri, 2025-10-24 at 16:21 +0530, Avinash Jayakar wrote: > > Hi, > > > > I have incorporated the changes suggested in the previous version. > > For now the > > bare bones version of multiply by constant pattern recog is > > implemented in > > tree-ve

Re: [PATCH v2] vect: Add vector lowering for MULT_EXPR for constant pow2 multiplication. [PR122065]

2025-11-02 Thread Avinash Jayakar
On Fri, 2025-10-24 at 16:21 +0530, Avinash Jayakar wrote: > Hi, > > I have incorporated the changes suggested in the previous version. > For now the > bare bones version of multiply by constant pattern recog is > implemented in > tree-vect-generic.cc, which should help fixing the failing test cas

Re: [PATCH] Implement std::__debug::inplace_vector

2025-11-02 Thread François Dumont
On 11/3/25 07:08, François Dumont wrote: On 11/2/25 04:09, Jonathan Wakely wrote: On Sat, 1 Nov 2025, 21:10 François Dumont, wrote: Hi Here is the implementation of the std::__debug::inplace_vector. It looks like this is going to repeat the assertions in e.g. operator[], front

Re: [PATCH] Implement std::__debug::inplace_vector

2025-11-02 Thread François Dumont
On 11/2/25 04:09, Jonathan Wakely wrote: On Sat, 1 Nov 2025, 21:10 François Dumont, wrote: Hi Here is the implementation of the std::__debug::inplace_vector. It looks like this is going to repeat the assertions in e.g. operator[], front, back etc because those already have assert

Re: [PATCH] x86-64: Inline memmove with overlapping unaligned loads and stores

2025-11-02 Thread Hongtao Liu
On Tue, Oct 28, 2025 at 11:21 AM Hongtao Liu wrote: > > On Thu, Oct 23, 2025 at 10:15 AM H.J. Lu wrote: > > > > Inline memmove in 64-bit since there are much less registers available > > in 32-bit: > > > > 1. Load all sources into registers and store them together to avoid > >possible address

Re: [PATCH v4] docs: fmv: Update Function multi-versioning documentation [PR c/122202]

2025-11-02 Thread Sandra Loosemore
On 10/14/25 09:54, [email protected] wrote: diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index a12855de6a6..db9728a3ce7 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -3463,12 +3463,41 @@ Function Attributes}, @ref{PowerPC Function Attributes}, @ref{ARM Function At

Re: [PING^1][PATCH v2] aarch64: Add support for preserve_none function attribute [PR target/118328]

2025-11-02 Thread Sandra Loosemore
On 10/31/25 03:35, Alfie Richards wrote: Hi All, Ping for this patch Thanks, Alfie On 23/10/2025 14:31, Alfie Richards wrote: Hi all, Updated the documentation part of this patch after some feedback. Functional code unchanged. Reg tested on AArch64. Ok for master? Alfie The documentati

Re: [PATCH v2 1/2] doc: Move _Countof under 'Other Extensions to C Syntax'

2025-11-02 Thread Sandra Loosemore
On 11/2/25 14:29, Alejandro Colomar wrote: [CC += Sandra] Gentle ping. :) On Tue, Oct 14, 2025 at 04:26:35PM +, Joseph Myers wrote: On Tue, 14 Oct 2025, Alejandro Colomar wrote: gcc/ChangeLog: * doc/extend.texi: Move _Countof under 'Syntax Extensions'. I'll defer to Sandra on

Re: [to-be-committed][RISC-V][PR tree-optimization/52345] Optimize testing multiple booleans

2025-11-02 Thread Jeff Law
On 11/2/25 1:25 PM, Jeff Law wrote: This is Shreya's work, my contribution was primarily covering the testing.  Bootstrapped and regression tested on x86 and riscv64.  It's also been tested on all the embedded targets in my tester without regression. While this improves code generation to opt

Re:[pushed] [PATCH v1] LoongArch: Add builtin interfaces for 128 and 256 vector conversions.

2025-11-02 Thread Lulu Cheng
Pushed to r16-4945. Thanks! 在 2025/10/29 下午6:49, chenxiaolong 写道: gcc/ChangeLog: * config/loongarch/lasx.md (vec_cast): New template implemention. (vec_insert_lo_): Dito. (vec_insert_hi_): Dito. * config/loongarch/lasxintrin.h (defined): Test for adding

Re:[pushed] [PATCH] LoongArch: Optimize normal immediate data loading.

2025-11-02 Thread Lulu Cheng
Pushed to r16-4944. 在 2025/10/29 下午2:42, Lulu Cheng 写道: Ensure that only one register is used when loading immediate values. The original immediate value load is handled through virtual registers, resulting in the following load operation (0x1234567890abcdef): lu12i.w $r4,-456004

Re: [pushed][PATCH] LoongArch: Fix ICE caused by loongarch_split_reduction [PR122477].

2025-11-02 Thread Lulu Cheng
Replace targetm.vector_mode_supported_p with VECTOR_MODE_P and push to r16-4963. 在 2025/10/29 上午9:38, Lulu Cheng 写道: In r16-4619, the scalar mode is not handled, which causes the compilation of test cases such as pr111414-1.c to fail in ICE. PR target/122477 gcc/ChangeLog: *

[PATCH] Implement hierarchical discriminators for AutoFDO

2025-11-02 Thread Kugan Vivekanandarajah
Hi, I've implemented hierarchical discriminators for AutoFDO This helps AutoFDO profile accuracy by: - Loop iterations are now uniquely identifiable in profile data - Distinguishes which iteration of an unrolled loop executed hotly and so on. The discriminator in AutoFDO is is extended from 16 bi

[pushed] PR modula2/122499: misspelt procedure in import list causes clutter

2025-11-02 Thread Gaius Mulley
A misspelt ident in an import list causes a sequence of clutted errors. This bug fix filters unknowns built during import lists. It also checks for spelling mistakes against the modules exported identifiers. gcc/m2/ChangeLog: PR modula2/122499 * gm2-compiler/M2StackSpell.mod (Pus

Re: [RFC v1 2/2] c: Add _Maxof and _Minof operators

2025-11-02 Thread Alejandro Colomar
Hi Joseph, On Tue, Oct 14, 2025 at 09:29:13PM +, Joseph Myers wrote: > On Tue, 14 Oct 2025, Alejandro Colomar wrote: > > > > feature is "like N3628 but with changes X and Y" it needs to be stated > > > explicitly. > > > > Yep. I'll instead send a new N document removing bool from the > > s

Re: [PATCH v2 1/2] doc: Move _Countof under 'Other Extensions to C Syntax'

2025-11-02 Thread Alejandro Colomar
[CC += Sandra] Gentle ping. :) On Tue, Oct 14, 2025 at 04:26:35PM +, Joseph Myers wrote: > On Tue, 14 Oct 2025, Alejandro Colomar wrote: > > > gcc/ChangeLog: > > > > * doc/extend.texi: Move _Countof under 'Syntax Extensions'. > > I'll defer to Sandra on review of this. > > -- > Jose

[SPARC] Make target-specific tests more robust

2025-11-02 Thread Eric Botcazou
The tests need to accept both branch directions. Tested on SPARC64/Solaris, applied on the mainline. 2025-11-02 Eric Botcazou * gcc.target/sparc/cbcond-1.c: Accept reverse branches. * gcc.target/sparc/cbcond-2.c: Likewise. * gcc.target/sparc/overflow-3.c: Likewise.

[PATCH] xtensa: Revise implementation of hardware FP rounding instructions

2025-11-02 Thread Takayuki 'January June' Suwa
Since each element in an MD iterator can have its own condition that is true by default, it is simpler to specify the precondition for the ROUND.S machine instruction such way. There are no functional changes with this patch. gcc/ChangeLog: * config/xtensa/xtensa.md (int_iterator ANY_RO

[to-be-committed][RISC-V][PR tree-optimization/52345] Optimize testing multiple booleans

2025-11-02 Thread Jeff Law
This is Shreya's work, my contribution was primarily covering the testing. Bootstrapped and regression tested on x86 and riscv64. It's also been tested on all the embedded targets in my tester without regression. While this improves code generation to optimal on riscv-64, I'm electing to ke

[Ada] Fix ACATS cxaj001 test on Solaris

2025-11-02 Thread Eric Botcazou
The problem is that Ada.Locales.Language returns a language code that is not in the expected range because it does not validate the code. Tested on x86-64/Linux and SPARC64/Solaris, applied on the mainline. 2025-11-02 Eric Botcazou * locales.c (is_iso_639_3): New static function.

[committed] i386: Canonicalize (compare (minus (a b)) a) to (compare (a b)) [PR122518]

2025-11-02 Thread Uros Bizjak
SUB (a, b) underflows precisely when a < b. Convert (compare (minus (a b)) a) to (compare (a b)) to match *sub_3 pattern. PR target/122518 gcc/ChangeLog: * config/i386/i386.cc (ix86_canonicalize_comparison): Convert (compare (minus (a b)) a) to (compare (a b)) to match *sub_3 pa

[PATCH RFA] libstdc++: add std:: in tests that include

2025-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- Quite a few tests #include headers but then expect the names to be declared in the global namespace. This is often true for the headers, but doesn't work with module std. libstdc++-v3/ChangeLog * testsuite/20_util/align/1.cc *

[PATCH RFA] libstdc++: adjust std module TBB workaround

2025-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- Messing with macros before possibly importing the stdc++.h header unit is bad form; better to mess with (other) macros afterward. libstdc++-v3/ChangeLog: * src/c++23/std.cc.in: Move TBB macro shenanigans after bits/stdc++.h. ---

[PATCH RFA] libstdc++: remove cassert from stdc++.h

2025-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- isn't suitable for a header unit, because by design it depends on the user NDEBUG macro. So let's not include it in . The exception/safety.h hunk isn't necessitated by this change, it's just to properly include dependencies, but seemed themati

[PATCH RFA] libstdc++: add attributes to more ios_base types

2025-11-02 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, OK for trunk? -- 8< -- In r15-3499 I added attributes to _Ios_Openmode to avoid -Wswitch false positives; let's do the same for the other enums in ios_base. It also seems to me that with these attributes, the tests don't need to include the end/max/min cases. libstdc

[PATCH v4 1/4] gcc/: Rename warn_parm_array_mismatch() => warn_parms_array_mismatch()

2025-11-02 Thread Alejandro Colomar
This function acts on entire parameter declaration lists, and iterates over them. Use plural in the name, to clarify that it acts on parameters, not just on a single parameter. gcc/c-family/ChangeLog: * c-common.h (warn_parm_array_mismatch): Rename warn_parm_array_mismatch => war

[PATCH v4 4/4] gcc/: Factor out helper function

2025-11-02 Thread Alejandro Colomar
No functional change intended. gcc/c-family/ChangeLog: * c-warn.cc (warn_parms_array_mismatch): Split out body of per-pair in parameter lists iteration into... (warn_parm_array_mismatch): ...this new function. Signed-off-by: Alejandro Colomar --- gcc/c-family/c-warn.cc

[PATCH v4 2/4] Fix typos in comment

2025-11-02 Thread Alejandro Colomar
gcc/c-family/ChangeLog: * c-warn.cc (warn_parms_array_mismatch): Fix typos in comment. Signed-off-by: Alejandro Colomar --- gcc/c-family/c-warn.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/c-family/c-warn.cc b/gcc/c-family/c-warn.cc index a771444184fc..

[PATCH v4 3/4] gcc/: Reduce scope of local variable (refactor)

2025-11-02 Thread Alejandro Colomar
No functional change intended. gcc/c-family/ChangeLog: * c-warn.cc (warn_parms_array_mismatch): Reduce scope of local variable. Signed-off-by: Alejandro Colomar --- gcc/c-family/c-warn.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/c-family/c

[PATCH v4 0/4] Refactor warn_parm_array_mismatch()

2025-11-02 Thread Alejandro Colomar
Hi! I've added the comment above the new function. I've also removed an old sentence from a commit message. See the range-diff below. Hopefully this can get merged before the freeze. The comment doesn't document two of the function parameters, but I don't know what they really are, so please a

[Ada] Fix crash for instantiation on tagged private type with unknown discriminants

2025-11-02 Thread Eric Botcazou
This is an old issue with the extension of a tagged private type declared with unknown discriminants in the public part of a generic child unit, although the generic context is not a key factor (i.e. this also happens for a nongeneric child unit). The public part of a child unit does not have v

[RISC-V] Expose sign extension for 32 bit rotates by constant values on rv64

2025-11-02 Thread Jeff Law
Trivial improvement for 32 bit rotates on rv64 that I noticed while looking at a PR121778. We were failing to use the _extended variant when the rotation count was a constant on rv64 after cobbling together a prototype match.pd pattern. I suspect the guard was added by Jivan to avoid having t

[PATCH] libstdc++: shared_mutex: Respond consistently to errors and deadlock

2025-11-02 Thread Mike Crowe
Make the shared_mutex::try_lock(), shared_timed_mutex::try_lock_until() and shared_timed_mutex::try_lock_shared_until() all handle errors from pthread functions consistently by returning false to indicate that the lock could not be taken. If _GLIBCXX_ASSERTIONS is defined then unexpected errors, su

Re: [Ada] Fix use type clause partially invalidated by use clause in nested package

2025-11-02 Thread Eric Botcazou
> The fix simply aligns this implementation with the one exercised by > PR ada/64869, which is more robust. Except that I overlooked a subtle issue with renamings... Tested on x86-64/Linux, applied on the mainline. 2025-11-02 Eric Botcazou PR ada/52319 * sem_ch8.adb (End_Use

[patch,avr,applied] PR122527: Fix __flash1 loads ≥ 3 bytes on avr31

2025-11-02 Thread Georg-Johann Lay
This fixes a wrong code bug on avr31 (ELPM but no ELPMx) for loading values >= 3 bytes from __flash1. Some condition lead to __load_3/4 which loads from __flash and hence is wrong. This occurs for two old devices from avr31. Applied as obvious. Johann -- AVR: target/122527 -- Don't use __

[patch,avr,applied] Run avr/torture/pr84211-fuse-move-1.c with -fno-lto

2025-11-02 Thread Georg-Johann Lay
The test case uses a global asm which doesn't work with LTO. As -fno-toplevel-reorder didn't help I added -fno-lto. Johann -- AVR: Don't run avr/torture/pr84211-fuse-move-1.c with -flto. This test case failed since LTO failed on a global asm. gcc/testsuite/ * gcc.targ

Re: [PATCH] c++/modules: Track all static class variables [PR122421]

2025-11-02 Thread Jason Merrill
On 11/2/25 4:13 AM, Nathaniel Shead wrote: On Sat, Nov 01, 2025 at 09:13:06PM +0300, Jason Merrill wrote: On 11/1/25 3:37 AM, Nathaniel Shead wrote: On Thu, Oct 30, 2025 at 07:20:22PM +0200, Jason Merrill wrote: On 10/28/25 12:06 AM, Nathaniel Shead wrote: On Mon, Oct 27, 2025 at 05:04:18PM +

Re: [PATCH] Introduce x86_64-linux-gnum32

2025-11-02 Thread Olivier Hainque
Alex wrote: > Here's an incremental change, also by Olivier Hainque, that enables > biarch -m32-defaulting x86_64-linux-gnum32. > ... > +#define TARGET_BI_ARCH 3 > ... I was actually not so happy with the introduction of another hardcoded value for TARGET_BI_ARCH and the accompanying assumptions

[PATCH v3] Fortran: Fix recursive allocatable deep copy [PR 121628]

2025-11-02 Thread Christopher Albert
Rebased again on trunk with small corrections, correct text format directly pasted in the e-mail and without attachments (sorry for the mess before, I'm new to to the GCC patch workflow). Tested on x86_64 by Stefan Kargl on FreeBSD and by myself on Linux. See https://gcc.gnu.org/bugzilla/show_b

[PATCH v3] Fortran: Fix recursive allocatable deep copy [PR 121628]

2025-11-02 Thread Christopher Albert
Rebased again on trunk with small corrections, correct text format directly pasted in the e-mail and without attachments (sorry for the mess before, I'm new to to the GCC patch workflow). Tested on x86_64 by Stefan Kargl on FreeBSD and by myself on Linux. See https://gcc.gnu.org/bugzilla/show_b

Re: [PATCH] vrp: Infer ranges from loads from constant aggregates with initializers

2025-11-02 Thread Richard Biener
On Fri, Oct 31, 2025 at 10:47 PM Martin Jambor wrote: > > Hi, > > this patch adds the ability to infer ranges from loads from global > constant static aggregates which have static initializers. Even when > the load has an ARRAY_REF with an unknown index and thus we do not know > the particular co

Re: [patch,avr] Fix PR122505 bloated mulpsi3 in the wake of hacking around PR118012

2025-11-02 Thread Denis Chertykov
сб, 1 нояб. 2025 г. в 17:45, Georg-Johann Lay : > > Since the PR118012 work-around patch, there is an SImode insn also for > the non-MUL case, but there is no mulpsi3. This makes the middle-end > use the mulsi3 insn for 24-bit multipications like in: > > __uint24 mul24 (__uint24 a, __uint24 b) > {

[PATCH] libstdc++: Implement P3223R2 Making std::istream::ignore less surprising

2025-11-02 Thread Yuao Ma
Hi all, This patch implements paper P3223R2, which adds a new overload to std::istream::ignore for char_type. Since this function dates back to C++98, I've used type_traits from the ext rather than the std header to maintain compatibility. Please take a look when you have time. Thanks, Yuao From