Re: [PATCH] x86: Add *one_cmplqi_ext_2

2025-08-04 Thread Uros Bizjak
On Mon, Aug 4, 2025 at 11:05 PM H.J. Lu wrote: > > On Mon, Aug 4, 2025 at 8:50 AM Richard Sandiford > wrote: > > > > Uros Bizjak writes: > > > On Sat, Aug 2, 2025 at 8:56 PM H.J. Lu wrote: > > >> > > >> On Fri, Aug 1, 2025 at 10:32 PM Uros Bizjak wrote: > > >> > > > >> > On Sat, Aug 2, 2025 at

Re: [PATCH v2 3/8] libstdc++: Improve low-rank layout_{left, right}::stride.

2025-08-04 Thread Tomasz Kaminski
I think I will have a few additional suggestions on how we could use it here, and I think it would be a separate commit on top of this series. So, I will only add "Precondition" comments to this PR. On Mon, Aug 4, 2025 at 7:57 PM Luc Grosheintz wrote: > > > On 8/4/25 17:26, Tomasz Kaminski wrot

[pushed] doc: Mark up function name in installation docs

2025-08-04 Thread Gerald Pfeifer
gcc: PR target/69374 * doc/install.texi (Configuration): Mark up atexit as code. --- gcc/doc/install.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index f3f14458e4b..64c1217e587 100644 --- a/gcc/doc/install.

Re: [PATCH] Use regular libdir/includedir in libgcc Makefiles

2025-08-04 Thread John Ericson
On Mon, Aug 4, 2025, at 4:02 PM, Joseph Myers wrote: > On Sun, 3 Aug 2025, John Ericson wrote: > > > > and "get those settings passed down from top level" is one plausible > > > end state - sharing logic implicitly that way rather than expanding it > > > all locally in each target library config

Re: [PATCH] x86: Add *one_cmplqi_ext_2

2025-08-04 Thread H.J. Lu
On Mon, Aug 4, 2025 at 3:28 PM H.J. Lu wrote: > > On Mon, Aug 4, 2025 at 2:04 PM H.J. Lu wrote: > > > > On Mon, Aug 4, 2025 at 8:50 AM Richard Sandiford > > wrote: > > > > > > Uros Bizjak writes: > > > > On Sat, Aug 2, 2025 at 8:56 PM H.J. Lu wrote: > > > >> > > > >> On Fri, Aug 1, 2025 at 10:

[PATCH] Use x86 GFNI for vectorized constant byte shifts/rotates

2025-08-04 Thread Andi Kleen
From: Andi Kleen The GFNI AVX gf2p8affineqb instruction can be used to implement vectorized byte shifts or rotates. This patch uses them to implement shift and rotate patterns to allow the vectorizer to use them. Previously AVX couldn't do rotates (except with XOP) and had to handle 8 bit shifts

Re: [PATCH] libgfortran: add fallback for trigonometric pi-based functions

2025-08-04 Thread Yuao Ma
On 8/5/2025 4:05 AM, Joseph Myers wrote: On Sun, 3 Aug 2025, Yuao Ma wrote: By the way, could you please take another look at the libquadmath update? https://inbox.sourceware.org/fortran/kl1pr0601mb4291e1457dc09fe3aa6652c884...@kl1pr0601mb4291.apcprd06.prod.outlook.com/ Using the script

Re: [PATCH] x86: Add *one_cmplqi_ext_2

2025-08-04 Thread H.J. Lu
On Mon, Aug 4, 2025 at 2:04 PM H.J. Lu wrote: > > On Mon, Aug 4, 2025 at 8:50 AM Richard Sandiford > wrote: > > > > Uros Bizjak writes: > > > On Sat, Aug 2, 2025 at 8:56 PM H.J. Lu wrote: > > >> > > >> On Fri, Aug 1, 2025 at 10:32 PM Uros Bizjak wrote: > > >> > > > >> > On Sat, Aug 2, 2025 at

[PATCH 8/8] aarch64: Use cc when CB/CBB/CBH is out-of-range

2025-08-04 Thread Richard Henderson
Middle distance branches between 1KiB and 1MiB may be implemented with cmp+branch instead of branch+branch. gcc: * config/aarch64/aarch64.cc (*aarch64_cb): Fall back to cmp/cmn + bcond if !far_branch. Adjust far_branch to 1MiB. (*aarch64_cb, operands[1])" { -

[PATCH 6/8] aarch64: Add cc clobber to compare-and-branch patterns

2025-08-04 Thread Richard Henderson
Some of the compare-and-branch patterns rely on CC for scratch in some of the alternative expansions. This is fine, because when the combined compare-and-branch patterns are formed by combine, we will be eliminating a write to CC, so CC is dead anyway. Standardize on the cc clobber for all such p

[PATCH 7/8] aarch64: Consider TARGET_CMPBR in rtx costs

2025-08-04 Thread Richard Henderson
gcc: * config/aarch64/aarch64.cc (aarch64_if_then_else_costs): Use aarch64_cb_rhs to match CB insns. --- gcc/config/aarch64/aarch64.cc | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index ff9243ea732..df01ef3fe

[PATCH 5/8] aarch64: Use aarch64_gen_compare_zero_and_branch in aarch64_restore_za

