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

2025-09-02 Thread Richard Biener
On Wed, Sep 3, 2025 at 6:26 AM Andrew Pinski wrote: > > On Tue, Sep 2, 2025 at 9:22 PM Sam James wrote: > > > > Andi Kleen writes: > > > > > That said the automatic scanning of identifiers still seems like a > > > useful option to have. I bet the kernel is not the only software > > > with this i

Re: [PATCH v2] fold: Unwrap MEM_REF after get_inner_reference in split_address_to_core_and_offset [PR121355]

2025-09-02 Thread Richard Biener
On Wed, Sep 3, 2025 at 4:34 AM Andrew Pinski wrote: > > Inside split_address_to_core_and_offset, this calls get_inner_reference. > > Take: > ``` > _6 = t_3(D) + 12; > _8 = &MEM[(struct s1 *)t_3(D) + 4B].t; > _1 = _6 - _8; > ``` > > On the assignement of _8, get_inner_reference will return `M

Re: [PATCH v1 1/2] Match: Add form 5 of unsigned SAT_MUL for widen-mul

2025-09-02 Thread Richard Biener
On Wed, Sep 3, 2025 at 3:18 AM Li, Pan2 wrote: > > Thanks Richard. > > >> +(convert (widen_mult:c@3 (convert@4 (convert @0)) > >> So I added 2 times convert to match above sematics. Do you indicate that > >> we only need one convert here? > > Yes, the above extra widening looks odd to

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

2025-09-02 Thread Richard Biener
On Tue, Sep 2, 2025 at 11:22 PM Michal Jireš wrote: > > On 8/28/25 7:40 PM, Andi Kleen wrote: > > > > Just 1:1 is slow, isn't it? > > > > > Surprisingly not by much: > > rm vmlinux.o; time make -j16 vmlinux > > # -flto-partition=1to1 > > Exe

RE: [PATCH v2 3/3]middle-end: Use addhn for compression instead of inclusive OR when reducing comparison values

2025-09-02 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Wednesday, September 3, 2025 8:36 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: RE: [PATCH v2 3/3]middle-end: Use addhn for compression instead of > inclusive OR when reducing comparison values > > On Tue, 2 Sep

[PATCH 0/3] libstdc++: Reuse bind_back in ranges::_Partial

2025-09-02 Thread Tomasz Kamiński
This patch series reworks the implementation of the ranges::_Partial, to reuse the functors created from _Bind_back, which allows it to benefit from it's storage optimization. The first two patches are refactoring patches done in pepration: * 1/3 merges _Bind_front and _Bind_back binder into one t

Re: [PATCH] Move the folding of memcmpy to memcmpy_eq to fold all builtins

2025-09-02 Thread Richard Biener
On Tue, Sep 2, 2025 at 11:55 PM Andrew Pinski wrote: > > On Tue, Sep 2, 2025 at 5:26 AM Richard Biener > wrote: > > > > On Sun, Aug 31, 2025 at 4:11 PM Andrew Pinski > > wrote: > > > > > > This is a small cleanup by moving the optimization of memcmp to > > > memcmp_eq to fab from strlen pass. Si

Re: [Patch, fortran] PR84432 - [F08] Detect illegal component initialization in pdt_27.f03

2025-09-02 Thread Paul Richard Thomas
Dear All, Please ignore this submission. I have crossed over PRs between the message and the attachments. I will resubmit both. The patch is for pr103414, which I will have to do a bit more work on because a parameter expression of BT_BOZ fails with a double free. Watch this space and sorry for

Re: [PATCH] libstdc++: Restore C++20 support for old std::string ABI

2025-09-02 Thread Tomasz Kaminski
On Tue, Sep 2, 2025 at 9:40 PM Jonathan Wakely wrote: > The r16-3416-g806de30f51c8b9 change to use __cpp_lib_chrono in > preprocessor conditions broke support for for freestanding and > the COW std::string ABI. That happened because __cpp_lib_chrono is only > defined to the C++20 value for hoste

Re: [PATCH] libstdc++: Make CTAD ignore pair(const T1&, const T2&) constructor [PR110853]

2025-09-02 Thread Tomasz Kaminski
On Wed, Sep 3, 2025 at 3:41 AM Patrick Palka wrote: > On Tue, 2 Sep 2025, Jonathan Wakely wrote: > > > For the pair(T1, T2) explicit deduction type to decay its arguments as > > intended, we need the pair(const T1&, const T2&) constructor to not be > > used for CTAD. Otherwise we try to instantia

Re: [PATCH] libstdc++: Fix std::get for std::pair with reference members [PR121745]

2025-09-02 Thread Tomasz Kaminski
On Tue, Sep 2, 2025 at 9:46 PM Jonathan Wakely wrote: > Make the std::get overloads for rvalues use std::forward(p.first) > not std::move(p.first), so that lvalue reference members are not > incorrectly converted to rvalues. > > libstdc++-v3/ChangeLog: > > PR libstdc++/121745 > *

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

2025-09-02 Thread Sam James
Andi Kleen writes: > That said the automatic scanning of identifiers still seems like a > useful option to have. I bet the kernel is not the only software > with this issue. Off the top of my head, there's PHP and Valgrind.. I'd have to go looking for more (of course projects have added workarou

Re: [PATCH] c: Rename uimaxabs to umaxabs

2025-09-02 Thread Joseph Myers
On Mon, 1 Sep 2025, Jakub Jelinek wrote: > Hi! > > The following patch implements > https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3577.txt > No big deal on the GCC side, for uimaxabs we just won't > recognize it as builtin and I don't see it worth preserving > __builtin_uimaxabs, I doubt anyt

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

2025-09-02 Thread Sam James
Andrew Pinski writes: > On Tue, Sep 2, 2025 at 9:22 PM Sam James wrote: >> >> Andi Kleen writes: >> >> > That said the automatic scanning of identifiers still seems like a >> > useful option to have. I bet the kernel is not the only software >> > with this issue. >> >> Off the top of my head, t

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

2025-09-02 Thread Andrew Pinski
On Tue, Sep 2, 2025 at 9:22 PM Sam James wrote: > > Andi Kleen writes: > > > That said the automatic scanning of identifiers still seems like a > > useful option to have. I bet the kernel is not the only software > > with this issue. > > Off the top of my head, there's PHP and Valgrind.. I'd have

Re: [PATCH] testsuite: arm: Simplify fp16-aapcs tests

2025-09-02 Thread Torbjorn SVENSSON
On 2025-08-27 17:07, Torbjörn SVENSSON wrote: Reduce fp16-aapcs testcases to return value testing since parameter passing are already tested in aapcs/vfp*.c gcc/testsuite/ChangeLog: * gcc.target/arm/fp16-aapcs.c: New test. * gcc.target/arm/fp16-aapcs-1.c: Removed. * gc

Re: [PATCH v2 2/2] testsuite: arm: factorize arm_v8_neon_ok flags

2025-09-02 Thread Torbjorn SVENSSON
On 2025-09-01 16:59, Christophe Lyon wrote: On Wed, 27 Aug 2025 at 13:25, Torbjorn SVENSSON wrote: On 2025-08-18 19:24, Christophe Lyon wrote: Like we do in other effective-targets, add "-mcpu=unset -march=armv8-a" directly when setting et_arm_v8_neon_flags in arm_v8_neon_ok_nocache, to

[PATCH 1/7 v5] RISC-V: Add basic XAndes vendor extension support.

2025-09-02 Thread Kuan-Lin Chen
This patch add basic support for the following XAndes ISA extensions: XANDESPERF XANDESBFHCVT XANDESVBFHCVT XANDESVSINTLOAD XANDESVPACKFPH XANDESVDOT gcc/ChangeLog: * config/riscv/riscv-ext.def: Include riscv-ext-andes.def. * config/riscv/riscv-ext.opt (riscv_xandes_subext): New

[committed] arm: testsuite: improve test compatibility of asm-hard-reg-... tests

2025-09-02 Thread Richard Earnshaw
On arm, overriding -march can lead to warnings if the testsuite options try to pass -mcpu. Avoid these by ensuring the -mcpu is unset before adding the architecture. Also, improve the compatibility of asm-hard-reg-error-3.c for hard-float environment by allowing FP instructions in the architectur

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

2025-09-02 Thread Robin Dapp
Argh... I realized I sent an old version of the patch, sorry. Will update tomorrow. -- Regards Robin

[PATCH v1 0/2] Support unsigned scalar SAT_MUL form 5

2025-09-02 Thread pan2 . li
From: Pan Li This patch would like to try to match the the unsigned SAT_MUL form 5, aka below: #define DEF_SAT_U_MUL_FMT_5(NT, WT) \ NT __attribute__((noinline))\ sat_u_mul_##NT##_from_##WT##_fmt_5 (NT a, NT b) \ {

[PATCH 3/3]middle-end: Use addhn for compression instead of inclusive OR when reducing comparison values

2025-09-02 Thread Tamar Christina
Given a sequence such as int foo () { #pragma GCC unroll 4 for (int i = 0; i < N; i++) if (a[i] == 124) return 1; return 0; } where a[i] is long long, we will unroll the loop and use an OR reduction for early break on Adv. SIMD. Afterwards the sequence is followed by a compression

[PATCH] RISC-V: Fix is_vlmax_len_p and use for strided ops.

2025-09-02 Thread Robin Dapp
Hi, This patch changes is_vlmax_len_p to handle VLS modes properly. Before we would check if len == GET_MODE_NUNITS (mode). This works vor VLA modes but not necessarily for VLS modes. We regularly have e.g. small VLS modes where LEN equals their number of units but which do not span a full vec

Re: [COMMITTED 26/30] ada: Do not install the support files of 128-bit types on 32-bit targets

2025-09-02 Thread Eric Botcazou
> The last sucessful build was 20250605, which has this in the build > directory: > > $ find -name s-vai.ads > ./gcc/ada/rts_32/s-vai.ads > ./gcc/ada/rts/s-vai.ads > > Both files are now missing, and reverting this commit brings them back. The intent was to remove only the former and

[PATCH 1/2] RISC-V: Fix extension subset check in riscv_can_inline_p

2025-09-02 Thread Kito Cheng
The extension subset check logic in riscv_ext_is_subset was incorrectly inverted, causing functions with more extensions to be incorrectly rejected from being inlined into functions with fewer extensions. This patch fixes the logic to correctly check if the callee's required extensions are a subse

[PATCH v2 2/3] libstdc++: Implement constant_wrapper, cw from P2781R9.

2025-09-02 Thread Luc Grosheintz
This is a partial implementation of P2781R9. It adds std::cw and std::constant_wrapper, but doesn't modify __integral_constant_like for span/mdspan. libstdc++-v3/ChangeLog: * include/bits/version.def (constant_wrapper): Add. * include/bits/version.h: Regenerate. * include/

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

2025-09-02 Thread Segher Boessenkool
On Tue, Sep 02, 2025 at 03:01:27PM +0530, Ayappan wrote: > > Wow. So this shortcoming harks back to the origin of time. > > > > Why was it not discovered before, do you think? No one ever tried it? > > > > Should we have a testcase for it? _Do_ we have a testcase for it? > > I came to know abou

Re: [PATCH] D: disable collect fork on Darwin

2025-09-02 Thread Rainer Orth
Hi Iain, >> What about Solaris and *BSD. Are there any outstanding PRs for druntime >> hanging >> on those ports too? Or is specific to Darwin (or possibly emutls?). > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103944 > > says darwin and i686-linux (so my exclusion of linux is not right), b

[PATCH] c: Rename uimaxabs to umaxabs

2025-09-02 Thread Jakub Jelinek
Hi! The following patch implements https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3577.txt No big deal on the GCC side, for uimaxabs we just won't recognize it as builtin and I don't see it worth preserving __builtin_uimaxabs, I doubt anything but gcc testsuite used that. But on the glibc side

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

2025-09-02 Thread Jonathan Wakely
On Tue, 26 Aug 2025 at 18:31, Nathan Myers wrote: > > 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

Re: [RFC] libstdc++: Refactor _Variadic_union so _Unitialized is not needed.

2025-09-02 Thread Tomasz Kaminski
On Fri, Aug 29, 2025 at 5:23 PM Tomasz Kaminski wrote: > > On Fri, Aug 29, 2025 at 5:21 PM Tomasz Kaminski > wrote: > >> >> >> On Fri, Aug 29, 2025 at 5:16 PM Patrick Palka wrote: >> >>> On Fri, 29 Aug 2025, Tomasz Kamiński wrote: >>> >>> > The changes the _Variadic_union implementation, in a w

Re: [PATCH v5 1/2] RISC-V: Fix can_find_related_mode_p for VLS types

2025-09-02 Thread Robin Dapp
@@ -3047,7 +3047,7 @@ can_find_related_mode_p (machine_mode vector_mode, scalar_mode element_mode, GET_MODE_SIZE (element_mode), nunits)) return true; if (riscv_v_ext_vls_mode_p (vector_mode) - && multiple_p (TARGET_MIN_VLEN * TARGET_MAX_LMUL, + && multip

Re: [PATCH v2 1/3] libstdc++: Move _Index_tuple, _Build_index_tuple to .

2025-09-02 Thread Tomasz Kaminski
On Tue, Sep 2, 2025 at 1:11 PM Tomasz Kaminski wrote: > > > On Tue, Sep 2, 2025 at 11:44 AM Jonathan Wakely > wrote: > >> On Tue, 2 Sept 2025 at 09:01, Luc Grosheintz wrote: >> > >> > As preparation for implementing std::constant_wrapper that's part of the >> > C++26 version of the header, the

Re: [PATCH] tree-optimization: fabs(a+0.0) -> fabs(a) for non trapping case

2025-09-02 Thread Richard Biener
On Fri, Aug 29, 2025 at 2:20 PM Matteo Nicoli wrote: > > Here’s the patch with the modified comment before the rule in match.pd OK. Do you have git access? Btw, the ChangeLog is currently wrong: Subject: [PATCH] tree-optimization/121595 - the optimization fabs(a+0.0) -> fabs(a) should apply o

[PATCHv3] Error out stack-protector unavailability on AIX

2025-09-02 Thread Ayappan Perumal
From: Ayappan Perumal --- stack-protector is not supported in GCC on AIX. This patch is to fail the compilation if -fstack-protector option is passed. gcc/config/rs6000/aix.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h

[PATCH v2 2/3]AArch64: Add support for addhn vectorizer optabs for Adv.SIMD

2025-09-02 Thread Tamar Christina
This implements the new vector optabs vec_addh_narrow adding support for in-vectorizer use for early break. Bootstrapped Regtested on aarch64-none-linux-gnu, arm-none-linux-gnueabihf, x86_64-pc-linux-gnu -m32, -m64 and no issues. Ok for master? Thanks, Tamar gcc/ChangeLog: * config/aar

[PATCH] s390: Adjust s390/spaceship-fp-*.c tests for recent changes

2025-09-02 Thread Jakub Jelinek
Hi! In r16-3414 libstdc++ changed ABI for (still experimental C++20) and uses unordered value -128 instead of 2. Generally the change improved code generation on all targets tested, see https://gcc.gnu.org/pipermail/gcc-patches/2025-August/693534.html for details. In r16-3474 I've adjusted the mi

Re: [PATCH] RISC-V: Add Zbb extension sext testcase.

2025-09-02 Thread Jeff Law
On 9/1/25 2:47 AM, Jiawei wrote: This patch update RISC-V Zba extension 'sext' instructions generation. Supplemented the instruction generation detection of 'sext.h' and 'sext.b'. gcc/testsuite/ChangeLog: * gcc.target/riscv/zbb-sext.c: New test. I went ahead and pushed this as well.

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

2025-09-02 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: Hi Tobias, I have some updates about this patch. First, some good news: 1. The patch has been bootstrapped and tested with no regressions. This was achieved by limiting the type with only one 'sorry' case. 2. The frontend parsing now considers outer parentheses. :-)

[PATCH v2] RISC-V: Handle overlap in expand_vec_perm PR121742.

2025-09-02 Thread Robin Dapp
Hi, In a two-source gather we unconditionally overwrite target with the first gather's result already. If op1 == target this clobbers the source operand for the second gather. This patch uses a temporary in that case. Posting a v2 for the CI with the proper PR# and reg_overlap_mentioned_p. Re

Re: [PATCH] RISC-V: Add patterns for vector-scalar IEEE floating-point max

2025-09-02 Thread Paul-Antoine Arras
Hi Kito, On 02/09/2025 05:17, Kito Cheng wrote: Hi Paul-Antoine: diff --git gcc/config/riscv/autovec-opt.md gcc/config/riscv/autovec-opt.md index d56fb5f237c..5cb34cef418 100644 --- gcc/config/riscv/autovec-opt.md +++ gcc/config/riscv/autovec-opt.md @@ -2163,3 +2163,41 @@ (define_insn_and_spli

Re: [PATCH] tree-optimization/121753 - ICE with pattern breaking reduction constraints

2025-09-02 Thread Jakub Jelinek
On Tue, Sep 02, 2025 at 03:28:46PM +0200, Richard Biener wrote: > On Tue, 2 Sep 2025, Jakub Jelinek wrote: > > > On Tue, Sep 02, 2025 at 11:34:59AM +0200, Richard Biener wrote: > > > > > > Oops, now also to the list. > > > > If so, it needs to punt on anything that uses something more than once.

[PATCH v1 1/2] AArch64: Add `+sme-lutv2` flag

2025-09-02 Thread Karl Meakin
gcc/ChangeLog: * config/aarch64/aarch64-c.cc (aarch64_update_cpp_builtins): Conditonally define `__ARM_FEATURE_SME_LUTv2" macro. * config/aarch64/aarch64-option-extensions.def (AARCH64_OPT_EXTENSION("sme-lutv2")): New optional architecture extension. * con

