[PATCH V2, 3/3] Add support for 1,024 bit DMF registers on a future PowerPC.

2025-11-13 Thread Michael Meissner
This patch is a prelimianry patch to add the full 1,024 bit dense math register (DMRs) for -mcpu=future. The MMA 512-bit accumulators map onto the top of the DMR register. This patch only adds the new 1,024 bit register support. It does not add support for any instructions that need 1,024 bit re

[PATCH V2, 2/3] Add support for dense math registers on a future PowerPC

2025-11-13 Thread Michael Meissner
The MMA subsystem added the notion of accumulator registers as an optional feature of ISA 3.1 (power10). In ISA 3.1, these accumulators overlapped with the VSX registers 0..31, but logically the accumulator registers were separate from the FPR registers. In ISA 3.1, it was anticipated that in fut

[PATCH V2, 1/3] Add wD constraint.

2025-11-13 Thread Michael Meissner
This patch adds a new constraint ('wD') that matches the accumulator registers that overlap with VSX registers 0..31 on power10. Future patches will add the support for a separate accumulator register class that will be used when the support for dense math registes is added. I have done bootstrap

[PATCH V2, 0/3] Add Dense Math support as a possible PowerPC extension

2025-11-13 Thread Michael Meissner
This patch is a minor modification of my previous patch that was necessary when I changed how -mcpu=future was supported. This patch requires at least the -mcpu=future patch to be installed. It would be nice if the 2nd patch in the -mcpu=future patchset was installed also before these patches are

[PATCH, V8, 2/2] Use vector pair load/store for -mcpu=future

2025-11-13 Thread Michael Meissner
In the development for the power10 processor, GCC did not enable using the load vector pair and store vector pair instructions when optimizing things like memory copy. This patch enables using those instructions if -mcpu=future is used. I have tested these patches on both big endian and little en

[PATCH, V8, 1/2] Add -mcpu=future to the PowerPC

2025-11-13 Thread Michael Meissner
This is version 8 of my patch to add -mcpu=future. I originally made a more complicated patch (V5) on September 22nd, 2025 that tried to do infrastructure cleanup as well as adding -mcpu=future. This patch is a more limited patch in that it just adds the -mcpu=future patch, and it does not do the

Re: [PATCH v2, FYI] [vxworks] wrap base/b_NULL.h to override NULL

2025-11-13 Thread Olivier Hainque
On Fri, 14 Nov 2025 at 02:06, Alexandre Oliva wrote: > On Nov 13, 2025, Olivier Hainque wrote: > > > As we discussed through another channel, the VxWorks bits are good for > me. > > Thanks! > > Thanks. I took the liberty of merging the ``#undef NULL`` you > subsequently added, so that the patch

[PATCH, V8, 0/2] Add -mcpu=future to the PowerPC

2025-11-13 Thread Michael Meissner
There are two patches in this patchset to add -mcpu=future to the PowerPC. It is simplified from my previous patches. The first patch adds the -mcpu=future option. The second patch enables using load vector pair and store vector pair instructions to optimize memory and string operations if -mcpu

[PATCH v2] libstdc++: Use _Bind_front_t/_Bind_back_t in bind_front/bind_back [PR122032]