2025-08-04 Thread Richard Henderson
Do not directly expand a pattern from aarch64.md; use the helper function provided. gcc: * config/aarch64/aarch64.cc (aarch64_gen_compare_zero_and_branch): Export. * config/aarch64/aarch64-protos.h (aarch64_gen_compare_zero_and_branch): Declare it. * config/

[PATCH 4/8] aarch64: Disable TARGET_CMPBR with aarch64_track_speculation

2025-08-04 Thread Richard Henderson
With -mtrack-speculation, CC_REGNUM must be used at every conditional branch. gcc: * config/aarch64/aarch64.h (TARGET_CMPBR): False when aarch64_track_speculation is true. --- gcc/config/aarch64/aarch64.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcc

[PATCH 2/8] aarch64: Fix spelling of BRANCH_LEN_N_1KiB

2025-08-04 Thread Richard Henderson
One kilobyte not one kilobit. gcc: * config/aarch64/aarch64.md (BRANCH_LEN_N_1KiB): Rename from BRANCH_LEN_N_1Kib. --- gcc/config/aarch64/aarch64.md | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/config/aarch64/aarch64.md b/gcc/confi

[PATCH 3/8] aarch64: Drop cbranch4 expander

2025-08-04 Thread Richard Henderson
If we implement bare QI/HImode cbranch, movcc will ask aarch64_gen_compare_reg for a QI/HImode compare, which we cannot provide without modification elsewhere. However, we can usually get the extensions for free from surrounding operations. So e.g. CBcond in SImode is more generally compact than

[PATCH 1/8] aarch64: Drop label format argument from aarch64_gen_far_branch

2025-08-04 Thread Richard Henderson
There's no need for each branch-over-branch to choose its own label format. gcc: * config/aarch64/aarch64.cc (aarch64_gen_far_branch): Drop dest argument; always use "L". * config/aarch64/aarch64.md: Update to match. * config/aarch64/aarch64-protos.h: Update to matc

[PATCH 0/8] aarch64: CMPBR fixes

2025-08-04 Thread Richard Henderson
I have written patches for FEAT_CMPBR support in QEMU, and wanted to test them out with gcc. The easiest way, seemed to be bootstrapping gcc with cmpbr enabled. The attempt failed on stage1 libgcc. My bug report is target/121385. Pinski did some analyis, which was very helpful, and guides most

[pushed] c++: add another testcase [PR121351]

2025-08-04 Thread Patrick Palka
Tested on x86_64-pc-linux-gnu, pushed as obvious. -- >8 -- Here's a previously accepted testcase that is now ambiguous after r16-2771-gb9f1cc4e119da, since the uninstantiated constraints are equivalent but the partially instantiated constraints aren't, so the two member functions no longer corres

Re: [PATCH] x86: Add *one_cmplqi_ext_2

2025-08-04 Thread H.J. Lu
On Mon, Aug 4, 2025 at 8:50 AM Richard Sandiford wrote: > > Uros Bizjak writes: > > On Sat, Aug 2, 2025 at 8:56 PM H.J. Lu wrote: > >> > >> On Fri, Aug 1, 2025 at 10:32 PM Uros Bizjak wrote: > >> > > >> > On Sat, Aug 2, 2025 at 3:22 AM H.J. Lu wrote: > >> > > > >> > > After > >> > > > >> > > c

Re: [PATCH] hurd: Add OPTION_GLIBC_P and OPTION_GLIBC

2025-08-04 Thread Sam James
Samuel Thibault writes: > Hello, > > We are still waiting on this... CCing Thomas who is the only listed hurd maintainer. > > Samuel > > Samuel Thibault, le lun. 12 mai 2025 01:57:16 +0200, a ecrit: >> Hello, >> >> Are there any news on this? >> >> Samuel >> >> Samuel Thibault, le lun. 10 fé

Re: [PATCH v4] c++: P2036R3 - Change scope of lambda trailing-return-type [PR102610]

2025-08-04 Thread Marek Polacek
On Wed, Jul 30, 2025 at 11:55:53PM -0400, Jason Merrill wrote: > On 7/25/25 4:55 PM, Marek Polacek wrote: > > On Thu, Jul 17, 2025 at 05:20:31PM -0400, Jason Merrill wrote: > > > On 7/16/25 5:59 PM, Marek Polacek wrote: > > > > On Mon, Jul 14, 2025 at 12:52:41PM -0400, Jason Merrill wrote: > > > >

Re: [PATCH] hurd: Add OPTION_GLIBC_P and OPTION_GLIBC

2025-08-04 Thread Samuel Thibault
Hello, We are still waiting on this... Samuel Samuel Thibault, le lun. 12 mai 2025 01:57:16 +0200, a ecrit: > Hello, > > Are there any news on this? > > Samuel > > Samuel Thibault, le lun. 10 févr. 2025 23:08:35 +0100, a ecrit: > > Hello, > > > > Are there any news on this? > > > > Samuel >

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

2025-08-04 Thread Joseph Myers
On Mon, 4 Aug 2025, Anna (navi) Figueiredo Gomes wrote: > On Mon Aug 4, 2025 at 9:49 PM CEST, Joseph Myers wrote: > > On Sun, 3 Aug 2025, Anna (navi) Figueiredo Gomes wrote: > > > >> based on n3589[1], this feature mostly makes use of already-established > >> logic, namely push_cleanup used by the

Re: [PATCH v6 0/6] c, dwarf, btf: Add btf_decl_tag and btf_type_tag C attributes