Re: [PATCH] c++/modules: Fix ADL [PR117658]

2025-09-02 Thread Jason Merrill
On 8/31/25 9:21 AM, Nathaniel Shead wrote: On Fri, Aug 29, 2025 at 12:33:23PM +0200, Jason Merrill wrote: On 8/24/25 9:04 AM, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- On looking again at [basic.lookup.argdep] p4, I believe GCC hasn't ful

[PATCH] c: Implement C2Y N3457 - The __COUNTER__ predefined macro

2025-09-02 Thread Jakub Jelinek
Hi! The following patch implements the https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3457.htm paper without the first 3 lines in Recommended practice. Seems GCC behavior already matches the expected behavior except for diagnostics of more than 2147483648 __COUNTER__ expansions, so the patch ad

[PATCH v5 1/6] target-insns.def: (tag_memory) New pattern.

2025-09-02 Thread claudiu . zissulescu-ianculescu
From: Claudiu Zissulescu Add a new target instruction. Hardware-assisted sanitizers on architectures providing instructions to tag/untag memory can then make use of this new instruction pattern. For example, the memtag-stack sanitizer uses these instructions to tag and untag a memory granule. gc

Re: [PATCH] Fortran: fix TRANSFER with rank 1 unlimited polymorphic SOURCE [PR121263]

