Re: [PATCH] libstdc++: Implement C++23 P2590R2 - Explicit lifetime management

2025-08-28 Thread Tomasz Kaminski
Hi, >From recent discussions, my understand was that this function can be implemented purely in library as: return launder(static_cast(memmove(p, p, sizeof(T; The memove performs implicit object creation ( https://eel.is/c++draft/c.strings#cstring.syn-3), so it does create (amongst other) obj

Re: [PATCH] libstdc++: Implement C++23 P2590R2 - Explicit lifetime management

2025-08-28 Thread Richard Biener
On Thu, 28 Aug 2025, Jakub Jelinek wrote: > Hi! > > As I can't think of how the middle-end would treat > __builtin_start_lifetime_as other than a blackbox and probably would > need to be implemented as such inline asm in RTL, this patch > just implements it using inline asm in the library. > If n

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Richard Biener
On Thu, 28 Aug 2025, Iain Sandoe wrote: > > > > On 28 Aug 2025, at 16:38, Jakub Jelinek wrote: > > > > On Thu, Aug 28, 2025 at 04:50:15PM +0200, Jakub Jelinek wrote: > >> On Thu, Aug 28, 2025 at 04:24:46PM +0200, Richard Biener wrote: > >>> That said, if we ever want to improve on this (and so

Re: [PATCH] x86: Allow by_pieces op when expanding memcpy/memset epilogue

2025-08-28 Thread Uros Bizjak
On Fri, Aug 29, 2025 at 2:55 AM H.J. Lu wrote: > > Since > > commit 401199377c50045ede560daf3f6e8b51749c2a87 > Author: H.J. Lu > Date: Tue Jun 17 10:17:17 2025 +0800 > > x86: Improve vector_loop/unrolled_loop for memset/memcpy > > uses move_by_pieces and store_by_pieces to expand memcpy/mem

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

2025-08-28 Thread Jiang, Haochen
> From: Jiang, Haochen > Sent: Friday, August 29, 2025 1:48 PM > > > From: Andi Kleen > > Sent: Friday, August 29, 2025 1:22 PM > > > > This patch should fix it. Please confirm. > > > > > > diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > > b/gcc/testsuite/gcc.target/i386/shift-

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

2025-08-28 Thread Jiang, Haochen
> From: Andi Kleen > Sent: Friday, August 29, 2025 1:22 PM > > This patch should fix it. Please confirm. > > > diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c > index e5be3a35538..cb576eb4498 100644 > --- a/gcc/testsuite/g

RE: [PATCH] ira: Remove the issue code in improve_allocation. [PR117838]

2025-08-28 Thread Cui, Lili
Gentle ping for this patch. Thanks, Lili. > -Original Message- > From: yes > Sent: Friday, August 22, 2025 10:56 AM > To: gcc-patches@gcc.gnu.org > Cc: vmaka...@redhat.com; rdsandif...@googlemail.com; Cui, Lili > > Subject: [PATCH] ira: Remove the issue code in improve_allocation. > [P

[PATCH v2] i386: Fix vect-pragma-target-[12].c testcase for -march=XYZ [PR120643]

2025-08-28 Thread Andrew Pinski
These 2 testcases were originally designed for the default -march= of x86_64 so if you pass -march=native (on a target with AVX512 enabled), they will fail. It fix this, we add `-mno-sse3 -mtune=generic` to the options to force a specific arch to the testcase. Changes since v1: * v2: Use -mtune=ge

Re: [PATCH] i386: Fix vect-pragma-target-[12].c testcase for -march=XYZ [PR120643]

2025-08-28 Thread Andrew Pinski
On Thu, Jul 3, 2025 at 11:48 PM Richard Biener wrote: > > On Thu, Jul 3, 2025 at 9:34 PM Andrew Pinski wrote: > > > > These 2 testcases were originally designed for the default -march= of > > x86_64 so if you pass -march=native (on a target with AVX512 enabled), > > they will fail. It fix this, w

[PUSHED] aarch64/testsuite: Fix vld2-1.c after r16-3201 [PR121713]

2025-08-28 Thread Andrew Pinski
After r16-3201-gee67004474d521, this testcase started to fail as we can copy prop into arguments now so the number of "after previous" check has doubled. Pushed after a quick check to make sure the testcase is now passing. gcc/testsuite/ChangeLog: * gcc.target/aarch64/vld2-1.c: Update th

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

2025-08-28 Thread Andi Kleen
This patch should fix it. Please confirm. diff --git a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c b/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c index e5be3a35538..cb576eb4498 100644 --- a/gcc/testsuite/gcc.target/i386/shift-gf2p8affine-1.c +++ b/gcc/testsuite/gcc.target/i386/s

Re: [PATCH] forwprop: Copy the memcmp optimization from strlen to forwprop [PR116651]

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 9:43 PM Andrew Pinski wrote: > > On Thu, Aug 28, 2025 at 9:32 PM Andrew Pinski > wrote: > > > > To better optimize code dealing with `memcmp == 0` where we have > > a small constant size, we can inline the memcmp in those cases. > > There is code to do this in strlen but t

Re: [PATCH] forwprop: Copy the memcmp optimization from strlen to forwprop [PR116651]

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 9:32 PM Andrew Pinski wrote: > > To better optimize code dealing with `memcmp == 0` where we have > a small constant size, we can inline the memcmp in those cases. > There is code to do this in strlen but that is run too late in > the case where we can figure out the value

[PATCH] forwprop: Copy the memcmp optimization from strlen to forwprop [PR116651]

2025-08-28 Thread Andrew Pinski
To better optimize code dealing with `memcmp == 0` where we have a small constant size, we can inline the memcmp in those cases. There is code to do this in strlen but that is run too late in the case where we can figure out the value of one of the arguments to memcmp. So this copies the optimizati

RE: [PATCH] x86: Handle constant in any modes in setmem_epilogue_gen_val

2025-08-28 Thread Liu, Hongtao
> -Original Message- > From: H.J. Lu > Sent: Friday, August 29, 2025 11:31 AM > To: gcc-patches@gcc.gnu.org > Cc: ubiz...@gmail.com; Liu, Hongtao > Subject: [PATCH] x86: Handle constant in any modes in > setmem_epilogue_gen_val > > Since the constant passed to setmem_epilogue_gen_val

PING: [PATCH] c: Update DECL_TLS_MODEL after processing a TLS variable

2025-08-28 Thread H.J. Lu
On Fri, Aug 1, 2025 at 4:55 AM H.J. Lu wrote: > > Set a tentative TLS model in grokdeclarator and update DECL_TLS_MODEL > with the default TLS access model after a TLS variable has been fully > processed if the default TLS access model is stronger. > > gcc/c/ > > PR c/107419 > * c-

[PATCH v2] xtensa: Rewrite bswapsi2_internal with compact syntax

2025-08-28 Thread Takayuki 'January June' Suwa
Also, the omission of the instruction that sets the shift amount register (SAR) to 8 is now more efficient: it is omitted if there was a previous bswapsi2 in the same BB, but not omitted if no bswapsi2 is found or another insn that modifies SAR is found first (see below). Note that the five instr

[PATCH] x86: Handle constant in any modes in setmem_epilogue_gen_val

2025-08-28 Thread H.J. Lu
Since the constant passed to setmem_epilogue_gen_val may not be in word_mode, update setmem_epilogue_gen_val to handle any integer modes. gcc/ PR target/121108 * config/i386/i386-expand.cc (setmem_epilogue_gen_val): Don't assert op_mode == word_mode and handle any integer

Re: [PATCH] Pass reduction var to vectorize_fold_left_reduction directly

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 12:17 AM Richard Biener wrote: > > On Wed, 27 Aug 2025, Tamar Christina wrote: > > > > -Original Message- > > > From: Richard Biener > > > Sent: Wednesday, August 27, 2025 2:56 PM > > > To: gcc-patches@gcc.gnu.org > > > Cc: RISC-V CI ; Tamar Christina > > > > > >

Re: [patch] install.texi: For amdgcn, clarify which llvm-* binaries are required

2025-08-28 Thread Sandra Loosemore
On 8/28/25 06:17, Tobias Burnus wrote: This kind of came up because now objdump is required during the GCC build (for ./configure) to set the required HAVE_..., solving PR119367. While LLVM's assembler and linker are required to handle AMD GPUs, all others just need to be found and can be the LL

RE: [PATCH v1] RISC-V: Add test case for unsigned scalar SAT_MUL form 4

2025-08-28 Thread Li, Pan2
Will commit it directly as test only if no comments in next 24H. Pan -Original Message- From: Li, Pan2 Sent: Sunday, August 24, 2025 8:30 PM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.com; Chen, Ken ; Liu, Hongtao

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

2025-08-28 Thread Jiang, Haochen
> From: Andi Kleen > Sent: Friday, August 29, 2025 5:13 AM > > > > > > with GCC configured with > > > > > > ../../gcc/configure --prefix=/export/users3/haochenj/src/gcc- > bisect/master/master/r16-3364/usr --enable-clocale=gnu --with-system-zlib - > -with-demangler-in-ld --with-fpmath=sse --enable

Re: [PATCH v2] x86-64: Improve source operand check for TLS_CALL

2025-08-28 Thread Hongtao Liu
On Thu, Aug 28, 2025 at 10:15 AM H.J. Lu wrote: > > Source operands of 2 TLS_CALL 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)) "x.c":7:16 1674 {*t

[PATCH] Document -param=ix86-vect-unroll-limit.

2025-08-28 Thread liuhongt
Pushed as obvious. gcc/ChangeLog: * doc/invoke.texi: Document -param=ix86-vect-unroll-limit. --- gcc/doc/invoke.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 56c4fa86e34..4e063e43c85 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/

[PATCH] x86: Allow by_pieces op when expanding memcpy/memset epilogue

2025-08-28 Thread H.J. Lu
Since commit 401199377c50045ede560daf3f6e8b51749c2a87 Author: H.J. Lu Date: Tue Jun 17 10:17:17 2025 +0800 x86: Improve vector_loop/unrolled_loop for memset/memcpy uses move_by_pieces and store_by_pieces to expand memcpy/memset epilogue with vector_loop even when targetm.use_by_pieces_inf

Re: [PATCH] Fortran: improve compile-time checking of character dummy arguments [PR93330]

2025-08-28 Thread Jerry D
On 8/28/25 1:51 PM, Harald Anlauf wrote: Dear all, the attached patch tries to improve diagnostics at compile time for character arguments in various ways: - we did unconditionally give a warning for too short character   actual arguments passed to a scalar dummy; we now give an error   when

[PATCHv2] libstdc++: Make syncbuf _S_get_mutex definition extern

2025-08-28 Thread Nathan Myers
Changes in v2: * Make a global function __syncbuf_get_mutex, not an extern template instantiation. This patch creates a global function __syncbuf_get_mutex, gated by _GLIBCXX_HAS_GTHREADS, replacing a static instantiated member _S_get_mutex used in syncbuf<> construction, and makes the global sy

Re: [PATCH 09/14] lto: Add toplevel assembly heuristics

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 2:26 PM Andi Kleen wrote: > > Jakub Jelinek writes: > > > On Wed, Aug 27, 2025 at 03:52:11PM +0200, Michal Jires wrote: > >> This new pass heuristically detects symbols referenced by toplevel > >> assembly to prevent their optimization. > >> > >> Heuristics is done by comp

Re: [PATCH 09/14] lto: Add toplevel assembly heuristics

2025-08-28 Thread Andi Kleen
Jakub Jelinek writes: > On Wed, Aug 27, 2025 at 03:52:11PM +0200, Michal Jires wrote: >> This new pass heuristically detects symbols referenced by toplevel >> assembly to prevent their optimization. >> >> Heuristics is done by comparing identifiers in assembly to known >> symbols. >> >> The pas

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

2025-08-28 Thread Andi Kleen
> > > > with GCC configured with > > > > ../../gcc/configure > > --prefix=/export/users3/haochenj/src/gcc-bisect/master/master/r16-3364/usr > > --enable-clocale=gnu --with-system-zlib --with-demangler-in-ld > > --with-fpmath=sse --enable-languages=c,c++,fortran --enable-cet > > --without-isl

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

2025-08-28 Thread Andi Kleen
On Wed, Aug 27, 2025 at 02:11:44AM +, Jiang, Haochen wrote: > 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 vectoriz

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

2025-08-28 Thread H.J. Lu
On Thu, Aug 28, 2025 at 2:06 PM Andi Kleen wrote: > > On Wed, Aug 27, 2025 at 02:11:44AM +, Jiang, Haochen wrote: > > On Linux/x86_64, > > > > 001cd39749f94ece8276b63f91eb864babb81a5d is the first bad commit > > commit 001cd39749f94ece8276b63f91eb864babb81a5d > > Author: Andi Kleen > > Date:

[PATCH] Fortran: improve compile-time checking of character dummy arguments [PR93330]

2025-08-28 Thread Harald Anlauf
Dear all, the attached patch tries to improve diagnostics at compile time for character arguments in various ways: - we did unconditionally give a warning for too short character actual arguments passed to a scalar dummy; we now give an error when -std=f* is specified. The warning is retain

Re: [PATCH] c++, libstdc++, v3: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Tomasz Kaminski
On Thu, Aug 28, 2025 at 8:38 PM Jakub Jelinek wrote: > On Thu, Aug 28, 2025 at 08:11:04PM +0200, Tomasz Kaminski wrote: > > Similar test, for Q being a base class, this is also aggregate in C++20. > > And if you could reorganize the library test so satic_assert follows the > > type definition, >

Re: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate

2025-08-28 Thread Sam James
Joseph Myers writes: > On Thu, 28 Aug 2025, Sam James wrote: > >> Joseph Myers writes: >> >> > On Thu, 28 Aug 2025, Richard Biener wrote: >> > >> >> I wonder if we can piggy-back on the existing --with-glibc-version=... >> >> somehow? >> > >> > Indeed, that's the correct way to handle such fea

Re: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate

2025-08-28 Thread Joseph Myers
On Thu, 28 Aug 2025, Sam James wrote: > Joseph Myers writes: > > > On Thu, 28 Aug 2025, Richard Biener wrote: > > > >> I wonder if we can piggy-back on the existing --with-glibc-version=... > >> somehow? > > > > Indeed, that's the correct way to handle such features so that cross > > compilers

Re: [PATCH] fixincludes: Replace fgrep in genfixes script

2025-08-28 Thread Sam James
Rainer Orth writes: > Hi Jonathan, > >> On Thu, 28 Aug 2025 at 18:40, Rainer Orth wrote: >>> >>> Hi Jonathan, >>> >>> > POSIX says fgrep is obsolescent and grep -F should be used instead. >>> >>> grep -F isn't portable, unfortunately At least it's not supported by >>> Solaris /bin/grep). It may

Re: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate

2025-08-28 Thread Sam James
Joseph Myers writes: > On Thu, 28 Aug 2025, Richard Biener wrote: > >> I wonder if we can piggy-back on the existing --with-glibc-version=... >> somehow? > > Indeed, that's the correct way to handle such features so that cross > compilers default to the same correct configuration as native. Do

Re: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate

2025-08-28 Thread Joseph Myers
On Thu, 28 Aug 2025, Richard Biener wrote: > I wonder if we can piggy-back on the existing --with-glibc-version=... > somehow? Indeed, that's the correct way to handle such features so that cross compilers default to the same correct configuration as native. The configure tests in this patch u

[PATCH] c++, libstdc++, v3: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Jakub Jelinek
On Thu, Aug 28, 2025 at 08:11:04PM +0200, Tomasz Kaminski wrote: > Similar test, for Q being a base class, this is also aggregate in C++20. > And if you could reorganize the library test so satic_assert follows the > type definition, > that would be great. Done. 2025-08-28 Jakub Jelinek gcc/c

[PATCH] libstdc++: Implement C++23 P2590R2 - Explicit lifetime management

2025-08-28 Thread Jakub Jelinek
Hi! As I can't think of how the middle-end would treat __builtin_start_lifetime_as other than a blackbox and probably would need to be implemented as such inline asm in RTL, this patch just implements it using inline asm in the library. If not anything else, it can serve as fallback before we and/

Re: [PATCH] c++, libstdc++, v2: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Tomasz Kaminski
On Thu, Aug 28, 2025 at 6:40 PM Jakub Jelinek wrote: > On Thu, Aug 28, 2025 at 06:06:28PM +0200, Tomasz Kaminski wrote: > > For example, this type should be implicit lifetime (std:::string > obviously > > isn't): > > struct S1 { std::string a; std::string b; }; > > And also this one: > > struct S

[PATCH] vect: Set prolog bound to 0 for VLA alignment [PR121523].

2025-08-28 Thread Robin Dapp
Hi, since peeling and version for alignment for VLA modes was introduced (r16-3065-geee51f9a4b6) we have been seeing a lot of test suite failures like internal compiler error: in apply_scale, at profile-count.h:1187 This is because vect_gen_prolog_loop_niters sets the prolog bound to -1 in cas

Re: [PATCH] fixincludes: Replace fgrep in genfixes script

2025-08-28 Thread Rainer Orth
Hi Jonathan, > On Thu, 28 Aug 2025 at 18:40, Rainer Orth wrote: >> >> Hi Jonathan, >> >> > POSIX says fgrep is obsolescent and grep -F should be used instead. >> >> grep -F isn't portable, unfortunately At least it's not supported by >> Solaris /bin/grep). It may be necessary to use AC_PROG_FGREP

Re: [PATCH 09/14] lto: Add toplevel assembly heuristics

2025-08-28 Thread Jakub Jelinek
On Wed, Aug 27, 2025 at 03:52:11PM +0200, Michal Jires wrote: > This new pass heuristically detects symbols referenced by toplevel > assembly to prevent their optimization. > > Heuristics is done by comparing identifiers in assembly to known > symbols. > > The pass is split into 2 passes, in LGEN

Re: [PATCH] fixincludes: Replace fgrep in genfixes script

2025-08-28 Thread Jonathan Wakely
On Thu, 28 Aug 2025 at 18:40, Rainer Orth wrote: > > Hi Jonathan, > > > POSIX says fgrep is obsolescent and grep -F should be used instead. > > grep -F isn't portable, unfortunately At least it's not supported by > Solaris /bin/grep). It may be necessary to use AC_PROG_FGREP and > substitute the r

Re: [PATCH] libstdc++: Make syncbuf _S_get_mutex instantiation extern.

2025-08-28 Thread Jonathan Wakely
On Thu, 28 Aug 2025 at 18:35, Nathan Myers wrote: > > [Note: do we need entries in config/abi/pre/gnu.ver for these?] Aren't there test failures without them? > This declares and defines explicit instantiations of std::syncbuf:: > __mutex::_S_get_mutex for T=char and T=wchar_t, where the function

Re: [PATCH 00/14] lto: Linux LTO toplevel assembly

2025-08-28 Thread Andi Kleen
Michal Jires writes: > These patches allow us to handle toplevel assembly referencing symbols. > Previous linux kernel patches needed to mark any such referenced symbols > manually. Currently needed linux patches are here: > https://gitlab.com/mixal_iirec/linux_gcc_lto_patches > > Thanks for all

Re: [PATCH] fixincludes: Replace fgrep in genfixes script

2025-08-28 Thread Rainer Orth
Hi Jonathan, > POSIX says fgrep is obsolescent and grep -F should be used instead. grep -F isn't portable, unfortunately At least it's not supported by Solaris /bin/grep). It may be necessary to use AC_PROG_FGREP and substitute the result into the script. Rainer -- ---

[PATCH] libstdc++: Make syncbuf _S_get_mutex instantiation extern.

2025-08-28 Thread Nathan Myers
[Note: do we need entries in config/abi/pre/gnu.ver for these?] This declares and defines explicit instantiations of std::syncbuf:: __mutex::_S_get_mutex for T=char and T=wchar_t, where the function is defined at all, the wchar_t case gated on _GLIBCXX_USE_WCHAR_T. libstdc++-v3/ChangeLog:

[committed v2] fixincludes: Skip pthread_incomplete_struct_argument for modern glibc [PR118009]

2025-08-28 Thread Jonathan Wakely
The pthread_incomplete_struct_argument fix was intended for ancient versions of Glibc (only 2.3.3 and 2.3.4, I believe). From Glibc 2.3.5 the pthread.h header already included the change to use a pointer instead of an array, so the fixinclude was no longer used. However, the https://sourceware.org

[committed v5] libstdc++: Implement C++26 features [PR119670]

2025-08-28 Thread Jonathan Wakely
This implements P2546R5 (Debugging Support), including the P2810R4 (is_debugger_present is_replaceable) changes, allowing std::is_debugger_present to be replaced by the program. It would be good to provide a macOS definition of is_debugger_present as per https://developer.apple.com/library/archive

[PATCH] ctf: fix integer truncations in very large structs [PR121411]

2025-08-28 Thread David Faust
[was: ctf: use HOST_WIDE_INT for type bit sizes https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693262.html Changed from previous: - Fix similar truncation in member offset translation - Restrict test to 64-bit targets ] DWARF to CTF translation for type bit sizes was using uint32_t, a

[PATCH] fixincludes: Replace fgrep in genfixes script

2025-08-28 Thread Jonathan Wakely
POSIX says fgrep is obsolescent and grep -F should be used instead. fixincludes/ChangeLog: * genfixes: Use grep -F instead of fgrep. --- OK for trunk? fixincludes/genfixes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixincludes/genfixes b/fixincludes/genfixes in

Re: [PATCHv2] Error out stack-protector unavailability on AIX

2025-08-28 Thread David Edelsohn
On Thu, Aug 28, 2025 at 9:18 AM Ayappan wrote: > Hi Team, > Kindly review the below patch and let me know if any changes are > required., > > On Thu, Aug 14, 2025 at 3:14 PM Ayappan Perumal > wrote: > >> From: Ayappan Perumal >> >> --- >> stack-protector is not supported in GCC on AIX. This pat

[PATCH] c++, libstdc++, v2: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Jakub Jelinek
On Thu, Aug 28, 2025 at 06:06:28PM +0200, Tomasz Kaminski wrote: > For example, this type should be implicit lifetime (std:::string obviously > isn't): > struct S1 { std::string a; std::string b; }; > And also this one: > struct S2 { std::string a; std::string b; ~S2() = default; }; > But not this:

[PATCH v2] c++: Fix miscompilation on array subscription with COND_EXPR as the array

2025-08-28 Thread Sirui Mu
Hello, This is the 2nd version of the patch. Changes made since the initial version: - Implemented Jason's suggestions, move the declaration of first down. - Add signed-off-by to the commit. Tested on x86_64-linux. Signed-off-by: Sirui Mu --- gcc/cp/typeck.cc |

Re: [PATCH] forwprop: Improve the reject case for copy prop [PR107051]

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 4:25 AM Richard Biener wrote: > > On Wed, Aug 27, 2025 at 6:12 PM Andrew Pinski > wrote: > > > > Currently the code rejects: > > ``` > > tmp = *a; > > *b = tmp; > > ``` > > (unless *a == *b). This can be improved such that if a and b are known to > > share the same base, t

Re: [PATCH] forwprop: Improve the reject case for copy prop [PR107051]

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 9:18 AM Andrew Pinski wrote: > > On Thu, Aug 28, 2025 at 4:25 AM Richard Biener > wrote: > > > > On Wed, Aug 27, 2025 at 6:12 PM Andrew Pinski > > wrote: > > > > > > Currently the code rejects: > > > ``` > > > tmp = *a; > > > *b = tmp; > > > ``` > > > (unless *a == *b). T

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Iain Sandoe
> On 28 Aug 2025, at 16:38, Jakub Jelinek wrote: > > On Thu, Aug 28, 2025 at 04:50:15PM +0200, Jakub Jelinek wrote: >> On Thu, Aug 28, 2025 at 04:24:46PM +0200, Richard Biener wrote: >>> That said, if we ever want to improve on this (and solve the redundant >>> store elimination issue), we nee

Re: [PATCH] c++, libstdc++: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Tomasz Kaminski
On Thu, Aug 28, 2025 at 5:54 PM Jakub Jelinek wrote: > Hi! > > The following patch attempts to implement the C++23 P2674R1 > paper. As mentioned in the paper, since CWG2605 the trait > isn't really implementable purely on the library side. > > Because it is implemented completely on the compiler

Re: [PATCH] c++, libstdc++: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Tomasz Kaminski
On Thu, Aug 28, 2025 at 5:54 PM Jakub Jelinek wrote: > Hi! > > The following patch attempts to implement the C++23 P2674R1 > paper. As mentioned in the paper, since CWG2605 the trait > isn't really implementable purely on the library side. > > Because it is implemented completely on the compiler

[PATCH] c++, libstdc++: Implement C++23 P2674R1 - A trait for implicit lifetime types

2025-08-28 Thread Jakub Jelinek
Hi! The following patch attempts to implement the C++23 P2674R1 paper. As mentioned in the paper, since CWG2605 the trait isn't really implementable purely on the library side. Because it is implemented completely on the compiler side, it just uses SCALAR_TYPE_P and so can e.g. accept __int128 e

[pushed] c++: > in lambda in template arg [PR107953]

2025-08-28 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- As with PR116928, we need to set greater_than_is_operator_p within the lambda delimiters. PR c++/107953 gcc/cp/ChangeLog: * parser.cc (cp_parser_lambda_expression): Set greater_than_is_operator_p. gcc/testsuite/Ch

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Jakub Jelinek
On Thu, Aug 28, 2025 at 04:50:15PM +0200, Jakub Jelinek wrote: > On Thu, Aug 28, 2025 at 04:24:46PM +0200, Richard Biener wrote: > > That said, if we ever want to improve on this (and solve the redundant > > store elimination issue), we need an actual GIMPLE/RTL statement > > doing what std::start_

[pushed] MAINTAINERS: add myself to write after approval

2025-08-28 Thread Yuao Ma
Hi, I've added myself to the MAINTAINERS file. I also ran contrib/check-MAINTAINERS.py to confirm everything looks good. Thanks, Yuao 0001-MAINTAINERS-add-myself-to-write-after-approval.patch Description: Binary data

Re: [PATCH] passes: Move cleanup_eh before first tailr [PR115201]

2025-08-28 Thread Andrew Pinski
On Thu, Aug 28, 2025 at 1:32 AM Richard Biener wrote: > > On Fri, Aug 22, 2025 at 4:04 PM Andrew Pinski > wrote: > > > > So the current pass order is: > > ``` > > NEXT_PASS (pass_tail_recursion); > > NEXT_PASS (pass_if_to_switch); > > NEXT_PASS (pass_convert_switch);

Re: [PATCH] RISC-V: Add pattern for vector-scalar floating-point min

2025-08-28 Thread Paul-Antoine Arras
On 28/08/2025 14:19, Robin Dapp wrote: LGTM.  Are the IEEE-min/max variants in your plans as well? I haven't checked if we propagate into those at all (unspec), though. Yes, the IEEE variants are coming up next. Thanks, -- PA

Re: [PATCH] RISC-V: Add pattern for vector-scalar floating-point min

2025-08-28 Thread Paul-Antoine Arras
On 28/08/2025 17:23, Kito Cheng wrote: +  [(set_attr "type" "vfmuladd")] this seems incorrect, otherwise LGTM Good catch! It should be "vfminmax" -- copy-paste mistake. Thanks, -- PA

Re: [PATCH] c++: Fix miscompilation on array subscription with COND_EXPR as the array

2025-08-28 Thread Jason Merrill
On 8/28/25 9:48 AM, Sirui Mu wrote: Hello, The following minimum reproducer would miscompile with vanilla gcc: extern int x[10], y[10]; bool g(); void f() { 0[g() ? x : y] = 1; } gcc would mistakenly treat the subexpression (g() ? x : y) as a prvalue and move that array to stack. The

Re: [PATCH] RISC-V: Add pattern for vector-scalar floating-point min

2025-08-28 Thread Kito Cheng
Paul-Antoine Arras 於 2025年8月28日 週四,01:50寫道: > This pattern enables the combine pass (or late-combine, depending on the > case) > to merge a vec_duplicate into an smin RTL instruction. > > Before this patch, we have two instructions, e.g.: > vfmv.v.f v2,fa0 > vfmin.vv v1,v1,v2 > > A

[RFC] c++: Vectorizing default struct and std::array equality

2025-08-28 Thread Thomas de Bock
>From 289487b58709575a90fca0cbebc6ae968aba73ab Mon Sep 17 00:00:00 2001 From: Thomas de Bock Date: Thu, 28 Aug 2025 16:10:08 +0100 Subject: [PATCH] Vectorizing default struct and std::array equality --- Notes: Added 2 SSA passes enabling the vectorization of default equality on structs and

[PATCH] vect: gather/scatter scale fallback.

2025-08-28 Thread Robin Dapp
Hi, currently for RVV gathers/scatters we accept any scale and extension in the optabs and "just" extend the offset before scaling it properly. This causes two major problems: - These operations are hidden from the vectorizer and thus not costed appropriately. - When the vectorizer chooses a f

Re: [RFC PATCH 3/7] kcfi: Add core Kernel Control Flow Integrity infrastructure

2025-08-28 Thread Qing Zhao
Hi, Kees, I have several suggestions and questions first for this patch: 1. Is -fsanitize=kcfi a C only feature? If so, you might need to mention this in the documentation and also reject its usage in other languages. 2. There is no overall description of the design of this kcfi implementa

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Jakub Jelinek
On Thu, Aug 28, 2025 at 04:24:46PM +0200, Richard Biener wrote: > That said, if we ever want to improve on this (and solve the redundant > store elimination issue), we need an actual GIMPLE/RTL statement > doing what std::start_lifetime_as does (but not generate code). > > Meaning, I'd vote for a

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

2025-08-28 Thread Jason Merrill
On 8/28/25 10:22 AM, Alfie Richards wrote: The 08/28/2025 15:56, Jason Merrill wrote: On 8/28/25 8:59 AM, Alfie Richards wrote: The 08/28/2025 14:43, Jason Merrill wrote: On 8/28/25 5:49 AM, alfie.richa...@arm.com wrote: From: Alfie Richards Adds the target_version and target_clones attribu

Re: [PATCH] fixincludes: Skip pthread_incomplete_struct_argument for modern glibc [PR118009]

2025-08-28 Thread Jason Merrill
On 8/28/25 9:56 AM, Jonathan Wakely wrote: Ping Original: https://gcc.gnu.org/pipermail/gcc-patches/2025-August/692933.html On 20/08/25 17:30 +0100, Jonathan Wakely wrote: The pthread_incomplete_struct_argument fix was intended for ancient versions of Glibc (only 2.3.3 and 2.3.4, I believe). F

Re: [PATCH v2] libstdc++: Rename __cmp_cat::__unspec to __cmp_cat::__literal_zero.

2025-08-28 Thread Tomasz Kaminski
On Thu, Aug 28, 2025 at 4:19 PM Tomasz Kamiński wrote: > This slightly improve the readability of error message, by suggesting > that 0 (literal) is expected as argument: > invalid conversion from 'int' to 'std::__cmp_cat::__literal_zero*' > > libstdc++-v3/ChangeLog: > > * libsupc++/com

Re: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate

2025-08-28 Thread Richard Biener
On Thu, Aug 28, 2025 at 1:00 PM Sam James wrote: > > Richard Biener writes: > > > On Thu, Aug 28, 2025 at 7:23 AM Sam James wrote: > >> > >> GNU2 TLS descriptors were introduced in 2006 (r0-73091-g5bf5a10b1ccacf) > >> but were only opt-in with -mtls-dialect=gnu2. They are more efficient > >> and

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Richard Biener
On Thu, 28 Aug 2025, Jason Merrill wrote: > On 8/28/25 9:52 AM, Jakub Jelinek wrote: > > On Thu, Aug 28, 2025 at 02:08:12PM +0200, Jason Merrill wrote: > >>> So, do you think for P2590R2 we want a purely library implementation which > >>> does nothing (well, define the needed templates)? > >>> Or

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

2025-08-28 Thread Alfie Richards
The 08/28/2025 15:56, Jason Merrill wrote: > On 8/28/25 8:59 AM, Alfie Richards wrote: > > The 08/28/2025 14:43, Jason Merrill wrote: > > > On 8/28/25 5:49 AM, alfie.richa...@arm.com wrote: > > > > From: Alfie Richards > > > > > > > > Adds the target_version and target_clones attributes to diagno

Re: [PATCH] libstdc++: Rename __cmp_cat::__unspec to __cmp_cat::__zero_literal.

2025-08-28 Thread Patrick Palka
On Thu, 28 Aug 2025, Jonathan Wakely wrote: > On Thu, 28 Aug 2025 at 14:26, Tomasz Kamiński wrote: > > > > This slightly improve the readability of error message, by suggesting > > that 0 (literal) is expected as argument: > > invalid conversion from 'int' to 'std::__cmp_cat::__zero_literal*' >

[PATCH v2] libstdc++: Rename __cmp_cat::__unspec to __cmp_cat::__literal_zero.

2025-08-28 Thread Tomasz Kamiński
This slightly improve the readability of error message, by suggesting that 0 (literal) is expected as argument: invalid conversion from 'int' to 'std::__cmp_cat::__literal_zero*' libstdc++-v3/ChangeLog: * libsupc++/compare (__cmp_cat::__literal_zero): Rename from __unspec.

Re: std::start_lifetime_as vs. aliasing

2025-08-28 Thread Jason Merrill
On 8/28/25 9:52 AM, Jakub Jelinek wrote: On Thu, Aug 28, 2025 at 02:08:12PM +0200, Jason Merrill wrote: So, do you think for P2590R2 we want a purely library implementation which does nothing (well, define the needed templates)? Or do you prefer some builtin which will do nothing initially but m

[PING^2][PATCH v3] ipa, cgraph: Enable constant propagation to OpenMP kernels

2025-08-28 Thread Josef Melcr
Hi, a gentle ping for this patch: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/691227.html Best regards, Josef Melcr

[committed] libstdc++: Test comparing ordering with type convertible to any pointer.

2025-08-28 Thread Tomasz Kamiński
libstdc++-v3/ChangeLog: * testsuite/18_support/comparisons/categories/zero_neg.cc: New test. Reviewed-by: Jonathan Wakely Signed-off-by: Tomasz Kamiński --- .../comparisons/categories/zero_neg.cc | 16 1 file changed, 16 insertions(+) Tested on x86_64-linux.

std::start_lifetime_as vs. aliasing

2025-08-28 Thread Jakub Jelinek
On Thu, Aug 28, 2025 at 02:08:12PM +0200, Jason Merrill wrote: > > So, do you think for P2590R2 we want a purely library implementation which > > does nothing (well, define the needed templates)? > > Or do you prefer some builtin which will do nothing initially but might be > > changed to do someth

Re: [PATCH] fixincludes: Skip pthread_incomplete_struct_argument for modern glibc [PR118009]

2025-08-28 Thread Jonathan Wakely
Ping Original: https://gcc.gnu.org/pipermail/gcc-patches/2025-August/692933.html On 20/08/25 17:30 +0100, Jonathan Wakely wrote: The pthread_incomplete_struct_argument fix was intended for ancient versions of Glibc (only 2.3.3 and 2.3.4, I believe). From Glibc 2.3.5 the pthread.h header already

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

2025-08-28 Thread Jason Merrill
On 8/28/25 8:59 AM, Alfie Richards wrote: The 08/28/2025 14:43, Jason Merrill wrote: On 8/28/25 5:49 AM, alfie.richa...@arm.com wrote: From: Alfie Richards Adds the target_version and target_clones attributes to diagnostic messages for target_version semantics. This is because the target_ver

[PATCH] c++: Fix miscompilation on array subscription with COND_EXPR as the array

2025-08-28 Thread Sirui Mu
Hello, The following minimum reproducer would miscompile with vanilla gcc: extern int x[10], y[10]; bool g(); void f() { 0[g() ? x : y] = 1; } gcc would mistakenly treat the subexpression (g() ? x : y) as a prvalue and move that array to stack. The following assignment would then write to

Re: [PATCH] libstdc++/complex: Remove implicit type casts in complex

2025-08-28 Thread Jonathan Wakely
On Sun, 26 Nov 2023 at 01:49, Weslley da Silva Pereira wrote: > > Hi Jonathan, > > Is there a way I can see my patch merged (when it gets merged)? > Particularly, I want to have a link for the commit. I would like to add this > as "impact on third party software" for the software > https://githu

[PATCH] Dump niter assumption versioning when vectorizing

2025-08-28 Thread Richard Biener
The following emits the assumption that is used for versioning from niter analysis. Bootstrapped on x86_64-unknown-linux-gnu, will push if testing succeeds. Richard. * tree-vect-loop.cc (vect_analyze_loop_form): Dump niter assumption used for versioning. --- gcc/tree-vect-loop.c

Re: [PATCH] libstdc++: Rename __cmp_cat::__unspec to __cmp_cat::__zero_literal.

2025-08-28 Thread Jonathan Wakely
On Thu, 28 Aug 2025 at 14:26, Tomasz Kamiński wrote: > > This slightly improve the readability of error message, by suggesting > that 0 (literal) is expected as argument: > invalid conversion from 'int' to 'std::__cmp_cat::__zero_literal*' > > libstdc++-v3/ChangeLog: > > * libsupc++/comp

[PATCH] libstdc++: Rename __cmp_cat::__unspec to __cmp_cat::__zero_literal.

2025-08-28 Thread Tomasz Kamiński
This slightly improve the readability of error message, by suggesting that 0 (literal) is expected as argument: invalid conversion from 'int' to 'std::__cmp_cat::__zero_literal*' libstdc++-v3/ChangeLog: * libsupc++/compare (__cmp_cat::__zero_literal): Rename from __unspec.

Re: [PATCHv2] Error out stack-protector unavailability on AIX

2025-08-28 Thread Ayappan
Hi Team, Kindly review the below patch and let me know if any changes are required., On Thu, Aug 14, 2025 at 3:14 PM Ayappan Perumal wrote: > From: Ayappan Perumal > > --- > stack-protector is not supported in GCC on AIX. This patch is to fail the > compilation if -fstack-protector option is pa

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

2025-08-28 Thread Alfie Richards
The 08/28/2025 14:43, Jason Merrill wrote: > On 8/28/25 5:49 AM, alfie.richa...@arm.com wrote: > > From: 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 a

Re: [PATCH] i386: default to -mtls-dialect=gnu2 if appropriate

2025-08-28 Thread H.J. Lu
On Thu, Aug 28, 2025 at 4:32 AM Richard Biener wrote: > > On Thu, Aug 28, 2025 at 1:00 PM Sam James wrote: > > > > Richard Biener writes: > > > > > On Thu, Aug 28, 2025 at 7:23 AM Sam James wrote: > > >> > > >> GNU2 TLS descriptors were introduced in 2006 (r0-73091-g5bf5a10b1ccacf) > > >> but w

Re: [PATCH v10 07/13] c++: Refactor FMV frontend conflict and merging logic and hooks.

2025-08-28 Thread Jason Merrill
On 8/28/25 5:49 AM, alfie.richa...@arm.com wrote: From: Alfie Richards This change refactors FMV handling in the frontend to allows greater reasoning about versions in shared code. This is needed for allowing target_clones and target_versions to be used together in a function set, as there is

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

2025-08-28 Thread Jason Merrill
On 8/28/25 5:49 AM, alfie.richa...@arm.com wrote: From: 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 represent

[comitted v2] libstdc++: Provide helpers to interoperate between __cmp_cat::_Ord and ordering types.

2025-08-28 Thread Tomasz Kamiński
This patch adds two new internal helpers for ordering types: * __cmp_cat::__ord to retrieve an internal _Ord value, * __cmp_cat::__make to create an ordering from an _Ord value. Conversions between ordering types are now handled by __cmp_cat::__make. As a result, ordering types no longer need to b

  1   2   >