2025-08-04 Thread Joseph Myers
On Mon, 4 Aug 2025, David Faust wrote: > Hi Joseph, > > Could you please take a look at the front-end portion of this > series when you have a moment? > > New attributes/handlers - Patch 1: > https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690142.html It looks like the front-end code wou

Re: [PATCH] libgfortran: add fallback for trigonometric pi-based functions

2025-08-04 Thread Joseph Myers
On Sun, 3 Aug 2025, Yuao Ma wrote: > By the way, could you please take another look at the libquadmath update? > > https://inbox.sourceware.org/fortran/kl1pr0601mb4291e1457dc09fe3aa6652c884...@kl1pr0601mb4291.apcprd06.prod.outlook.com/ > > This update uses a script to transform glibc's implement

Re: [PATCH] Use regular libdir/includedir in libgcc Makefiles

2025-08-04 Thread Joseph Myers
On Sun, 3 Aug 2025, John Ericson wrote: > > and "get those settings passed down from top level" is one plausible > > end state - sharing logic implicitly that way rather than expanding it > > all locally in each target library configure script, even if expanding > > it locally for each library

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

2025-08-04 Thread Anna (navi) Figueiredo Gomes
On Mon Aug 4, 2025 at 9:49 PM CEST, Joseph Myers wrote: > On Sun, 3 Aug 2025, Anna (navi) Figueiredo Gomes wrote: > >> based on n3589[1], this feature mostly makes use of already-established >> logic, namely push_cleanup used by the cleanup attribute, and the >> constraints put in place for checkin

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

2025-08-04 Thread Joseph Myers
On Sun, 3 Aug 2025, Anna (navi) Figueiredo Gomes wrote: > based on n3589[1], this feature mostly makes use of already-established > logic, namely push_cleanup used by the cleanup attribute, and the > constraints put in place for checking local jumps against statement > expressions > > 1: https://

Re: [C PATCH] Evaluate size expression only in the active branch of conditional operator [PR108931]

2025-08-04 Thread Joseph Myers
On Sat, 2 Aug 2025, Martin Uecker wrote: > In preparation N3652, this removes some UB from the conditional > operator when forming a composite type. This is an improvement > also for earlier language modes (previously I submitted PR108931 > for this). > > Bootstrapped and regression tested on x8

[pushed: r16-2766] diagnostics: improve support for nesting levels [PR116253]

2025-08-04 Thread David Malcolm
This patch adds support to sarif-replay for "nestingLevel" from "P3358R0 SARIF for Structured Diagnostics" https://wg21.link/P3358R0 Doing so revealed a bug where libgdiagnostics was always creating new location_t values (and thus also diagnostic_physical_location instances), rather than reusing e

[pushed: r16-2765] diagnostics: avoid stray trailing space in html sink in sarif-replay [PR116792]

2025-08-04 Thread David Malcolm
For the common case where a diagnostic has no metadata, sarif-replay's html output was adding a stray space followed by an empty for the metadata. Fixed thusly. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2765-g0fb30003867635. gcc/ChangeLog: PR

[pushed: r16-2767] optinfo: use enum class

2025-08-04 Thread David Malcolm
Modernization; no functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2767-gb963237a903f73. gcc/ChangeLog: * dump-context.h: Convert "enum optinfo_item_kind" into "enum class kind" within class optinfo_item. * d

[pushed: r16-2763] diagnostics: split source_printing_options out into its own header

2025-08-04 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2763-g7dea2582b3a5e4. gcc/ChangeLog: * diagnostics/context.h: Split struct source_printing_options out into "diagnostics/source-printing-options.h" and include it.

[pushed: r16-2762] diagnostics: rename option_manager to option_id_manager and split out from context.h

2025-08-04 Thread David Malcolm
This patch splits out class option_manager to its own header, and renames it to class option_id_manager to better describe its purpose. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2762-g268ec60da01c67. gcc/ChangeLog:

[pushed: r16-2764] diagnostics: move diagnostics::counters to its own header

2025-08-04 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2764-g74f59bf10dfef1. gcc/ChangeLog: * diagnostics/context.h: Move struct counters to its own header and include it. * diagnostics/counters.h: New file, from the above. --- gcc/diagnostic

[pushed: r16-2761] diagnostics: fix comment in buffering.h

2025-08-04 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2761-g3cff171b243f4d. gcc/ChangeLog: * diagnostics/buffering.h: Update comment to refer to output sinks rather than output formats. Signed-off-by: David Malcolm --- gcc/diagnostics/buffering.h

[pushed: r16-2760] gimple-warn-recursion.cc: add missing auto_diagnostic_group

2025-08-04 Thread David Malcolm
Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r16-2760-gc125e86853a23b. gcc/ChangeLog: * gimple-warn-recursion.cc (pass_warn_recursion::execute): Add missing auto_diagnostic_group. Signed-off-by: David Malcolm --- gcc/gimple-warn-recursion.cc

Re: [PATCH v2 3/8] libstdc++: Improve low-rank layout_{left, right}::stride.

2025-08-04 Thread Luc Grosheintz
On 8/4/25 17:26, Tomasz Kaminski wrote: On Sun, Aug 3, 2025 at 11:07 PM Luc Grosheintz wrote: The methods layout_{left,right}::mapping::stride are defined as \prod_{i = 0}^r E[i] \prod_{i = r+1}^n E[i] This is computed as the product of a precomputed static product and the product o