2025-09-02 Thread Jerry D
On 9/2/25 1:29 PM, Harald Anlauf wrote: Dear all, here's an attempt to fix a technical regression for TRANSFER with an unlimited polymorphic SOURCE argument.  As this is something where others are more familiar with (Paul?), I might have missed something, so be extra careful when reviewing. Oth

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

2025-09-02 Thread Michal Jireš
On 8/29/25 9:51 AM, Jakub Jelinek wrote: On Thu, Aug 28, 2025 at 02:24:33PM -0700, 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.

[PATCH v2] fold: Unwrap MEM_REF after get_inner_reference in split_address_to_core_and_offset [PR121355]

2025-09-02 Thread Andrew Pinski
Inside split_address_to_core_and_offset, this calls get_inner_reference. Take: ``` _6 = t_3(D) + 12; _8 = &MEM[(struct s1 *)t_3(D) + 4B].t; _1 = _6 - _8; ``` On the assignement of _8, get_inner_reference will return `MEM[(struct s1 *)t_3(D) + 4B]` and an offset but that does not match up w

Re: [PATCH v3 1/1] Testsuite: Skip tests making calls to variables

2025-09-02 Thread Maciej W. Rozycki
On Mon, 1 Sep 2025, Aleksandar Rakic wrote: > The compressed MIPS ISAs (microMIPS and MIPS16) require the LSB of > an address to indicate which ISA to execute. The non-conformant > patterns used in these tests cannot set the ISA mode bit and may > attempt to directly call the variable which trigg