2025-11-13 Thread Tomasz Kamiński
This patch changes the implementation of bind_front and bind_back to return a _Bind_front_t<_Bind_fn_t, ...> and _Bind_back_t<_Bind_fn_t, ...> respectively, replacing the previous lambda-based implementation. The prior use of a lambda caused non-conforming behavior with respect to C++23 [func.requi

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Martin Uecker
Am Donnerstag, dem 13.11.2025 um 20:41 + schrieb Qing Zhao: > > > On Nov 13, 2025, at 14:17, Martin Uecker wrote: > > > > Am Donnerstag, dem 13.11.2025 um 15:44 + schrieb Qing Zhao: > > > > > > > > > > > > > > > > > > > You would then check correctness of the attribute only when

Re: [PATCH] libstdc++: Optimize functor storage for transform views iterators.

2025-11-13 Thread Tomasz Kaminski
On Fri, Nov 14, 2025 at 4:16 AM Patrick Palka wrote: > On Thu, 13 Nov 2025, Tomasz Kamiński wrote: > > > The iterators for transform views (views::transform, > views::zip_transform, > > and views::adjacent_transform) now store a __detail::__func_handle > instead > > of a pointer to the view objec

Re: [PATCH 2/2] libstdc++: Use _Bind_front_t/_Bind_back_t in bind_front/bind_back [PR122032]

2025-11-13 Thread Tomasz Kaminski
On Fri, Nov 14, 2025 at 3:56 AM Patrick Palka wrote: > On Fri, 24 Oct 2025, Tomasz Kamiński wrote: > > > This patch changes the implementation of bind_front and bind_back > to > > return a _Bind_front_t<_Bind_fn_t, ...> and > _Bind_back_t<_Bind_fn_t, ...> > > respectively, replacing the previous

Re: [PATCH v1 1/2] Match: Simplify (T1)(a bit_op (T2)b) to (T1)a bit_op (T2)b

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 8:12 PM Andrew Pinski wrote: > > On Thu, Nov 13, 2025 at 7:45 PM wrote: > > > > From: Pan Li > > > > During the match pattern of SAT_U_MUL form 7, we found there is > > a pattern like below: > > > > (nop_convert)(a bit_op (convert b)) > > > > which result in the pattern m

Re: [PATCH v1 1/2] Match: Simplify (T1)(a bit_op (T2)b) to (T1)a bit_op (T2)b

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 7:45 PM wrote: > > From: Pan Li > > During the match pattern of SAT_U_MUL form 7, we found there is > a pattern like below: > > (nop_convert)(a bit_op (convert b)) > > which result in the pattern match of SAT_U_MUL complicated and > unintuitive. According to the suggestio

[PATCH v1 1/2] Match: Simplify (T1)(a bit_op (T2)b) to (T1)a bit_op (T2)b

2025-11-13 Thread pan2 . li
From: Pan Li During the match pattern of SAT_U_MUL form 7, we found there is a pattern like below: (nop_convert)(a bit_op (convert b)) which result in the pattern match of SAT_U_MUL complicated and unintuitive. According to the suggestion of Richard, we would like to simply it to blew: (conve

[PATCH v1 2/2] Test: Add test case for bit_op convert folding

2025-11-13 Thread pan2 . li
From: Pan Li Add test cases of all possible types of bit_op convert folding. To check there is no tree dump like below: _5 = (uint8_t) _2; return _5; gcc/testsuite/ChangeLog: * gcc.dg/tree-ssa/bit_op_cvt.1.c: New test. * gcc.dg/tree-ssa/bit_op_cvt.2.c: New test. *

[PATCH v1 0/2] Simplify (T1)(a bit_op (T2)b) to (T1)a bit_op (T1)b

2025-11-13 Thread pan2 . li
From: Pan Li We notice such pattern during the form 7 support of the SAT_U_MUL. So we would like to perform the simplify before that. The below test suites are passed for this patch: 1. The rv64gcv fully regression tests. 2. The x86 bootstrap tests. 3. The x86 fully regression tests. Pan Li (2)

Re: [PATCH] RISC-V: Add missing member for andes_25_tune_info.

2025-11-13 Thread KuanLin Chen
Thanks for your help :) Jeff Law 於 2025年11月14日 週五 上午11:28寫道: > > > > On 11/13/25 7:57 PM, Kuan-Lin Chen wrote: > > gcc/ChangeLog: > > > > * config/riscv/riscv.cc (andes_25_tune_info): Add prefer-agnostic. > Approved. I already had that in a change I'm testing here :-) > > Jeff

Re: [PATCH] RISC-V: Add missing member for andes_25_tune_info.

2025-11-13 Thread Jeff Law
On 11/13/25 7:57 PM, Kuan-Lin Chen wrote: gcc/ChangeLog: * config/riscv/riscv.cc (andes_25_tune_info): Add prefer-agnostic. Approved. I already had that in a change I'm testing here :-) Jeff

[PATCH] LoongArch: Optimize V4SImode vec_construct for load index length of two.

2025-11-13 Thread zhaozhou
Under the V4SImode, the vec_construct with the load index {0, 1, 0, 1} use vldrepl.d, the vec_construct with the load index {0, 1, 0, 0} use vldrepl.d and vshuf4i, reduced the usage of scalar load and vinsgr2vr. gcc/ChangeLog: * config/loongarch/lsx.md (lsx_vshuf4i_mem_w_0): Add template.

Re: [PATCH] libstdc++: Optimize functor storage for transform views iterators.

2025-11-13 Thread Patrick Palka
On Thu, 13 Nov 2025, Tomasz Kamiński wrote: > The iterators for transform views (views::transform, views::zip_transform, > and views::adjacent_transform) now store a __detail::__func_handle instead > of a pointer to the view object (_M_parent). > > The behavior of the __func_handle specialization

[PATCH] LoongArch: combine related slli operations.

2025-11-13 Thread zhaozhou
If SImode reg is continuous left shifted twice, combine related instruction to one. extsv_ashlsi3 combines the mov and shift operations into sign_extrace and shift, cause optimization template of slli.d + and + add.w => and + alsl.w fail to match. Add new template to match this optimization. (set

[PATCH] LoongArch: Fix operands[2] predicate of lsx_vreplvei_mirror.

2025-11-13 Thread zhaozhou
UNSPEC_LSX_VREPLVEI_MIRROR describes the mirroring operation that copies the lower 64 bits of a 128-bit register to the upper 64 bits. So in any mode, the value range of op2 can only be 0 or 1 for the vreplvei.d insn. gcc/ChangeLog: * config/loongarch/lsx.md: Fix predicate. --- gcc/confi

Re: [PATCH 2/2] libstdc++: Use _Bind_front_t/_Bind_back_t in bind_front/bind_back [PR122032]

2025-11-13 Thread Patrick Palka
On Fri, 24 Oct 2025, Tomasz Kamiński wrote: > This patch changes the implementation of bind_front and bind_back to > return a _Bind_front_t<_Bind_fn_t, ...> and _Bind_back_t<_Bind_fn_t, > ...> > respectively, replacing the previous lambda-based implementation. The prior > use > of a lambda cause

[PATCH] RISC-V: Add missing member for andes_25_tune_info.

2025-11-13 Thread Kuan-Lin Chen
gcc/ChangeLog: * config/riscv/riscv.cc (andes_25_tune_info): Add prefer-agnostic. --- gcc/config/riscv/riscv.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/config/riscv/riscv.cc b/gcc/config/riscv/riscv.cc index 5bb557faf65..efcf97b6bf6 100644 --- a/gcc/config/riscv/riscv.cc +

[PATCH] LoongArch: extract the base address to promote the combine of RTX.

2025-11-13 Thread zhaozhou
When use 256 bits vec for move src to dest, extract the base address what plus operation to promote the combine of RTX. gcc/ChangeLog: * config/loongarch/loongarch.cc: Extract plus operation. gcc/testsuite/ChangeLog: * gcc.target/loongarch/vector/lasx/lasx-struct-move.c: New tes

[PATCH] LoongArch: Optimize address calculation use alsl

2025-11-13 Thread zhaozhou
In some cases, the pre pass will separate the shift and add of shift+add+ld/st ins into different blocks, resulting in combine ldx/stx instead of alsl, but for consecutive reg+reg memory access instructions, this may cause read port conflicts and reduce efficiency. Try to directly generate alsl,

pushed r16-5267: [PATCH] Regenerate gcc/configure (Re: Buildbot (Sourceware): gcc - failed 'git diff ...' (failure) (master))

2025-11-13 Thread Xi Ruoyao
When I rebased r16-5226 I failed to notice the generated configure is different after r16-5138. gcc/ * configure: Regenerate. --- gcc/configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/configure b/gcc/configure index 83decfb738c..9d68bcd97a9 100755 --- a/gc

[PATCH] LoongArch: Optimize statement to use bstrins.{w|d}

2025-11-13 Thread Deng Jianbo
For statement (a << imm1) | (b & imm2), in case the imm2 equals to (1 << imm1) - 1, it can be optimized to use bstrins.{w|d} instruction. gcc/ChangeLog: * config/loongarch/loongarch.md (*bstrins_w_for_ior_ashift_and_extend): New template. (*bstrins_d_for_ior_ashift_and): N

Re: [PATCH] libstdc++: Optimize functor storage for transform views iterators.

2025-11-13 Thread Hewill Kang
+ template + requires (!is_const_v<_Un>) && is_same_v + constexpr explicit + __func_handle(__func_handle<_Un, __ft> __other) noexcept + : _M_ptr(__other._M_ptr) + { } Does this part need to be explicit? This looks like a const-conversion constructor to

[PATCH] LoongArch: Add more numbers supported for {x}vldi

2025-11-13 Thread Deng Jianbo
When the most significant bit of the 13 bit immediate value in LoongArch {x}vldi isntruction is set 1, it can generate different numbers based on the algorithm. This patch adds to support these numbers to be generated by {x}vldi instruction. gcc/ChangeLog: * config/loongarch/constraints.

Re: PING^5: [PATCH v2 1/3] Support symbol reference in jump label and jump table

2025-11-13 Thread H.J. Lu
On Fri, Nov 14, 2025 at 9:05 AM Andi Kleen wrote: > > On 2025-11-13 17:32, H.J. Lu wrote: > > On Wed, Oct 22, 2025 at 3:56 PM H.J. Lu wrote: > >> > >> On Thu, Sep 18, 2025 at 9:00 PM H.J. Lu wrote: > >> > > >> > On Mon, Aug 25, 2025 at 6:06 AM H.J. Lu wrote: > >> > > > >> > > On Thu, Jun 26, 20

Re:[pushed] [PATCH] LoongArch: Fix issue where data marked as GTY is cleaned up by ggc.

2025-11-13 Thread Lulu Cheng
Pushed to r16-5264. Thanks! 在 2025/11/10 下午3:38, zhaozhou 写道: As for GGC(GCC Garbage Collection), it's use gengtype tool to scan all source files contain the GTY mark, and generate gt-*.h files. GGC traversal these file to find gt_root node and marks these objects that directly or indirectly re

Re: [pushed][PATCH] LoongArch: Fix predicate for symbolic_pcrel_offset_operand.

2025-11-13 Thread Lulu Cheng
Pushed to r16-5265. Thanks! 在 2025/11/10 下午3:20, zhaozhou 写道: The predicate checks if the operand is PLUS(symbol_ref, const_int), but the match (match_operand 0/1) is not equal XEXP(op, 0/1). It should be adjusted to use match_test and pass XEXP(op, 0/1) into the constraint function. gcc/Chang

Re:[pushed] [PATCH] LoongArch: optimize half of vector copy for V4DFmode.

2025-11-13 Thread Lulu Cheng
Pushed to r16-5266. Thanks! 在 2025/11/10 下午3:04, zhaozhou 写道: Repalce xvpermi to xvbsrl when vector of V4DFmode high 64 bits copy to low 64 bits, reduce 2 insn delays. gcc/ChangeLog: * config/loongarch/lasx.md (lasx_xvbsrl_d_f): New template. * config/loongarch/loongarch.cc (e

[PATCH v2, FYI] [vxworks] wrap base/b_NULL.h to override NULL

2025-11-13 Thread Alexandre Oliva
On Nov 13, 2025, Olivier Hainque wrote: > As we discussed through another channel, the VxWorks bits are good for me. > Thanks! Thanks. I took the liberty of merging the ``#undef NULL`` you subsequently added, so that the patch that hit the trunk already gets that right. [vxworks] wrap base/b_

Re: PING^5: [PATCH v2 1/3] Support symbol reference in jump label and jump table

2025-11-13 Thread Andi Kleen
On 2025-11-13 17:32, H.J. Lu wrote: On Wed, Oct 22, 2025 at 3:56 PM H.J. Lu wrote: On Thu, Sep 18, 2025 at 9:00 PM H.J. Lu wrote: > > On Mon, Aug 25, 2025 at 6:06 AM H.J. Lu wrote: > > > > On Thu, Jun 26, 2025 at 3:32 PM H.J. Lu wrote: > > > > > > On Thu, May 8, 2025 at 11:11 AM H.J. Lu wr

Re: [PATCH] Fortran: procedure targets in derived-type constructors [PR117070]

2025-11-13 Thread Jerry D
On 11/13/25 1:56 PM, Harald Anlauf wrote: Dear all, this patch addresses the issue that a procedure may appear in a derived-type constructor as target of a procedure pointer. Adjusting check_constructor solves the rejects-valid. While working on an extended testcase, I found that there is a res

Re: [PATCH] ipa/122663 - fix ICE with stmt removal during IPA modification

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 12:17 PM Andrew Pinski wrote: > > On Thu, Nov 13, 2025 at 6:01 AM Richard Biener wrote: > > > > We currently remove stmts inside of a FOR_EACH_IMM_USE_STMT iteration > > which can be problematical. The following adjusts purge_all_uses > > to gather all stmts to remove and

PING^5: [PATCH v2 1/3] Support symbol reference in jump label and jump table

2025-11-13 Thread H.J. Lu
On Wed, Oct 22, 2025 at 3:56 PM H.J. Lu wrote: > > On Thu, Sep 18, 2025 at 9:00 PM H.J. Lu wrote: > > > > On Mon, Aug 25, 2025 at 6:06 AM H.J. Lu wrote: > > > > > > On Thu, Jun 26, 2025 at 3:32 PM H.J. Lu wrote: > > > > > > > > On Thu, May 8, 2025 at 11:11 AM H.J. Lu wrote: > > > > > > > > > >

PING^3: [PATCH v3] Use incoming small integer argument value as if promoted

2025-11-13 Thread H.J. Lu
On Wed, Oct 22, 2025 at 3:55 PM H.J. Lu wrote: > > On Thu, Sep 18, 2025 at 9:01 PM H.J. Lu wrote: > > > > On Mon, Aug 25, 2025 at 5:59 AM H.J. Lu wrote: > > > > > > On Fri, Jun 27, 2025 at 05:53:57AM +0800, H.J. Lu wrote: > > > > Here is the v3 patch. The difference from v2 is to use > > > > >

PING^2: [PATCH] Add TARGET_VOLATILE_MEM_OK_IN_INSN

2025-11-13 Thread H.J. Lu
On Wed, Nov 5, 2025 at 3:12 PM H.J. Lu wrote: > > On Tue, Oct 28, 2025 at 10:31 AM H.J. Lu wrote: > > > > On Tue, Oct 28, 2025 at 5:53 AM H.J. Lu wrote: > > > > > > On Tue, Oct 28, 2025 at 12:04 AM Jeff Law wrote: > > > > > > > > > > > > > > > > On 10/27/25 2:37 AM, Richard Biener wrote: > > >

PING: [PATCH v5] c/c++: Make stack protection guard an internal symbol

2025-11-13 Thread H.J. Lu
On Sun, Oct 26, 2025 at 10:29 AM H.J. Lu wrote: > > On Sat, Oct 25, 2025 at 4:42 PM H.J. Lu wrote: > ... > > Here is the v4 patch. > > > > Add a new target hook, stack_protect_guard_symbol, to support the user > > provided stack protection guard as an internal symbol. If the hook is > > true, >

PING^3: [PATCH v3] Ignore tls_model attribute in TLS access optimization

2025-11-13 Thread H.J. Lu
On Wed, Oct 22, 2025 at 3:53 PM H.J. Lu wrote: > > On Thu, Sep 18, 2025 at 8:40 PM H.J. Lu wrote: > > > > On Wed, Sep 10, 2025 at 11:11 AM H.J. Lu wrote: > > > > > > Since C, C++, and Fortran front-ends now set the TLS access model after > > > a variable has been fully processed, not in the midd

Re: [PATCH] [vxworks] wrap base/b_NULL.h to override NULL

2025-11-13 Thread Olivier Hainque
Hi Alex, As we discussed through another channel, the VxWorks bits are good for me. Thanks! On Fri, 9 May 2025 at 04:39, Alexandre Oliva wrote: > > Some versions of vxworks define NULL to __nullptr in C++, assuming > C++11, which breaks at least a number of analyzer tests that get > exercised i

[committed] c++/modules: Add testcase for lookup of hidden friend [PR122646]

2025-11-13 Thread Nathaniel Shead
Tested on x86_64-pc-linux-gnu, pushing as obvious. -- >8 -- r16-5173-g52a24bcec9388a fixed this testcase, but I think it's still worthwhile adding this reduced test for it to modules.exp so we don't need to rely on the libstdc++ tests for it yet. PR c++/122646 gcc/testsuite/ChangeLog:

[PATCH] Fortran: procedure targets in derived-type constructors [PR117070]

2025-11-13 Thread Harald Anlauf
Dear all, this patch addresses the issue that a procedure may appear in a derived-type constructor as target of a procedure pointer. Adjusting check_constructor solves the rejects-valid. While working on an extended testcase, I found that there is a resolution issue in gfortran when trying to us

Re: [PATCH v3] aarch64: Add support for preserve_none function attribute [PR target/118328]

2025-11-13 Thread Andrew Pinski
On Thu, Nov 6, 2025 at 7:07 AM Alfie Richards wrote: > > Hi All, > > Updated this patch to use r15 for argument passing (except on windows targets) > which I missed. > > Updated the wording of the documentation and a comment slightly as it had > caused > some confusion. > > Reg tested on aarch64-

Re: [PATCH 04/12] mergephi: Move checks from pass_merge_phi::execute to remove_forwarder_block_with_phi

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 5:25 AM Richard Biener wrote: > > On Thu, Nov 13, 2025 at 6:02 AM Andrew Pinski > wrote: > > > > This moves the checks that were in pass_merge_phi::execute into > > remove_forwarder_block_with_phi > > or tree_forwarder_block_p to make easier to merge > > remove_forwarder

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Qing Zhao
> On Nov 13, 2025, at 14:17, Martin Uecker wrote: > > Am Donnerstag, dem 13.11.2025 um 15:44 + schrieb Qing Zhao: >> >>> On Nov 13, 2025, at 01:32, Martin Uecker wrote: >>> >>> Am Mittwoch, dem 12.11.2025 um 22:07 + schrieb Joseph Myers: On Wed, 12 Nov 2025, Qing Zhao wrote: >>>

Re: [PATCH] RISC-V: Fix a non null-terminated string.

2025-11-13 Thread Jeff Law
On 11/12/25 12:34 AM, Kuan-Lin Chen wrote: Fix the random error in gcc.target/riscv/target-attr-06.c. gcc/ChangeLog: * config/riscv/riscv-target-attr.cc (riscv_process_target_str): Clean the final byte of str_to_check. Thanks a ton for tracking this down! It's been bouncing

Re: [committed] Handle shift-pairs in ext-dce for targets without zero/sign extension insns

2025-11-13 Thread Andreas Schwab
On Nov 13 2025, Jeff Law wrote: > + /* We decided to turn do the optimization but allow it to be rejected for > + bisection purposes. */ s/turn// perhaps? -- Andreas Schwab, [email protected] GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for somethi

Re: [PATCH] ipa/122663 - fix ICE with stmt removal during IPA modification

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 6:01 AM Richard Biener wrote: > > We currently remove stmts inside of a FOR_EACH_IMM_USE_STMT iteration > which can be problematical. The following adjusts purge_all_uses > to gather all stmts to remove and remove them in reverse order > afterwards which also better deals

[committed] Handle shift-pairs in ext-dce for targets without zero/sign extension insns

2025-11-13 Thread Jeff Law
This is more prep work for revamping the zero/sign extension patterns on RISC-V to avoid the need for define_insn_and_splits. The core issue at hand is for the base ISA we don't have the full set of sign/zero extensions. So what's been done so far is to pretend we do via a define_insn_and_spl

Re: [PATCH] libstdc++: container erasure overloads (P2077) [PR117404]

2025-11-13 Thread Nathan Myers
Thank you. On 11/12/25 4:12 AM, Tomasz Kaminski wrote: On Sun, Nov 9, 2025 at 8:58 AM Nathan Myers > wrote: Implement C++23 P2077R3 "Heterogeneous erasure overloads for associative containers". Adds template overloads for members erase and extract to addr

[PATCH] sccp: Fix order of gimplification, removal of the phi and constant prop in sccp (3rd time) [PR122637]

2025-11-13 Thread Andrew Pinski
This is 3rd (and hopefully last) time to fix the order here. The previous times were r16-5093-g77e10b47f25d05 and r16-4905-g7b9d32aa2ffcb5. The order before these patches were: * removal of phi * propagate constants * gimplification of expr * create assignment * rewrite to undefined * add stmts to

Re: [PATCH] fortran: correctly handle optional allocatable dummy arguments

2025-11-13 Thread Harald Anlauf
Hi Yuao, Am 13.11.25 um 15:52 schrieb Yuao Ma: Hi Harald, On Thu, Nov 13, 2025 at 3:59 AM Harald Anlauf wrote: this looks basically fine to me. Two comments from my side: - please use distinct error stop codes (e.g.: 1, 2) in different places Done. - you could add a further sub-case to

Re: [PATCH] rtl-optimization: Fix BB edge ordering [PR122675]

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 11:30 AM Dimitar Dimitrov wrote: > > Starting with r16-4438-ga93f80feeef744, the edges started to be sorted > in ascending order. Thus the most likely branches were deprioritized > instead of optimized to fallthroughs. > > Fix by restoring the sorting order prior to r16-44

[PATCH] rtl-optimization: Fix BB edge ordering [PR122675]

2025-11-13 Thread Dimitar Dimitrov
Starting with r16-4438-ga93f80feeef744, the edges started to be sorted in ascending order. Thus the most likely branches were deprioritized instead of optimized to fallthroughs. Fix by restoring the sorting order prior to r16-4438-ga93f80feeef744. There are no regressions for C and C++ on x86_64

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Martin Uecker
Am Donnerstag, dem 13.11.2025 um 15:44 + schrieb Qing Zhao: > > > On Nov 13, 2025, at 01:32, Martin Uecker wrote: > > > > Am Mittwoch, dem 12.11.2025 um 22:07 + schrieb Joseph Myers: > > > On Wed, 12 Nov 2025, Qing Zhao wrote: > > > > > > > > There are the various extensions (-fms-exten

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Qing Zhao
> On Nov 13, 2025, at 13:38, Joseph Myers wrote: > > On Thu, 13 Nov 2025, Qing Zhao wrote: > >>> Maybe this suggests that, as in other cases, an anonymous structure or >>> union involving counted_by should actually be required to be valid without >>> reference to the containing struct or uni

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Richard Biener
On Thu, Nov 13, 2025 at 7:58 PM Andrew Pinski wrote: > > On Thu, Nov 13, 2025 at 10:25 AM Artemiy Volkov > wrote: > > > > On Thu, Nov 13, 2025 at 09:23:58AM -0800, Andrew Pinski wrote: > > > On Thu, Nov 13, 2025 at 8:56 AM Artemiy Volkov > > > wrote: > > > > > > > > Introduced in r16-5042-g470

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Richard Biener
On Thu, Nov 13, 2025 at 7:27 PM Artemiy Volkov wrote: > > On Thu, Nov 13, 2025 at 09:23:58AM -0800, Andrew Pinski wrote: > > On Thu, Nov 13, 2025 at 8:56 AM Artemiy Volkov > > wrote: > > > > > > Introduced in r16-5042-g470411f44f51d9, this testcase fails on > > > AdvSIMD-less AArch32 configurati

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 10:25 AM Artemiy Volkov wrote: > > On Thu, Nov 13, 2025 at 09:23:58AM -0800, Andrew Pinski wrote: > > On Thu, Nov 13, 2025 at 8:56 AM Artemiy Volkov > > wrote: > > > > > > Introduced in r16-5042-g470411f44f51d9, this testcase fails on > > > AdvSIMD-less AArch32 configurat

[PATCH] g++: Fix false positive with -Wunused

2025-11-13 Thread Lucas Chollet
The patch fixes a bug in the detection of the usage of static variables inside generic lambdas. It does so by forcing the instantiation of generic lambdas within their enclosing scope. This ensures that the scope's static variables usage is computed correctly. Signed-off-by: Lucas Chollet --- Hey

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Joseph Myers
On Thu, 13 Nov 2025, Qing Zhao wrote: > > Maybe this suggests that, as in other cases, an anonymous structure or > > union involving counted_by should actually be required to be valid without > > reference to the containing struct or union after all - > > So, you mean, we should not support the

[PATCH] libstdc++: Optimize functor storage for transform views iterators.

2025-11-13 Thread Tomasz Kamiński
The iterators for transform views (views::transform, views::zip_transform, and views::adjacent_transform) now store a __detail::__func_handle instead of a pointer to the view object (_M_parent). The behavior of the __func_handle specialization depends on the _FunctorType template parameter: * _Fun

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Artemiy Volkov
On Thu, Nov 13, 2025 at 09:23:58AM -0800, Andrew Pinski wrote: > On Thu, Nov 13, 2025 at 8:56 AM Artemiy Volkov wrote: > > > > Introduced in r16-5042-g470411f44f51d9, this testcase fails on > > AdvSIMD-less AArch32 configurations, likely as well as on other targets > > without vector support; thus

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Artemiy Volkov
On Thu, Nov 13, 2025 at 06:24:01PM +0100, Christophe Lyon wrote: > > > On 11/13/25 17:49, Artemiy Volkov wrote: > > Introduced in r16-5042-g470411f44f51d9, this testcase fails on > > AdvSIMD-less AArch32 configurations, likely as well as on other targets > > without vector support; thus, require

[COMMITED] lto/122603: Fix missing null check with toplevel_node

2025-11-13 Thread Michal Jires
Tested and committed as obvious. --- I missed a null check for asm_node when introducing toplevel_node. PR lto/122603 gcc/lto/ChangeLog: * lto-partition.cc (split_partition_into_nodes): Null check for possible asm_node. gcc/testsuite/ChangeLog: * gcc.dg/lto/

Re: [PATCH] cfgloop: Modify loop_exits_{to, from}_bb_p return type to edge

2025-11-13 Thread Richard Biener
> Am 13.11.2025 um 18:30 schrieb Andrew Pinski : > > On Thu, Nov 13, 2025 at 9:01 AM Victor Do Nascimento > wrote: >> >> Given that when finding whether the predicate in question is satisfied >> or not we already do the heavy-lifting of identifying the specific >> edge that matches the parti

[wwwdocs][committed] projects/gomp/: Add link to just released OpenMP TR14

2025-11-13 Thread Tobias Burnus
OpenMP TR14 has now been uploaded, let's link to it (PDF +https://www.openmp.org/specifications/ ) See attachment. There is also a planned updated example document and, new, an OpenMP 6.0 errata document (fixes are also in TR14). That's live athttps://gcc.gnu.org/projects/gomp/ which also lists

Re: [PATCH] cfgloop: Modify loop_exits_{to, from}_bb_p return type to edge

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 9:01 AM Victor Do Nascimento wrote: > > Given that when finding whether the predicate in question is satisfied > or not we already do the heavy-lifting of identifying the specific > edge that matches the particular criterion, it is wasteful to throw > the edge information a

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Christophe Lyon
On 11/13/25 17:49, Artemiy Volkov wrote: Introduced in r16-5042-g470411f44f51d9, this testcase fails on AdvSIMD-less AArch32 configurations, likely as well as on other targets without vector support; thus, require it via dg-require-effective-target. Since this testcase includes stdint.h, requi

Re: [PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Andrew Pinski
On Thu, Nov 13, 2025 at 8:56 AM Artemiy Volkov wrote: > > Introduced in r16-5042-g470411f44f51d9, this testcase fails on > AdvSIMD-less AArch32 configurations, likely as well as on other targets > without vector support; thus, require it via dg-require-effective-target. > Since this testcase inclu

Re: [PATCH 0/4] arm: fix MVE scalar shift intrinsics [PR122216]

2025-11-13 Thread Richard Earnshaw (foss)
On 13/11/2025 09:17, Christophe Lyon wrote: > This series fixes the support for 64-bit scalar shifts with MVE, by > fixing the patterns and the intrinsics definitions. > > It was already approved by Richard on the forge as part of > https://forge.sourceware.org/gcc/gcc-TEST/pulls/121 > > I extrac

[PATCH] cfgloop: Modify loop_exits_{to, from}_bb_p return type to edge

2025-11-13 Thread Victor Do Nascimento
Given that when finding whether the predicate in question is satisfied or not we already do the heavy-lifting of identifying the specific edge that matches the particular criterion, it is wasteful to throw the edge information away, only to potentially have to recalculate it when true is returned.

[PATCH] gcc/testsuite: adjust tree-ssa/forwprop-43.c

2025-11-13 Thread Artemiy Volkov
Introduced in r16-5042-g470411f44f51d9, this testcase fails on AdvSIMD-less AArch32 configurations, likely as well as on other targets without vector support; thus, require it via dg-require-effective-target. Since this testcase includes stdint.h, require that as well. Regtested on arm-gnueabihf w

Re: [RFC 3/9] Implement recording/getting of mask/length for BB SLP

2025-11-13 Thread Christopher Bazley
On 11/11/2025 13:37, Richard Biener wrote: On Mon, 10 Nov 2025, Christopher Bazley wrote: On 10/11/2025 16:13, Christopher Bazley wrote: On 10/11/2025 14:59, Christopher Bazley wrote: On 07/11/2025 13:57, Richard Biener wrote: On Wed, 5 Nov 2025, Christopher Bazley wrote: On 28/10/2025 1

[PATCH 13/13] vect: Add uncounted loop unit tests

2025-11-13 Thread Victor Do Nascimento
Original got lost in the mail, resending. --- gcc/testsuite/ChangeLog: * gcc.dg/vect/vect-early-break_40.c: Fix. * gcc.dg/vect/vect-uncounted-1.c: New. * gcc.dg/vect/vect-uncounted-2.c: Likewise. * gcc.dg/vect/vect-uncounted-3.c: Likewise. * gcc.d

Re: [PATCH v3 2/3] aarch64: mingw: Make long double 64 bit

2025-11-13 Thread Saurabh Jha
On 11/13/2025 7:52 AM, Andrew Pinski wrote: On Wed, Nov 12, 2025 at 11:50 PM Andrew Pinski wrote: On Wed, Nov 12, 2025 at 11:30 PM Evgeny Karpov wrote: Saurabh Jha wrote: In v3, removed libgfortran changes in response to this comment: https://forge.sourceware.org/gcc/gcc-TEST/pulls/118#

[committed][RISC-V][PR rtl-optimization/122627] Yet another fix in IRA equivalence array handling

2025-11-13 Thread Jeff Law
Yup, yet another out of bounds access into the equivalence array. In this case we had an out of bounds write, which corrupted the heap leading to the fault. Given this is the 3rd such issue in this space in recent history and the second in this loop within LRA within a week or so, I looked fo

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Qing Zhao
> On Nov 13, 2025, at 01:32, Martin Uecker wrote: > > Am Mittwoch, dem 12.11.2025 um 22:07 + schrieb Joseph Myers: >> On Wed, 12 Nov 2025, Qing Zhao wrote: >> There are the various extensions (-fms-extensions / -fplan9-extensions) to consider as well, but it might be reasonable

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

2025-11-13 Thread Jonathan Wakely
On Thu, 13 Nov 2025 at 15:15, Yuao Ma wrote: > > On Wed, Nov 12, 2025 at 12:26 AM Jonathan Wakely wrote: > > > > On Sun, 02 Nov 2025 at 15:45 +0800, Yuao Ma wrote: > > >Hi all, > > > > > >This patch implements paper P3223R2, which adds a new overload to > > >std::istream::ignore for char_type. >

Re: [PATCH] C: fix issues when supporting counted_by fields in anonymous structure/unions [PR122495, PR122496]

2025-11-13 Thread Qing Zhao
> On Nov 12, 2025, at 17:07, Joseph Myers wrote: > > On Wed, 12 Nov 2025, Qing Zhao wrote: > >>> There are the various extensions (-fms-extensions / -fplan9-extensions) to >>> consider as well, but it might be reasonable to say that only genuinely >>> anonymous struct / union members get the

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

2025-11-13 Thread Yuao Ma
On Wed, Nov 12, 2025 at 12:26 AM Jonathan Wakely wrote: > > On Sun, 02 Nov 2025 at 15:45 +0800, Yuao Ma wrote: > >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_trait

[PATCH] build: Save/restore CXXFLAGS for zstd tests

2025-11-13 Thread Rainer Orth
I recently encountered a bootstrap failure on trunk caused by the fact that an older out-of-tree version of ansidecl.h was found before the in-tree one in $top_srcdir/include, so some macros from that header that are used in gcc weren't defined. The out-of-tree version was located in $ZSTD_INC (-I

Re: [PATCH] fortran: correctly handle optional allocatable dummy arguments

2025-11-13 Thread Yuao Ma
Hi Harald, On Thu, Nov 13, 2025 at 3:59 AM Harald Anlauf wrote: > this looks basically fine to me. > > Two comments from my side: > > - please use distinct error stop codes (e.g.: 1, 2) in different places > Done. > - you could add a further sub-case to complete the testing by adding >befor

Re: [PATCH v2] c, plugin: Add c_parse_component_ref callback

2025-11-13 Thread Jasper Niebuhr
I haven’t received input from any plugin experts yet. I tried to find additional people to CC, but the MAINTAINERS file doesn’t list anyone currently responsible for plugin-related areas. Though, to clarify: this patch does not modify the plugin API itself. It only introduces a C-frontend callback

Re: [RFC 7/9] Update constant creation for BB SLP with predicated tails

2025-11-13 Thread Christopher Bazley
On 13/11/2025 13:13, Christopher Bazley wrote: On 12/11/2025 10:36, Richard Sandiford wrote: As a general comment, we do already support constructors of variable-length vectors, thanks to Tejas's earlier ACLE work. For example: https://godbolt.org/z/Eqd8sM4cv .  The quality of the output is a

Re: [RFC 3/9] Implement recording/getting of mask/length for BB SLP

2025-11-13 Thread Christopher Bazley
On 12/11/2025 14:38, Richard Biener wrote: On Tue, 11 Nov 2025, Christopher Bazley wrote: On 07/11/2025 13:53, Richard Biener wrote: On Thu, 6 Nov 2025, Christopher Bazley wrote: On 05/11/2025 12:25, Richard Biener wrote: On Tue, 4 Nov 2025, Christopher Bazley wrote: On 28/10/2025 13:29

[committed] libstdc++: Fix std::forward_list::assign assignable check [PR122661]

2025-11-13 Thread Jonathan Wakely
The std::is_assignable check should test for assignment to an lvalue, not an rvalue. libstdc++-v3/ChangeLog: PR libstdc++/122661 * include/bits/forward_list.h (forward_list::assign(I, I)): Fix value category in is_assignable check. * testsuite/23_containers/forward

Re: [PATCH] Fix memory leak in pass_x86_cse

2025-11-13 Thread Uros Bizjak
On Thu, Nov 13, 2025 at 3:21 PM Richard Biener wrote: > > The following makes sure to delete the loads we previously allocated > with new. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > OK? OK. Thanks, Uros. > > Thanks, > Richard. > > gcc/ > * config/i386/i386-features.cc

[PATCH] Fix memory leak in pass_x86_cse

2025-11-13 Thread Richard Biener
The following makes sure to delete the loads we previously allocated with new. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? Thanks, Richard. gcc/ * config/i386/i386-features.cc (pass_x86_cse::x86_cse): Delete loads. --- gcc/config/i386/i386-features.cc | 3 +++ 1 fi

RE: [PATCH 1/2]middle-end: add target hook for isel

2025-11-13 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: 13 November 2025 13:16 > To: Tamar Christina > Cc: [email protected]; nd > Subject: Re: [PATCH 1/2]middle-end: add target hook for isel > > On Thu, 13 Nov 2025, Tamar Christina wrote: > > > This adds a new target hook to gimple-

Re: [PATCH 12/12] Merge remove_forwarder_block_with_phi into remove_forwarder_block

2025-11-13 Thread Richard Biener
On Thu, Nov 13, 2025 at 5:57 AM Andrew Pinski wrote: > > This is the last cleanup in this area. Merges the splitting functionality > of remove_forwarder_block_with_phi into remove_forwarder_block. > Now mergephi still has the ability to split the edges when merging the > forwarder > block with a

Re: [PATCH 11/12] cfgcleanup: Support merging forwarder blocks with phis [PR122493]

2025-11-13 Thread Richard Biener
On Thu, Nov 13, 2025 at 6:10 AM Andrew Pinski wrote: > > This adds support for merging forwarder blocks with phis in cleanupcfg. > This patch might seem small but that is because the previous patches were > done to build up to make it easier to add this support. > > There is still one more patch t

[COMMITTED] doc: Fix errors with makeinfo 4.8 [PR122638]

2025-11-13 Thread Rainer Orth
When building trunk on Mac OS X 10.13 with the bundled makeinfo 4.8, I ran into a couple of errors: gcc/doc/install.texi:2675: @option expected braces. gcc/doc/install.texi:2675: Misplaced {. gcc/doc/install.texi:2675: Misplaced }. gcc/doc/install.texi:2675: @code missing close brace. gcc/fortran

Re: [PATCH 04/12] mergephi: Move checks from pass_merge_phi::execute to remove_forwarder_block_with_phi

2025-11-13 Thread Richard Biener
On Thu, Nov 13, 2025 at 6:02 AM Andrew Pinski wrote: > > This moves the checks that were in pass_merge_phi::execute into > remove_forwarder_block_with_phi > or tree_forwarder_block_p to make easier to merge > remove_forwarder_block_with_phi with remove_forwarder_block. > This also simplifies the

Re: [PATCH] driver: Support very long command lines via temporary files [PR111527]

2025-11-13 Thread Sunil Kumar Dora
On 10/29/2025 10:56 PM, Joseph Myers wrote: CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. On Mon, 27 Oct 2025,[email protected] wrote: + fwrite (data_to_writ

  1   2   >