Re: [PATCH v2 0/8] libstdc++: Sequence of improvements to .

2025-08-04 Thread Luc Grosheintz
On 8/4/25 17:42, Tomasz Kaminski wrote: On Mon, Aug 4, 2025 at 1:14 PM Tomasz Kaminski wrote: On Mon, Aug 4, 2025 at 1:08 PM Luc Grosheintz wrote: Hi Tomasz, Thank you for the review! Sorry about the missing parens, even after "Ctrl+F"ing each of the emails I can't find the requires c

Re: [PATCH] libstdc++: Add feature test macros for std::ranges::shift_left and std::ranges::shift_right in std.cc.in

2025-08-04 Thread Patrick Palka
On Mon, 4 Aug 2025, hexne wrote: > Previously, std::ranges::shift_left and std::ranges::shift_right did > not use feature test macros, so compiling std.cc files under c++20 > would result in compilation failure Thanks for the patch (and the std::byteswap one)! They have been folded into a larger

Re: [Patch, fortran] PR121182 - F2018 GENERIC statement is missing

2025-08-04 Thread Jerry D
With your updated patch addressing Steve's comments OK. We have time for minor tweaks if necessary. On 8/3/25 11:06 AM, Steve Kargl wrote: On Sun, Aug 03, 2025 at 12:20:24PM +0100, Paul Richard Thomas wrote: First, the easy one: + /* Match the binding name; depending on type (operator / gen

Re: [PATCH] combine: Make extraction for ZERO_EXTRACT destination from LSHIFTRT