Re: [RFC] libstdc++: Refactor _Variadic_union so _Unitialized is not needed.

2025-09-02 Thread Patrick Palka
On Mon, 1 Sep 2025, Tomasz Kaminski wrote: > > > On Fri, Aug 29, 2025 at 5:23 PM Tomasz Kaminski wrote: > > On Fri, Aug 29, 2025 at 5:21 PM Tomasz Kaminski > wrote: > > > On Fri, Aug 29, 2025 at 5:16 PM Patrick Palka wrote: > On Fri, 29 Aug 2025, Tomasz Kamiński wrote: > >

RE: [PATCH v1 1/2] Match: Add form 5 of unsigned SAT_MUL for widen-mul

2025-09-02 Thread Li, Pan2
Thanks Richard. >> +(convert (widen_mult:c@3 (convert@4 (convert @0)) >> So I added 2 times convert to match above sematics. Do you indicate that we >> only need one convert here? > Yes, the above extra widening looks odd to me. Remove the inner convert of (convert @0)) will make the

Re: [PATCH] libstdc++: Make CTAD ignore pair(const T1&, const T2&) constructor [PR110853]

2025-09-02 Thread Patrick Palka
On Tue, 2 Sep 2025, Jonathan Wakely wrote: > For the pair(T1, T2) explicit deduction type to decay its arguments as > intended, we need the pair(const T1&, const T2&) constructor to not be > used for CTAD. Otherwise we try to instantiate pair without > decaying, which is ill-formed for function lv

Re: [PATCH] bitint: Fix regressions [PR117599]

2025-09-02 Thread Xi Ruoyao
On Tue, 2025-09-02 at 22:59 +0800, Xi Ruoyao wrote: > On Tue, 2025-09-02 at 16:51 +0200, Jakub Jelinek wrote: > > On Tue, Aug 19, 2025 at 07:37:29PM +0800, Yang Yujie wrote: > > > This patch fixes regressions of the gcc.dg/torture/bitint-* tests > > > caused by r16-3036-ga76a032354ee48 with --enabl

Re: [PATCH] Move the folding of memcmpy to memcmpy_eq to fold all builtins

2025-09-02 Thread Andrew Pinski
On Tue, Sep 2, 2025 at 5:26 AM Richard Biener wrote: > > On Sun, Aug 31, 2025 at 4:11 PM Andrew Pinski > wrote: > > > > This is a small cleanup by moving the optimization of memcmp to > > memcmp_eq to fab from strlen pass. Since the copy of the other > > part of the memcmp strlen optimization to

Re: [PATCH] D, Darwin, Powerpc: Fix build error.

2025-09-02 Thread Iain Buclaw
Excerpts from Iain Sandoe's message of September 1, 2025 6:20 pm: > Tested on a cross to powerpc-darwin9 and on powerpc64le-linux, > OK for trunk? > thanks > Iain > OK, and please backport to gcc-15 too. I've raised upstream pull request here: https://github.com/dlang/dmd/pull/21803 Regards, I

Re: [PATCH] fold: Unwrap MEM_REF after get_inner_reference in split_address_to_core_and_offset [PR121355]

2025-09-02 Thread Andrew Pinski
On Tue, Sep 2, 2025 at 5:21 AM Richard Biener wrote: > > On Sun, Aug 31, 2025 at 12:29 AM Andrew Pinski > wrote: > > > > Inside split_address_to_core_and_offset, this calls get_inner_reference. > > > > Take: > > ``` > > _6 = t_3(D) + 12; > > _8 = &MEM[(struct s1 *)t_3(D) + 4B].t; > > _1 = _

[PATCH] libstdc++: Make CTAD ignore pair(const T1&, const T2&) constructor [PR110853]

2025-09-02 Thread Jonathan Wakely
For the pair(T1, T2) explicit deduction type to decay its arguments as intended, we need the pair(const T1&, const T2&) constructor to not be used for CTAD. Otherwise we try to instantiate pair without decaying, which is ill-formed for function lvalues. Use std::type_identity_t to make the constru

Re: [PATCH] forwprop: Fix alignment of types in expansion of memcmp

2025-09-02 Thread Andrew Pinski
On Tue, Sep 2, 2025 at 5:32 AM Richard Biener wrote: > > On Tue, Sep 2, 2025 at 6:29 AM Andrew Pinski > wrote: > > > > I noticed that when looking into g++.dg/tree-ssa/vector-compare-1.C > > failure on arm, the wrong alignment was being used for the load. > > There needs to be an unaligned type h

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

2025-09-02 Thread Michal Jireš
On 8/28/25 7:40 PM, Andi Kleen wrote: Just 1:1 is slow, isn't it? Surprisingly not by much: rm vmlinux.o; time make -j16 vmlinux # -flto-partition=1to1 Executed in 235.38 secsfish external usr time 37.97 mins0

[Patch, fortran] PR84432 - [F08] Detect illegal component initialization in pdt_27.f03

2025-09-02 Thread Paul Richard Thomas
Hi All, This is another straightforward patch that detects variables with non-integer type being used as PDT parameters. Note that much of the time, when being parsed, variable expressions have type BT_PROCEDURE and so the type of the symbol must be checked. The parameter fed to the PDT in pr95090

[PATCH] c++: constant non-dep init folding vs FIELD_DECL access [PR97740]

2025-09-02 Thread Patrick Palka
Bootstrapped and regtested on x86_64-cp-linux-gnu, does this look OK for trunk and eventual backports? -- >8 -- Here although the local templated variables x and y have the same reduced constant value, only x's initializer is well-formed as written since A::m has private access. We correctly rej

[PATCH] Fortran: fix TRANSFER with rank 1 unlimited polymorphic SOURCE [PR121263]

2025-09-02 Thread Harald Anlauf
Dear all, here's an attempt to fix a technical regression for TRANSFER with an unlimited polymorphic SOURCE argument. As this is something where others are more familiar with (Paul?), I might have missed something, so be extra careful when reviewing. Otherwise regtests fine on x86_64-pc-linux-g

RE: [v2] PR81358: Enable automatic linking of libatomic

2025-09-02 Thread Joseph Myers
On Sun, 10 Aug 2025, Prathamesh Kulkarni wrote: > Hi Matthew, > Thanks for the suggestions! In the attached patch, I have modified > libatomic/configure.ac to use > __libatomic_save_CFLAGS__ instead of save_CFLAGS, so it isn't (accidentally) > modified by ACX_PROG_CC_WARNING_OPTS. > > The patch

[PATCH] libstdc++: Restore C++20 support for old std::string ABI

2025-09-02 Thread Jonathan Wakely
The r16-3416-g806de30f51c8b9 change to use __cpp_lib_chrono in preprocessor conditions broke support for for freestanding and the COW std::string ABI. That happened because __cpp_lib_chrono is only defined to the C++20 value for hosted and for the new ABI, because the full set of C++20 features ar

Re: [PATCH v9 1/6] c-family: add btf_type_tag and btf_decl_tag attributes

2025-09-02 Thread Joseph Myers
On Fri, 22 Aug 2025, David Faust wrote: > +{ > + /* Treat btf_type_tag applied to a function type as applying to the > + return type instead. Otherwise with GNU syntax there is no way to > + apply type_tag to the return type; the parser always associates it > + to the func

Re: [PATCH v2] doc: Correct the return type of float comparison

2025-09-02 Thread Joseph Myers
On Wed, 28 May 2025, Trevor Gross wrote: > Documentation for `__cmpsf2` and similar functions currently indicate a > return type of `int`. This is not correct however; the `libgcc` > functions return `CMPtype`, the size of which is determined by the > `libgcc_cmp_return` mode. > > Update document

Re: [Patch, fortran] PR87669 -Select type, incorrect handling of parameterized derived type

2025-09-02 Thread Paul Richard Thomas
Hi Jerry, For some reason (fingers!) pdt_41.f03 had disappeared from my tree. Now that I have pulled afresh, there it is. Consider that the numbers of the tests in today's submissions are bumped by one. Thanks for spotting that and for the reviews. I'll push first thing tomorrow. Regards Paul

Re: [PING 1][PATCH] Add new builtin __atomic_compare_exchange_local()

2025-09-02 Thread Segher Boessenkool
On Tue, Sep 02, 2025 at 12:12:43PM +0200, Jakub Jelinek wrote: > On Tue, Sep 02, 2025 at 05:01:37AM -0500, Segher Boessenkool wrote: > > On Tue, Sep 02, 2025 at 07:56:58AM +0200, Jakub Jelinek wrote: > > > On Tue, Sep 02, 2025 at 09:32:15AM +0530, Surya Kumari Jangala wrote: > > > > Ping. > > > >

Re: [Patch, fortran] PR89707 - [F03] PDT with procedure pointer component

2025-09-02 Thread Jerry D
On 9/2/25 6:06 AM, Paul Richard Thomas wrote: Hi All, This is another relatively straight forward PDT patch that enables typebound procedures with a parameterized kind specification for the interface. Regtests with FC42/x86_64. OK for mainline Paul PS Patches for PRs 84432, 103414 & 114815

Re: [Patch, fortran] PR87669 -Select type, incorrect handling of parameterized derived type

2025-09-02 Thread Jerry D
On 9/2/25 4:43 AM, Paul Richard Thomas wrote: Hi All, The attached ChangeLogs explain the chunk in expr.cc. The chunk in is_extension_of was something of a surprise to me since I thought that we had stopped using the hash to identify derived types and to restrict their use to intrinsic types

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

2025-09-02 Thread Paul-Antoine Arras
On 02/09/2025 16:16, Jeff Law wrote: On 9/1/25 5:07 AM, Paul-Antoine Arras wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a vec_duplicate into an smax RTL instruction. [ ... ] diff --git gcc/config/riscv/autovec-opt.md gcc/config/riscv/autove

[PATCH v1 0/2] AArch64: Add SME LUTv2 support

2025-09-02 Thread Karl Meakin
This patch adds support for the new LUTv2 features as described in the ACLE. It adds the `+sme-lutv2` target flag, feature test macro and intrinsics. Making use of the new instructions without the intrinsics will be done in a follow up patch. ChangeLog: * V1: Initial series. Karl Meakin (2): AA

[PATCH v5 0/6] Add memtag-stack sanitizer using MTE instructions

2025-09-02 Thread claudiu . zissulescu-ianculescu
From: Claudiu Zissulescu Hi, Please find series of patches for adding memtag-stack sanitizer using AArch64 MTE instructions. Most of the patches are ACKed, however, I have included them for reference. The remaining ones to be reviews are: * target-insns.def: (compose_tag) New pattern. * aa

Re: [PATCH v2 2/3] libstdc++: Implement constant_wrapper, cw from P2781R9.

2025-09-02 Thread Luc Grosheintz
On 9/2/25 13:45, Tomasz Kaminski wrote: On Tue, Sep 2, 2025 at 10:07 AM Luc Grosheintz wrote: This is a partial implementation of P2781R9. It adds std::cw and std::constant_wrapper, but doesn't modify __integral_constant_like for span/mdspan. libstdc++-v3/ChangeLog: * include/bit

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

2025-09-02 Thread Robin Dapp
Yeah, it's not a strict bound, so the function needs to return -1 aka UNKNOWN. But how this -1 should be interpreted differs on context. But for sure -1 cannot be interpreted as actual bound. For frequency scaling I'd use the same logic as for costing - use estimated_poly_value / 2 In the att

Re: [PATCH] D: disable collect fork on Darwin

2025-09-02 Thread Iain Sandoe
Hi Iain > On 2 Sep 2025, at 15:25, Rainer Orth wrote: >>> What about Solaris and *BSD. Are there any outstanding PRs for druntime >>> hanging >>> on those ports too? Or is specific to Darwin (or possibly emutls?). >> >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103944 >> >> says darwin a

[PATCH v5 5/6] aarch64: Add support for memetag-stack sanitizer using MTE insns

2025-09-02 Thread claudiu . zissulescu-ianculescu
From: Claudiu Zissulescu MEMTAG sanitizer, which is based on the HWASAN sanitizer, will invoke the target-specific hooks to create a random tag, add tag to memory address, and finally tag and untag memory. Implement the target hooks to emit MTE instructions if MEMTAG sanitizer is in effect. Con

Re: [PATCH] bitint: Fix regressions [PR117599]

2025-09-02 Thread Jakub Jelinek
On Tue, Aug 19, 2025 at 07:37:29PM +0800, Yang Yujie wrote: > This patch fixes regressions of the gcc.dg/torture/bitint-* tests > caused by r16-3036-ga76a032354ee48 with --enable-checking=all. > > The errors are similar to the following: > > ../../gcc/testsuite/gcc.dg/torture/bitint-14.c:54:1: er

Re: [PATCH] s390: Adjust s390/spaceship-fp-*.c tests for recent changes

2025-09-02 Thread Stefan Schulze Frielinghaus
On Tue, Sep 02, 2025 at 10:03:20AM +0200, Jakub Jelinek wrote: > Hi! > > In r16-3414 libstdc++ changed ABI for (still experimental C++20) and uses > unordered value -128 instead of 2. Generally the change improved code > generation on all targets tested, see > https://gcc.gnu.org/pipermail/gcc-pa

Re: [PATCH] c++, contracts: Simplify contracts headers [NFC].

2025-09-02 Thread Jason Merrill
On 8/30/25 12:45 PM, Iain Sandoe wrote: A small amount of preparation for upstreaming the C++26 implementation. We need to add (and share) some APIs and then, at some point, remove the c++2a edition which was not adopted. Keeping the related material together is helpful at this stage. Tested on

Re: [PATCH 2/2] RISC-V: Always register vector built-in functions during LTO [PR110812]

2025-09-02 Thread Robin Dapp
LGTM and I just have a wording nit that was already there before your patch. When reading it I really wondered why we need to "pollute" the flags. Wouldn't a function that performs a "backup" make sense, analogous to ..._restore? And then rename the pollute function to something like enable_

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

2025-09-02 Thread Jonathan Wakely
On Tue, 26 Aug 2025 at 18:31, Nathan Myers wrote: > It also changes #if guards to mention the actual __cpp_lib_* > feature gated, not just the language version, for clarity. To expand on my previous mail about this part ... > --- a/libstdc++-v3/include/std/chrono > +++ b/libstdc++-v3/include/st

Re: [PATCH 1/2] c++: Update DECL_TLS_MODEL after processing a TLS variable

2025-09-02 Thread Jason Merrill
On 8/13/25 11:54 AM, H.J. Lu wrote: Set a tentative TLS model in grokvardecl 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. If the non-template problem is needing to recalculate the default a

[PATCH v1 2/2] AArch64: Add LUTv2 intrinsics

2025-09-02 Thread Karl Meakin
gcc/ChangeLog: * config/aarch64/aarch64-sme.md (@aarch64_sme_write_zt): New insn. (aarch64_sme_lut_zt): Likewise. * config/aarch64/aarch64-sve-builtins-shapes.cc (parse_type): New type format "%T". (struct luti_lane_zt_base): New function shape. (SHAPE): L

RE: [PATCH v2 3/3]middle-end: Use addhn for compression instead of inclusive OR when reducing comparison values

2025-09-02 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Tuesday, September 2, 2025 3:45 PM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd > Subject: RE: [PATCH v2 3/3]middle-end: Use addhn for compression instead of > inclusive OR when reducing comparison values > > On Tue, 2 Sep 2

Re: [PATCH v1 1/2] Match: Add form 5 of unsigned SAT_MUL for widen-mul

2025-09-02 Thread Richard Biener
On Tue, Sep 2, 2025 at 3:35 PM Li, Pan2 wrote: > > Thanks Richard for comments. > > > Are the inner (convert ..) around @0 and @1 necessary? The whole > > thing as written seems to match (long)(short)x * (long)(unsigned int)y > > for 'char' x and y? > > The gimple after wide-mul has 2 times conve

RE: [PATCH v1 1/2] Match: Add form 5 of unsigned SAT_MUL for widen-mul

2025-09-02 Thread Li, Pan2
Thanks Richard for comments. > Are the inner (convert ..) around @0 and @1 necessary? The whole > thing as written seems to match (long)(short)x * (long)(unsigned int)y > for 'char' x and y? The gimple after wide-mul has 2 times convert similar as below. 21[local count: 1073741824]:

Re: [PATCH v2 3/3] vect: Use strided loads for VMAT_STRIDED_SLP.

2025-09-02 Thread Richard Biener
On Tue, Sep 2, 2025 at 2:31 PM Robin Dapp wrote: > > >> So even though our strided loads do support signed strides, we cannot go > >> via > >> the > >>recognize gather > >> -> recognize strided offset > >> -> strided load > >> route because the initial signed-offset gather will be unsupported

Re: [PATCH] D: disable collect fork on Darwin

2025-09-02 Thread Iain Sandoe
cc-ing Rainer > On 2 Sep 2025, at 14:47, Iain Buclaw wrote: > > Excerpts from Iain Sandoe's message of September 1, 2025 6:23 pm: >> In use for 2 years or so on Darwin branches, OK for trunk? >> thanks >> Iain >> >> --- 8< --- >> >> The collect fork version has two issues on Darwin, first that

Re: [PATCH] RISC-V: Update Zba 'shNadd.uw' testcase.

2025-09-02 Thread Jeff Law
On 8/31/25 10:04 PM, Jiawei wrote: This patch update RISC-V Zba extension 'shNadd.uw' instruction generation. Supplemented the instruction generation detection of 'sh1add.uw' and 'sh3add.uw'. gcc/testsuite/ChangeLog: * gcc.target/riscv/zba-shadd.c: New test functions. I went ahead a

Re: [COMMITTED 26/30] ada: Do not install the support files of 128-bit types on 32-bit targets

2025-09-02 Thread Andreas Schwab
On Sep 02 2025, Eric Botcazou wrote: > What does the s-atopri.ads file point to in the 2 directories? They both point to s-atopri__32.ads. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely differen

Re: [PATCH] D: disable collect fork on Darwin

2025-09-02 Thread Iain Buclaw
Excerpts from Iain Sandoe's message of September 1, 2025 6:23 pm: > In use for 2 years or so on Darwin branches, OK for trunk? > thanks > Iain > > --- 8< --- > > The collect fork version has two issues on Darwin, first that it seems > to hang quite frequently and second that ___fork() is not avai

RE: [PATCH v2 3/3]middle-end: Use addhn for compression instead of inclusive OR when reducing comparison values

2025-09-02 Thread Richard Biener
On Tue, 2 Sep 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, September 2, 2025 3:08 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd > > Subject: RE: [PATCH v2 3/3]middle-end: Use addhn for compression instead of > > inclusi

Re: [PATCH] RISC-V: Fix is_vlmax_len_p and use for strided ops.

2025-09-02 Thread Jeff Law
On 9/2/25 5:49 AM, Robin Dapp wrote: Hi, This patch changes is_vlmax_len_p to handle VLS modes properly. Before we would check if len == GET_MODE_NUNITS (mode).  This works vor VLA modes but not necessarily for VLS modes.  We regularly have e.g. small VLS modes where LEN equals their number

Re: [PATCH v2] RISC-V: Handle overlap in expand_vec_perm PR121742.

2025-09-02 Thread Jeff Law
On 9/2/25 5:48 AM, Robin Dapp wrote: Hi, In a two-source gather we unconditionally overwrite target with the first gather's result already.  If op1 == target this clobbers the source operand for the second gather.  This patch uses a temporary in that case. Posting a v2 for the CI with the pr

Re: [PATCH] RISC-V: Add tt-ascalon-d8 pipeline description

2025-09-02 Thread Jeff Law
On 9/2/25 6:17 AM, Anton Blanchard wrote: Did you run Kito's pipeline checker script? I suspect it'll tell you you need a few more cases in your model. Essentially we have checking asserts that require every insn to have a mapping to a reservation. So someone could ask for code gen for

Re: [PATCH] tree-optimization/121753 - ICE with pattern breaking reduction constraints

2025-09-02 Thread Richard Biener
On Tue, 2 Sep 2025, Jakub Jelinek wrote: > On Tue, Sep 02, 2025 at 11:34:59AM +0200, Richard Biener wrote: > > > > Oops, now also to the list. > > If so, it needs to punt on anything that uses something more than once. > So, alg_add_factor and alg_sub_factor are always bad (so return NULL), > be

RE: [PATCH 1/3]middle-end: clear the user unroll flag if the cost model has overriden it

2025-09-02 Thread Richard Biener
On Tue, 2 Sep 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, September 2, 2025 1:44 PM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd > > Subject: Re: [PATCH 1/3]middle-end: clear the user unroll flag if the cost > > model h

Re: [PATCH] docs: Add NoOffload option flag to the internals manual

2025-09-02 Thread Richard Biener
On Tue, Sep 2, 2025 at 11:36 AM Andrew Stubbs wrote: > > Ping. OK. > On 31/07/2025 12:15, Andrew Stubbs wrote: > > The NoOffload flag was introduced recently (commit "Don't pass vector params > > through to offload targets"). > > > > gcc/ChangeLog: > > > > * doc/options.texi: Document NoOf

  1   2   >