2025-08-04 Thread Richard Sandiford
"H.J. Lu" writes: > After > > commit 965564eafb721f813a3112f1bba8d8fae32b > Author: Richard Sandiford > Date: Tue Jul 29 15:58:34 2025 +0100 > > simplify-rtx: Simplify subregs of logic ops > > make_compound_operation_int gets > > (lshiftrt:DI (and:DI (reg:DI 110 [ b ]) >

[COMMITTED htdocs] gcc-{11,12}: mention they're no longer supported

2025-08-04 Thread Sam James
.. as we did for <= 10. --- Committed as obvious. htdocs/gcc-11/index.html | 2 ++ htdocs/gcc-12/index.html | 2 ++ 2 files changed, 4 insertions(+) diff --git a/htdocs/gcc-11/index.html b/htdocs/gcc-11/index.html index c2bde497..e600e153 100644 --- a/htdocs/gcc-11/index.html +++ b/htdocs/gcc-11

Re: [PATCH v6 0/6] c, dwarf, btf: Add btf_decl_tag and btf_type_tag C attributes

2025-08-04 Thread David Faust
Hi Joseph, Could you please take a look at the front-end portion of this series when you have a moment? New attributes/handlers - Patch 1: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690142.html Docs - Patch 5: https://gcc.gnu.org/pipermail/gcc-patches/2025-July/690147.html Thanks,

Re: libstdc++: Add various missing exports

2025-08-04 Thread Patrick Palka
_On Mon, 4 Aug 2025, Patrick Palka wrote: > On Mon, 4 Aug 2025, Jakub Jelinek wrote: > > > On Mon, Aug 04, 2025 at 11:33:17AM -0400, Patrick Palka wrote: > > > > @@ -1693,6 +1697,8 @@ export namespace std > > > >{ > > > > using std::ranges::advance; > > > > using std::ranges::distan

Re: libstdc++: Add various missing exports

2025-08-04 Thread Patrick Palka
On Mon, 4 Aug 2025, Jakub Jelinek wrote: > On Mon, Aug 04, 2025 at 11:33:17AM -0400, Patrick Palka wrote: > > > @@ -1693,6 +1697,8 @@ export namespace std > > >{ > > > using std::ranges::advance; > > > using std::ranges::distance; > > > +using std::ranges::iter_move; > > > +u

Re: [PATCH v6 4/6] btf: generate and output DECL_TAG and TYPE_TAG records

2025-08-04 Thread David Faust
On 8/2/25 08:10, Indu Bhagat wrote: > On 7/21/25 4:00 PM, David Faust wrote: >> Support the btf_decl_tag and btf_type_tag attributes in BTF by creating >> and emitting BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG records, >> respectively, for them. >> >> Some care is required when -gprune-btf is in e

Re: libstdc++: Add various missing exports

2025-08-04 Thread Jakub Jelinek
On Mon, Aug 04, 2025 at 11:33:17AM -0400, Patrick Palka wrote: > > @@ -1693,6 +1697,8 @@ export namespace std > >{ > > using std::ranges::advance; > > using std::ranges::distance; > > +using std::ranges::iter_move; > > +using std::ranges::iter_swap; > > Actually a few lines a

Re: [PATCH] x86: Add *one_cmplqi_ext_2

2025-08-04 Thread Richard Sandiford
Uros Bizjak writes: > On Sat, Aug 2, 2025 at 8:56 PM H.J. Lu wrote: >> >> On Fri, Aug 1, 2025 at 10:32 PM Uros Bizjak wrote: >> > >> > On Sat, Aug 2, 2025 at 3:22 AM H.J. Lu wrote: >> > > >> > > After >> > > >> > > commit 965564eafb721f813a3112f1bba8d8fae32b >> > > Author: Richard Sandiford

Re: [PATCH v2 0/8] libstdc++: Sequence of improvements to .

2025-08-04 Thread Tomasz Kaminski
On Mon, Aug 4, 2025 at 1:14 PM Tomasz Kaminski wrote: > > > On Mon, Aug 4, 2025 at 1:08 PM Luc Grosheintz > wrote: > >> Hi Tomasz, >> >> Thank you for the review! Sorry about the missing parens, even after >> "Ctrl+F"ing each of the emails I can't find the requires clause (the >> two I found bot

Re: [PATCH v3] x86-64: Remove redundant TLS calls

2025-08-04 Thread H.J. Lu
On Mon, Aug 04, 2025 at 02:57:39PM +0800, Hongtao Liu wrote: > > > > > + rtx_insn *before = nullptr; > > > > > + rtx_insn *after = nullptr; > > > > > + if (insn == BB_HEAD (bb)) > > > > > +before = insn; > > > > > + else > > > > > +after = insn ? PREV_INSN (insn) : BB_END (bb); > > > >

Re: libstdc++: Add various missing exports

2025-08-04 Thread Patrick Palka
On Mon, 4 Aug 2025, Jakub Jelinek wrote: > On Mon, Aug 04, 2025 at 12:00:32PM +0200, Jonathan Wakely wrote: > > using std::operator""d; > > using std::operator""h; > > using std::operator""min; > > using std::operator""ms; > > using std::operator""ns; > > using std::operator""sv; > > using std::op

Re: [PATCH v2 3/8] libstdc++: Improve low-rank layout_{left, right}::stride.

2025-08-04 Thread Tomasz Kaminski
On Sun, Aug 3, 2025 at 11:07 PM Luc Grosheintz wrote: > The methods layout_{left,right}::mapping::stride are defined > as > > \prod_{i = 0}^r E[i] > \prod_{i = r+1}^n E[i] > > This is computed as the product of a precomputed static product and the > product of the required dynamic extents. >

Re: [PATCH] libcpp: Add testcase for CWG2579 [PR120778]

2025-08-04 Thread Jason Merrill
On 8/4/25 11:11 AM, Jakub Jelinek wrote: Hi! Another easy part from the paper. Part of the CWG2579 has been already done in an earlier paper (with test commits by Marek) and the remaining part is implemented correctly, we diagnose as error when token pasting doesn't form a valid token. Except

Re: [PATCH v2 2/8] libstdc++: Precompute products of static extents.

2025-08-04 Thread Tomasz Kaminski
On Sun, Aug 3, 2025 at 10:59 PM Luc Grosheintz wrote: > Let E denote an multi-dimensional extent; n the rank of E; r = 0, ..., > n; E[i] the i-th extent; and D[k] be the (possibly empty) array of > dynamic extents. > > The two partial products for r = 0, ..., n: > > \prod_{i = 0}^r E[i] (fw

[PATCH] libcpp: Add testcase for CWG2579 [PR120778]

2025-08-04 Thread Jakub Jelinek
Hi! Another easy part from the paper. Part of the CWG2579 has been already done in an earlier paper (with test commits by Marek) and the remaining part is implemented correctly, we diagnose as error when token pasting doesn't form a valid token. Except that message pasting and does not

Re: libstdc++: Add various missing exports

2025-08-04 Thread Patrick Palka
On Mon, Aug 4, 2025 at 10:39 AM Jakub Jelinek wrote: > > On Mon, Aug 04, 2025 at 03:11:32PM +0200, Jonathan Wakely wrote: > > Somebody submitted patches for those and byteswap in the past 24 hours, but > > your patch is more complete. > > I was aware of byteswap but missed the second version of th

Re: libstdc++: Add various missing exports

2025-08-04 Thread Jakub Jelinek
On Mon, Aug 04, 2025 at 03:11:32PM +0200, Jonathan Wakely wrote: > Somebody submitted patches for those and byteswap in the past 24 hours, but > your patch is more complete. I was aware of byteswap but missed the second version of the patch that added the #if around it; that PR made me look for th

Re: [PATCH] [aarch64] Make better use of overflowing operations in max/min(a, add/sub(a, b)) [PR116815]

2025-08-04 Thread Richard Sandiford
Dhruv Chawla writes: > On 01/08/25 22:10, Richard Sandiford wrote: >> External email: Use caution opening links or attachments >> >> >> Dhruv Chawla writes: >>> On 24/07/25 11:21, Andrew Pinski wrote: External email: Use caution opening links or attachments On Wed, Jul 23, 2

Re: [PATCH] RISC-V: Read extension data from riscv-ext*.def for arch-canonicalize

2025-08-04 Thread Jeff Law
On 7/31/25 2:35 AM, Kito Cheng wrote: Previously, arch-canonicalize used hardcoded data to handle IMPLIED_EXT. But this data often got out of sync with the actual C++ implementation. Earlier, we introduced riscv-ext.def to keep track of all extension info and generate docs. Now, arch-canonical

Re: [PATCH v1] RISC-V: Fix scalar code-gen of unsigned SAT_MUL

2025-08-04 Thread Jeff Law
On 8/3/25 8:19 PM, Li, Pan2 wrote: Thanks Jeff. OK. Any change we could get run test for this in addition to the scanners? I tried to add run test target this but seems happen to work here for mulhsu. Here we only cares the result(high bits of mul) has values or not, looks like mulhsu wi

Re: [PATCH] [aarch64] Make better use of overflowing operations in max/min(a, add/sub(a, b)) [PR116815]

2025-08-04 Thread Dhruv Chawla
On 01/08/25 22:10, Richard Sandiford wrote: External email: Use caution opening links or attachments Dhruv Chawla writes: On 24/07/25 11:21, Andrew Pinski wrote: External email: Use caution opening links or attachments On Wed, Jul 23, 2025 at 10:16 PM wrote: From: Dhruv Chawla This pa

Re: [PATCH] asf: Fix null pointer dereference in is_store_forwarding [PR121303]

2025-08-04 Thread Philipp Tomsich
Applied to trunk, thanks! --Philipp. On Mon, 4 Aug 2025 at 12:57, Richard Biener wrote: > > On Mon, 4 Aug 2025, Konstantinos Eleftheriou wrote: > > > We were calling `is_store_forwarding` with a NULL value for `off_val`, > > which was causing a null pointer dereference in `is_constant`, leading

[COMMITTED 9/9] ada: Update Assertion_Policy handling in GNATProve mode

2025-08-04 Thread Marc Poulhiès
From: Viljar Indus Previously in GNATProve_Mode the frontend would overwrite all of the assertion policies to check in order to force the generation of all of the assertions. This however prevents GNATProve from performing policy related checks in the tool. Since they are all artificially change

[COMMITTED 4/9] ada: Keep Ghost_Mode related variables in a record

2025-08-04 Thread Marc Poulhiès
From: Viljar Indus Simplify the storing process for ghost mode related variables and make the process more extendable if new ghost mode related features are added. gcc/ada/ChangeLog: * atree.adb: update references to Ghost_Mode. * exp_ch3.adb: use a structure type to store all o

[COMMITTED 6/9] ada: Refactor Validate_Compile_Time_Warning_Or_Error

2025-08-04 Thread Marc Poulhiès
From: Viljar Indus Simplify the creation of the control characters in Validate_Compile_Time_Warning_Or_Error. gcc/ada/ChangeLog: * sem_prag.adb (Validate_Compile_Time_Warning_Or_Error): simplify the implementation. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/a

Re: libstdc++: Add various missing exports

2025-08-04 Thread Jonathan Wakely
On Mon, 4 Aug 2025, 12:26 Jakub Jelinek, wrote: > On Mon, Aug 04, 2025 at 12:00:32PM +0200, Jonathan Wakely wrote: > > using std::operator""d; > > using std::operator""h; > > using std::operator""min; > > using std::operator""ms; > > using std::operator""ns; > > using std::operator""sv; > > using

[COMMITTED 1/9] ada: Misc parser cleanup

2025-08-04 Thread Marc Poulhiès
From: Bob Duff ...which might make it easier to deal with incorrectly shared subtrees created during parsing. There were several Idents arrays, with duplicated code and commentary. And the related code had somewhat diverged -- different comments, different index subtypes (Pos vs. Int), etc. DRY

[COMMITTED 8/9] ada: Make pp and friends more robust

2025-08-04 Thread Marc Poulhiès
From: Bob Duff Print_Node_Ref, which is called by pp, sometimes calls Compile_Time_Known_Value, which blows up if Entity (N) is empty. Rearrange the tests here, and test for Present (Entity (N)) before calling Compile_Time_Known_Value. Remove test "Nkind (N) in N_Subexpr", which is redundant with

[COMMITTED 7/9] ada: Check Compile_Time_Errors removed in Ghost code

2025-08-04 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * sem_prag.adb (Validate_Compile_Time_Warning_Errors): Check if the original compile time pragma was replaced and validate the original node instead. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 8

[COMMITTED 5/9] ada: Implement accessibility legality check for discriminated function result.

2025-08-04 Thread Marc Poulhiès
From: Steve Baird If a function result type has an access discriminant, then we already generate a run-time accessibility check for a return statement. But if we know statically that the check (if executed) is going to fail, then that should be rejected at compile-time as a violation of RM 6.5(5.

[COMMITTED 3/9] ada: Avoid generating incorrect warning

2025-08-04 Thread Marc Poulhiès
From: Steve Baird Do not generate a warning stating that the size of a formal parameter is 8 bits unless the size of the formal parameter is 8 bits. gcc/ada/ChangeLog: * freeze.adb (Freeze_Profile): Do not emit a warning stating that a formal parameter's size is 8 if the paramet

[COMMITTED 2/9] ada: Fix code quality issue in table.adb

2025-08-04 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ChangeLog: * table.adb (Max): Move variable to the body and initialize it with the same value as in the Init function. * table.ads (Max): Likewise. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/table.adb | 3 +++ gcc/ada/tab

[PATCH] Fail early when SLP instance build fails

2025-08-04 Thread Richard Biener
The following makes us fail earlier when parts of the SLP build fails. Currently we rely on hybrid stmt detection later to discover not all stmts are covered by SLP, but this code should go away. I've also seen a case of a missed gcond SLP build that went undetected. So the following makes us fai

Re: [PATCH] c++: Add #line testcase for CWG2580 [PR120778]

2025-08-04 Thread Jason Merrill
On 8/1/25 8:30 AM, Jakub Jelinek wrote: Hi! Contrary to what the paper says, I think for #line directives we diagnose everything we should (sure, some diagnostics are pedwarns). Tested on x86_64-linux, ok for trunk? OK. 2025-08-01 Jakub Jelinek PR preprocessor/120778 * g

Re: [PATCH] c++: constrained memfn vs corresponding using [PR121351]

2025-08-04 Thread Jason Merrill
On 8/1/25 4:12 PM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and 15 after 15.2 is released? OK. -- >8 -- The below testcases started to get rejected due to overload resolution ambiguity after r15-3740 which corrected our inheritedness

[PATCH] fortran: cleanup duplicate tests for c_f_pointer_shape_driver; nfc

2025-08-04 Thread Yuao Ma
Hi all, This patch cleans up a duplicate test driver. Regression-tested. OK for trunk? Thanks, YuaoFrom f4e821d346652ff4f9ac1a934a6afd019f13e026 Mon Sep 17 00:00:00 2001 From: Yuao Ma Date: Mon, 4 Aug 2025 20:19:27 +0800 Subject: [PATCH] fortran: cleanup duplicate tests for c_f_pointer_shape_d

Re: [PATCH] libcpp: Use pedwarn instead of warning for CWG2578 diagnostics [PR120778]

2025-08-04 Thread Jason Merrill
On 8/2/25 3:35 AM, Jakub Jelinek wrote: Hi! This is another case which changed from compile time undefined behavior to ill-formed, diagnostic required. Now, we warn on this, so pedantically that is good enough, maybe all we need is a testcase, but the following patch changes it to a pedwarn for

Re: [PATCH] c++: constexpr evaluation of abi::__dynamic_cast [PR120620]

2025-08-04 Thread Jason Merrill
On 8/3/25 12:23 PM, Patrick Palka wrote: On Sun, 3 Aug 2025, Jason Merrill wrote: On 8/1/25 11:16 AM, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk and 15/14 after 15.2 is released? -- >8 -- r13-3299 changed our internal declaration of __

RE: [PATCH v1 1/2] RISC-V: Combine vec_duplicate + vmerge.vv to vmerge.vx on GR2VR cost

2025-08-04 Thread Li, Pan2
Thanks Robin. > As we're not recursively traversing, does something like > > FOR_EACH_SUBRTX (...) > if (GET_CODE (*iter) == VEC_DUPLICATE) > > help, regardless of the actual operation? I see, in fact we don't care about the ops but the vec_dup of subrtx. I will try to refactor that first and the

Re: [PATCH v2 1/1] libiberty: add routines to handle type-sensitive doubly linked lists

2025-08-04 Thread Jan Beulich
On 04.08.2025 12:42, Matthieu Longo wrote: > On 2025-08-04 11:33, Richard Sandiford wrote: >> Matthieu Longo writes: >>> On 2025-07-31 13:39, Jan Beulich wrote: On 09.07.2025 14:48, Matthieu Longo wrote: > Those methods's implementation is relying on duck-typing at compile > time. >>>

[PATCH] Record gather/scatter scale and base in the SLP tree

2025-08-04 Thread Richard Biener
The main gather/scatter discovery happens at SLP discovery time, the base address and the offset scale are currently not explicitly represented in the SLP tree. This requires re-discovery of them during vectorizable_store/load. The following fixes this by recording this info into the SLP tree. T

Re: [PATCH v2 0/8] libstdc++: Sequence of improvements to .

2025-08-04 Thread Tomasz Kaminski
On Mon, Aug 4, 2025 at 1:08 PM Luc Grosheintz wrote: > Hi Tomasz, > > Thank you for the review! Sorry about the missing parens, even after > "Ctrl+F"ing each of the emails I can't find the requires clause (the > two I found both need the parens). > I was mentioning this one, but it is possible th

Re: [PATCH v2 0/8] libstdc++: Sequence of improvements to .

2025-08-04 Thread Luc Grosheintz
Hi Tomasz, Thank you for the review! Sorry about the missing parens, even after "Ctrl+F"ing each of the emails I can't find the requires clause (the two I found both need the parens). Do you think it's possible to merge this series before the other two outstanding patch series? There's some risk

Re: [PATCH v2 1/1] libiberty: add routines to handle type-sensitive doubly linked lists

2025-08-04 Thread Richard Sandiford
Matthieu Longo writes: > On 2025-08-04 11:33, Richard Sandiford wrote: >> Matthieu Longo writes: >>> On 2025-07-31 13:39, Jan Beulich wrote: On 09.07.2025 14:48, Matthieu Longo wrote: > Those methods's implementation is relying on duck-typing at compile > time. > The structure co

[PATCH v4 2/2] libstdc++: Implement aligned_accessor from mdspan [PR120994]

2025-08-04 Thread Luc Grosheintz
This commit completes the implementation of P2897R7 by implementing and testing the template class aligned_accessor. PR libstdc++/120994 libstdc++-v3/ChangeLog: * include/bits/version.def (aligned_accessor): Add. * include/bits/version.h: Regenerate. * include/std

[PATCH v4 1/2] libstdc++: Implement is_sufficiently_aligned [PR120994]

2025-08-04 Thread Luc Grosheintz
This commit implements and tests the function is_sufficiently_aligned from P2897R7. PR libstdc++/120994 libstdc++-v3/ChangeLog: * include/bits/align.h (is_sufficiently_aligned): New function. * include/bits/version.def (is_sufficiently_aligned): Add. * include/bit

[PATCH v4 0/2] libstdc++: Implement aligned_accessor [P2897R7]

2025-08-04 Thread Luc Grosheintz
Updated version of v3: https://gcc.gnu.org/pipermail/libstdc++/2025-July/062772.html Notably it (finally) removes the debug assertion. It should be applied after (at least that's the order I test them in locally): https://gcc.gnu.org/pipermail/libstdc++/2025-July/062727.html It might be safe

Re: [PATCH] asf: Fix null pointer dereference in is_store_forwarding [PR121303]

2025-08-04 Thread Richard Biener
On Mon, 4 Aug 2025, Konstantinos Eleftheriou wrote: > We were calling `is_store_forwarding` with a NULL value for `off_val`, > which was causing a null pointer dereference in `is_constant`, leading > to an ICE. > > This patch updates the call to `is_constant` in `is_store_forwarding` > and adds a

Re: [PATCH v2 1/1] libiberty: add routines to handle type-sensitive doubly linked lists

2025-08-04 Thread Matthieu Longo
On 2025-08-04 11:33, Richard Sandiford wrote: Matthieu Longo writes: On 2025-07-31 13:39, Jan Beulich wrote: On 09.07.2025 14:48, Matthieu Longo wrote: Those methods's implementation is relying on duck-typing at compile time. The structure corresponding to the node of a doubly linked list nee

Re: [PATCH v2 0/8] libstdc++: Sequence of improvements to .

2025-08-04 Thread Tomasz Kaminski
Hi, I this time I made a quick pass through all changes, before commenting on first commits, and they look solid to me, and I haven't noticed anything I would like to change (except parentheses around requires, but I will handle that locally). I will try to do a full review during this week. Rega

Re: [PATCH v2 1/1] libiberty: add routines to handle type-sensitive doubly linked lists

2025-08-04 Thread Richard Sandiford
Matthieu Longo writes: > On 2025-07-31 13:39, Jan Beulich wrote: >> On 09.07.2025 14:48, Matthieu Longo wrote: >>> Those methods's implementation is relying on duck-typing at compile >>> time. >>> The structure corresponding to the node of a doubly linked list needs >>> to define attributes 'prev'

Re: [PATCH v7 13/13] FMV: Redirect to specific target

2025-08-04 Thread Richard Sandiford
Alfie Richards writes: > Adds an optimisation in FMV to redirect to a specific target if possible. > > A call is redirected to a specific target if both: > - the caller can always call the callee version > - and, it is possible to rule out all higher priority versions of the callee > fmv set. Th

Re: [PATCH v2 1/8] libstdc++: Reduce template instantiations in .

2025-08-04 Thread Tomasz Kaminski
On Sun, Aug 3, 2025 at 11:02 PM Luc Grosheintz wrote: > In mdspan related code involving static extents, often the IndexType is > part of the template parameters, even though it's not needed. > > This commit extracts the parts of _ExtentsStorage not related to > IndexType into a separate class _S

libstdc++: Add various missing exports

2025-08-04 Thread Jakub Jelinek
On Mon, Aug 04, 2025 at 12:00:32PM +0200, Jonathan Wakely wrote: > using std::operator""d; > using std::operator""h; > using std::operator""min; > using std::operator""ms; > using std::operator""ns; > using std::operator""sv; > using std::operator""us; > using std::operator""y; > > Shouldn't these

[PATCH] asf: Fix null pointer dereference in is_store_forwarding [PR121303]

2025-08-04 Thread Konstantinos Eleftheriou
We were calling `is_store_forwarding` with a NULL value for `off_val`, which was causing a null pointer dereference in `is_constant`, leading to an ICE. This patch updates the call to `is_constant` in `is_store_forwarding` and adds a check for `off_val`, in order to update it with the right value.

Re: [PATCH v2 1/1] libiberty: add routines to handle type-sensitive doubly linked lists

2025-08-04 Thread Matthieu Longo
On 2025-07-31 13:39, Jan Beulich wrote: On 09.07.2025 14:48, Matthieu Longo wrote: Those methods's implementation is relying on duck-typing at compile time. The structure corresponding to the node of a doubly linked list needs to define attributes 'prev' and 'next' which are pointers on the type

[PATCH] [AutoFDO] Dont offline if inlined instance has 0 total count

2025-08-04 Thread Kugan Vivekanandarajah
Hi, annotate_cfg doesnt annotate it correctly in this case and causus ICE. There is also no benefit in offlining this. For: _ZL27shift_amt_for_vec_perm_mask12machine_modeRK16vec_perm_indices9optab_tag total:0 head:-1 dump file: t.ii.091i.fnsummary gcc/optabs.cc: In function 'rtx_def* shift_amt_

[PATCH] tree-optimization/121362 - missed FRE through aggregate copy

2025-08-04 Thread Richard Biener
The following streamlines and generalizes how we find the common base of the lookup ref and a kill ref when looking through aggregate copies. In particular this tries to deal with all variants of punning that happens on the inner MEM_REF after forwarding of address taken components of the common b

[PATCH] RISC-V: Expand const_vector with 2 elts per pattern.

2025-08-04 Thread Robin Dapp
Hi, In PR121334 we are asked to expand a const_vector of size 4 with poly_int elements. It has 2 elts per pattern so is neither a const_vector_duplicate nor a const_vector_stepped. We don't allow this kind of constant in legitimate_constant_p but expr apparently still wants us to expand it unde

  1   2   >