[PATCH] libstdc++: Suppress GDB output from new 'skip' commands [PR118260]

2025-05-09 Thread Jonathan Wakely
I added some gdb.execute('skip -rfu ...') commands to the Python hook loaded with libstdc++.so but this makes GDB print output like: Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped when stepping. This probably aren't interesting to users, so this change suppresses that o

Re: [PATCH 8/9] AArch64: rules for CMPBR instructions

2025-05-09 Thread Kyrylo Tkachov
> On 8 May 2025, at 21:10, Karl Meakin wrote: > > Add rules for lowering `cbranch4` to CBB/CBH/CB when > CMPBR extension is enabled. > > gcc/ChangeLog: > > * config/aarch64/aarch64.md (cbranch4): Mmit CMPBR > instructions if possible. > (BRANCH_LEN_P_1Kib): New constant. > (BRANCH_LEN_N_1Kib)

RE: [PATCH v2] match.pd: Fold (x + y) >> 1 into IFN_AVG_FLOOR (x, y) for vectors

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Tamar Christina wrote: > > > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 9, 2025 8:31 AM > > To: Pengfei Li > > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford > > Subject: Re: [PATCH v2] match.pd: Fold (x + y) >> 1 into IFN_AVG_FLOOR (x, >

[PATCH] Restore lrealpath() fallback scenario

2025-05-09 Thread Rink Springer
Hi all! Git commit e2bb55ec3b70cf45088bb73ba9ca990129328d60 (pr/108350) removes the fallback scenario for lrealpath() when none of the #ifdef's match (in which case the function is empty) In this situation, there is no return statement, and hence an uninitialized pointer value is returned. Thi

[PATCH] c++/modules: Revert "Remove unnecessary lazy_load_pendings"

2025-05-09 Thread Nathaniel Shead
On Fri, May 09, 2025 at 08:18:58AM -0400, Jason Merrill wrote: > On 4/21/25 6:22 AM, Nathaniel Shead wrote: > > This call is not necessary, as we don't access the bodies of any classes > > that we instantiate here. > > This turns out to break > > 20_util/function_objects/mem_fn/constexpr.cc > std

[PATCH] c++: Take downgraded errors into account in seen_error [PR118388]

2025-05-09 Thread Simon Martin
Several gcc_assert through the C++ front-end involve seen_error (), that does not take into account errors that were turned into warnings due to -fpermissive or -Wtemplate-body. Running the full C++ testsuite when forcing the use of -fpermissive leads to ICEs for 6 tests (see list in ticket); one

[PATCH] c++/modules: Fix handling of -fdeclone-ctor-dtor with explicit instantiations [PR120125]

2025-05-09 Thread Nathaniel Shead
Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk/15? One slight concern I have is why we end up in 'maybe_thunk_body' to start with: the imported constructor isn't DECL_ONE_ONLY (as its external) and so 'can_alias_cdtor' returns false. The change in write_function_def (which I beli

Re: [PATCH] libstdc++: Use scope guard for deallocating nodes in deque.

2025-05-09 Thread Tomasz Kaminski
On Fri, May 9, 2025 at 5:25 PM Jonathan Wakely wrote: > On Fri, 9 May 2025 at 16:13, Tomasz Kaminski wrote: > > > > > > > > On Thu, May 8, 2025 at 7:46 PM Jonathan Wakely > wrote: > >> > >> On Fri, 18 Apr 2025 at 10:03, Tomasz Kamiński > wrote: > >> > > >> > This patch adds a _Guard_nodes scop

RE: [PATCH v2] match.pd: Fold (x + y) >> 1 into IFN_AVG_FLOOR (x, y) for vectors

2025-05-09 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 9, 2025 8:31 AM > To: Pengfei Li > Cc: gcc-patches@gcc.gnu.org; Richard Sandiford > Subject: Re: [PATCH v2] match.pd: Fold (x + y) >> 1 into IFN_AVG_FLOOR (x, y) > for > vectors > > On Thu, 8 May 2025, Pengfei Li wrote:

Re: [PATCH 2/2] c++/modules: Remove unnecessary lazy_load_pendings

2025-05-09 Thread Nathaniel Shead
On Fri, May 09, 2025 at 08:18:58AM -0400, Jason Merrill wrote: > On 4/21/25 6:22 AM, Nathaniel Shead wrote: > > This call is not necessary, as we don't access the bodies of any classes > > that we instantiate here. > > This turns out to break > > 20_util/function_objects/mem_fn/constexpr.cc > std

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 9, 2025 11:08 AM > To: Richard Sandiford > Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; > ktkac...@nvidia.com > Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count loops > using > subvectors > > On Fri, 9 May

Re: [PATCH] c++: Only reject virtual base data member access in __builtin_offsetof [PR118346]

2025-05-09 Thread Simon Martin
Hi Jason, On Tue May 6, 2025 at 10:36 PM CEST, Jason Merrill wrote: > On 5/6/25 3:05 PM, Simon Martin wrote: >> The following test case highlights two issues - see >> https://godbolt.org/z/7E1KGYreh: >> 1. We error out at both L4 and L5, while (at least) clang, EDG and MSVC >> only reject L

Re: [PATCH] Fix wrong optimization of complex boolean expression

2025-05-09 Thread Richard Biener
On Fri, May 9, 2025 at 11:49 AM Eric Botcazou wrote: > > Hi, > > this is a regression introduced on the mainline, 15 and 14 branches by: > https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639303.html > although one may consider that the problem was latent before. > > The VRP2 pass turns:

[PATCH 2/2] Move vector lowering to before vectorization

2025-05-09 Thread Richard Biener
The following moves vector lowering to before vectorization - in fact to before DCE/forwprop and CSE. This gets us the chance to re-vectorize the lowered form eventually. Note that when the vectorizer learns to handle vector code vector lowering should be likely integrated with vectorization itse

Re: [PATCH] libstdc++: Use scope guard for deallocating nodes in deque.

2025-05-09 Thread Tomasz Kaminski
On Thu, May 8, 2025 at 7:46 PM Jonathan Wakely wrote: > On Fri, 18 Apr 2025 at 10:03, Tomasz Kamiński wrote: > > > > This patch adds a _Guard_nodes scope guard nested to the _Deque_base, > > that deallocates the range of nodes, and replaces __try/__catch block > > with approparietly constructed

[PATCH v2] libstdc++: Use scope guard for deallocating nodes in deque.

2025-05-09 Thread Tomasz Kamiński
This patch adds a _Guard_nodes scope guard nested to the _Deque_base, that deallocates the range of nodes, and replaces __try/__catch block with appropriately constructed guard object. libstdc++-v3/ChangeLog: * include/bits/deque.tcc (_Deque_base::_Guard_nodes): Define. (_Deque_ba

Re: [PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Jakub Jelinek
On Fri, May 09, 2025 at 09:17:23AM +0200, Richard Biener wrote: > RTL DSE forms store groups from unique invariant bases but that is > confused when presented with constant addresses where it assigns > one store group per unique address. That causes it to not consider > 0x101:QI to alias 0x100:SI.

[PATCH] fortran: Fix up minloc/maxloc lowering [PR120191]

2025-05-09 Thread Jakub Jelinek
On Fri, May 09, 2025 at 06:18:40PM +0300, Daniil Kochergin wrote: > PR fortran/120191 > > * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): > > Call strip_kind_from_actual unconditionally. > > > * gfortran.dg/pr120191.f90: New test. This unfortunately only fixes some of the cases in the new

Re: [PATCH] match: Remove (ne (cmp) 0) and (eq (cmp) 1) patterns

2025-05-09 Thread Andrew Pinski
On Fri, May 9, 2025 at 4:34 AM Andrew Pinski wrote: > > On Fri, May 9, 2025 at 1:21 AM Richard Biener > wrote: > > > > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski > > wrote: > > > > > > These patterns are not needed any more. There were already > > > 2 patterns which did `(ne bool_var 0)` into

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Tamar Christina
> -Original Message- > From: Richard Biener > Sent: Friday, May 9, 2025 2:44 PM > To: Tamar Christina > Cc: Richard Sandiford ; Pengfei Li > ; gcc-patches@gcc.gnu.org; ktkac...@nvidia.com > Subject: RE: [PATCH] vect: Improve vectorization for small-trip-count loops > using > subvectors >

Re: [PATCH] match: Remove (ne (cmp) 0) and (eq (cmp) 1) patterns

2025-05-09 Thread Andrew Pinski
On Fri, May 9, 2025, 6:27 AM Richard Biener wrote: > On Fri, May 9, 2025 at 1:34 PM Andrew Pinski wrote: > > > > On Fri, May 9, 2025 at 1:21 AM Richard Biener > > wrote: > > > > > > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski > wrote: > > > > > > > > These patterns are not needed any more. Th

[PATCH v2] RISC-V: Use vclmul for CRC expansion if available

2025-05-09 Thread Anton Blanchard
If the vector version of clmul (vclmul) is available and the scalar one is not, use it for CRC expansion. gcc/Changelog: * config/riscv/bitmanip.md (crc_rev4): Check TARGET_ZVBC. (crc4): Likewise. * config/riscv/riscv.cc (expand_crc_using_clmul): Emit code using

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Pengfei Li
Hi Richard Biener, As Richard Sandiford has already addressed your questions in another email, I just wanted to add a few below. > That said, we already have unmasked ABS in the IL: > > vect__1.6_15 = .MASK_LOAD (&a, 16B, { -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, > 0, 0, 0, 0, 0, 0, ... }, { 0, ...

[PATCH v19 0/3] c: Add _Countof and

2025-05-09 Thread Alejandro Colomar
Hi! Here's a revision of this patch, rebased after all the changes in master in these 6 months. This time, the name is _Countof, as the C Committee has finally settled on that name. It also includes the lowercase macro and header in a separate patch, as specified by ISO C. Here's the change lis

[PATCH v19 2/3] c: Add _Countof operator

2025-05-09 Thread Alejandro Colomar
This operator is similar to sizeof but can only be applied to an array, and returns its number of elements. FUTURE DIRECTIONS: - We should make it work with array parameters to functions, and somehow magically return the number of elements of the array, regardless of it being really a poin

[PATCH v19 1/3] contrib/: Add support for Cc: and Link: tags

2025-05-09 Thread Alejandro Colomar
contrib/ChangeLog: * gcc-changelog/git_commit.py (GitCommit): Add support for 'Cc: ' and 'Link: ' tags. Cc: Jason Merrill Signed-off-by: Alejandro Colomar --- contrib/gcc-changelog/git_commit.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/gcc

[PATCH v19 3/3] c: Add

2025-05-09 Thread Alejandro Colomar
gcc/ChangeLog: * Makefile.in * ginclude/stdcountof.h: Add countof macro. Signed-off-by: Alejandro Colomar --- gcc/Makefile.in | 1 + gcc/ginclude/stdcountof.h | 31 +++ 2 files changed, 32 insertions(+) create mode 100644 gcc/ginclude/stdc

[WWWDOCS] readings: add links to CTF and BTF format specifications

2025-05-09 Thread Indu Bhagat
Fix PR web/114649 --- htdocs/readings.html | 4 1 file changed, 4 insertions(+) diff --git a/htdocs/readings.html b/htdocs/readings.html index 56398317..3b0556e6 100644 --- a/htdocs/readings.html +++ b/htdocs/readings.html @@ -598,6 +598,10 @@ names. https://dwarfstd.org";>DWARF Workgro

[PATCH 2/6] RISC-V: frm/mode-switch: remove TARGET_MODE_CONFLUENCE

2025-05-09 Thread Vineet Gupta
This is effectively reverting e5d1f538bb7d "(RISC-V: Allow different dynamic floating point mode to be merged)" while retaining the testcase. The change itself is valid, however it obfuscates the deficiencies in current frm mode switching code. Also for a SPEC2017 -Ofast -march=rv64gcv build, it

[PATCH 4/6] RISC-V: frm/mode-switch: TARGET_MODE_AFTER not needed for frm switching

2025-05-09 Thread Vineet Gupta
Stumbled upon this when trying to wholesale rewrite frm switching code and seeing what pieces needed to be retained from current implementation. My interpretation of how this hook worked, for the following case: fsrmi 3 fsrm a4 call frrm a4 fsrmi 1 TARGET_MODE_NEEDED(call

[PATCH 5/6] RISC-V: frm/mode-switch: Reduce FRM restores on DYN transition

2025-05-09 Thread Vineet Gupta
FRM mode switching state machine has DYN as default state which it also fallsback to after transitioning to other states such as DYN_CALL. Currently TARGET_MODE_EMIT generates a FRM restore on any transition to DYN leading to spurious/extraneous FRM restores. Only do this if an interim static Roun

Re: [PATCH] match: Remove (ne (cmp) 0) and (eq (cmp) 1) patterns

2025-05-09 Thread Andrew Pinski
On Fri, May 9, 2025 at 1:21 AM Richard Biener wrote: > > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski wrote: > > > > These patterns are not needed any more. There were already > > 2 patterns which did `(ne bool_var 0)` into `bool_var` and > > `(eq bool_var 1)` into `bool_var`. Just they were afte

Re: [PATCH RFC] libstdc++: run testsuite with -Wabi

2025-05-09 Thread Jonathan Wakely
On Thu, 8 May 2025 at 20:56, Jason Merrill wrote: > > Tested x86_64-pc-linux-gnu. Does this make sense for trunk? Yes, it looks useful. I'm going to test it with my "very -std and -m32 and old-string ABI" test settings to be sure it doesn't cause any problems. > -- 8< -- > > I added this local

[PATCH] gimple: Don't assert that switch has nondefault cases during lowering [PR120080]

2025-05-09 Thread Filip Kastl
Hi, bootstrapped and regtested on x86_64 linux. Ok to push? Filip Kastl -- 8< --- I have mistakenly assumed that switch lowering cannot encounter a switch with zero clusters. This patch removes the relevant assert and instead gives up bit-test lowering when this happens. PR tree-op

Re: [PATCH] gimple: Don't assert that switch has nondefault cases during lowering [PR120080]

2025-05-09 Thread Sam James
Filip Kastl writes: > Hi, > > bootstrapped and regtested on x86_64 linux. Ok to push? > > Filip Kastl > No testcase? I think pinskia's reduced testcase from the bug should be fine. I can handle adding that later if needed though.

PR fortran/120191

2025-05-09 Thread Daniil Kochergin
PR fortran/120191 * trans-intrinsic.cc (gfc_conv_intrinsic_minmaxloc): Call strip_kind_from_actual unconditionally. * gfortran.dg/pr120191.f90: New test. patch_minmaxloc_120191.patch Description: Binary data gcc16-pr120191-test.patch Description: Binary data

[PATCH 1/2] tree-optimization/114166 - vectorize to lowered form with word_mode

2025-05-09 Thread Richard Biener
The following adjusts the non-PLUS/MINUS/NEGATE_EXPR vectorizations of "word_mode" vectors to emit the form vector lowering will later use. This allows us to move the vector lowering pass before vectorization, specifically closing the gap between vectorization and lowering, so we can eventually ass

Re: [GCC16 stage1][PATCH v3 0/3] extend "counted_by" attribute to pointer fields of structures

2025-05-09 Thread Qing Zhao
Hi, Some update on the v3 of the patch after more study and discussion. 1. There were more discussion among Kees, Bill, I and also Apple engineers on whether we should support “counted_by” on pointers with type “void *”. And finally we agreed to: A. Do not support the “counted_b

[PATCH 2/3] Remove non-SLP path from vectorizable_operation

2025-05-09 Thread Richard Biener
Step 2, fold trivial conditions --- gcc/tree-vect-stmts.cc | 30 +++--- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 7a6a10ee0e6..bfbece56464 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmt

Re: [PATCH] ltmain.in: don't suppress output for PIC compilations

2025-05-09 Thread Sam James
Sam James writes: > When working on xz, I set `-Werror=suggest-attribute=returns_nonnull`, and > the build failed (as I expected it to), but with no visible error from > the compiler. There's a mysterious '>/dev/null 2>&1' on the second line where > liblzma_la-common.o is built without PIC. > > W

RE: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Friday, May 9, 2025 11:08 AM > > To: Richard Sandiford > > Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; > > ktkac...@nvidia.com > > Subject: Re: [PATCH] vect: Improve vectorization for small

Re: [PATCH RFC] libstdc++: run testsuite with -Wabi

2025-05-09 Thread Jonathan Wakely
On Fri, 9 May 2025 at 18:13, Jonathan Wakely wrote: > > On Fri, 9 May 2025 at 11:19, Jonathan Wakely wrote: > > > > On Thu, 8 May 2025 at 20:56, Jason Merrill wrote: > > > > > > Tested x86_64-pc-linux-gnu. Does this make sense for trunk? > > > > Yes, it looks useful. I'm going to test it with m

Re: [PATCH] libstdc++: Use scope guard for deallocating nodes in deque.

2025-05-09 Thread Jonathan Wakely
On Fri, 9 May 2025 at 16:13, Tomasz Kaminski wrote: > > > > On Thu, May 8, 2025 at 7:46 PM Jonathan Wakely wrote: >> >> On Fri, 18 Apr 2025 at 10:03, Tomasz Kamiński wrote: >> > >> > This patch adds a _Guard_nodes scope guard nested to the _Deque_base, >> > that deallocates the range of nodes, a

Re: [PATCH] Restore lrealpath() fallback scenario

2025-05-09 Thread Rink Springer
diff -rubB gcc-15.1.0-base/libiberty/lrealpath.c gcc-15.1.0/libiberty/lrealpath.c --- gcc-15.1.0-base/libiberty/lrealpath.c 2025-04-25 10:18:04.0 +0200 +++ gcc-15.1.0/libiberty/lrealpath.c 2025-05-09 16:49:35.228340555 +0200 @@ -303,4 +303,7 @@ return res; } #endif // _WIN32 + + /* This sy

[PATCH 3/6] RISC-V: frm/mode-switch: remove dubious frm edge insertion before call_insn

2025-05-09 Thread Vineet Gupta
This showed up when debugging the testcase for PR119164. RISC-V FRM mode-switching state machine has special handling for transitions to and from a call_insn as FRM needs to saved/restored around calls (any call is considered potentially FRM clobbering). Consider the following canonical example wh

Re: [PATCH v19 3/3] c: Add

2025-05-09 Thread Alejandro Colomar
Hi Jakub, On Fri, May 09, 2025 at 10:02:17PM +0200, Jakub Jelinek wrote: > On Fri, May 09, 2025 at 09:32:50PM +0200, Alejandro Colomar wrote: > > gcc/ChangeLog: > > > > * Makefile.in > > Missing (USER_H): Add stdcountof.h. Thanks! > > --- /dev/null > > +++ b/gcc/ginclude/stdcountof.h > > @

[PATCH 0/6] RISC-V: frm state-machine improvements

2025-05-09 Thread Vineet Gupta
Hi, This came out of Rivos perf team reporting (shoutout to Siavash) that some of the SPEC2017 workloads had unnecessary FRM wiggles, when none were needed. The writes in particular could be expensive. I started with reduced test for PR/119164 from blender:node_testure_util.c. However in trying

Re: [PATCH v19 3/3] c: Add

2025-05-09 Thread Jakub Jelinek
On Fri, May 09, 2025 at 09:32:50PM +0200, Alejandro Colomar wrote: > gcc/ChangeLog: > > * Makefile.in Missing (USER_H): Add stdcountof.h. > --- /dev/null > +++ b/gcc/ginclude/stdcountof.h > @@ -0,0 +1,31 @@ > +/* Copyright (C) 2025 Free Software Foundation, Inc. > + > +This file is part of

Re: [WWWDOCS] readings: add links to CTF and BTF format specifications

2025-05-09 Thread Andrew Pinski
On Fri, May 9, 2025 at 12:47 PM Indu Bhagat wrote: > > Fix PR web/114649 I think this counts as obvious. And LGTM too. > --- > htdocs/readings.html | 4 > 1 file changed, 4 insertions(+) > > diff --git a/htdocs/readings.html b/htdocs/readings.html > index 56398317..3b0556e6 100644 > --- a/

[pushed] c++: visibility of instantiated template friends

2025-05-09 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- In 20_util/variant/visit_member.cc, instantiation of the variant friend declaration of __get for variant was being marked as internal because that variant specialization is itself internal. And therefore check_module_override didn't try to

Re: [PATCH v19 3/3] c: Add

2025-05-09 Thread Joseph Myers
On Fri, 9 May 2025, Alejandro Colomar wrote: > > This should define also > > __STDC_VERSION_STDCOUNTOF_H__ > > macro (guess to 202502L or when the paper has been approved for now > > or maybe 202500L as something clearly before that). > > Hmmm, I was wondering what value I should put there, and e

Re: [PATCH v19 1/3] contrib/: Add support for Cc: and Link: tags

2025-05-09 Thread Joseph Myers
On Fri, 9 May 2025, Alejandro Colomar wrote: > contrib/ChangeLog: > > * gcc-changelog/git_commit.py (GitCommit): > Add support for 'Cc: ' and 'Link: ' tags. Please remove this patch from this patch series; it has nothing to do with _Countof and would probably be reviewed by differen

Re: [PATCH] gimple: Canonical order for invariants [PR118902]

2025-05-09 Thread Andrew Pinski
On Mon, Apr 21, 2025 at 1:42 AM Richard Biener wrote: > > On Thu, Apr 17, 2025 at 7:37 PM Andrew Pinski > wrote: > > > > So unlike constants, address invariants are currently put first if > > used with a SSA NAME. > > It would be better if address invariants are consistent with constants > > and

[PATCH 6/6] RISC-V: frm/mode-switch: robustify call_insn backtracking [PR119164][PR120203]

2025-05-09 Thread Vineet Gupta
So this is where my FRM excursions really began, trying to elide the extraneous FRM save/restores when none was needed. After a call_insn, mode needs to be switched from DYN_CALL to DYN. Failing to do so could defer the DYN_CALL to DYN, creating interim transitions leading to extraneous FRM save/r

Re: [PATCH v19 1/3] contrib/: Add support for Cc: and Link: tags

2025-05-09 Thread Alejandro Colomar
Hi Joseph, On Fri, May 09, 2025 at 09:00:58PM +, Joseph Myers wrote: > On Fri, 9 May 2025, Alejandro Colomar wrote: > > > contrib/ChangeLog: > > > > * gcc-changelog/git_commit.py (GitCommit): > > Add support for 'Cc: ' and 'Link: ' tags. > > Please remove this patch from this patch

Re: [PATCH v19 1/3] contrib/: Add support for Cc: and Link: tags

2025-05-09 Thread Joseph Myers
On Fri, 9 May 2025, Alejandro Colomar wrote: > Hi Joseph, > > On Fri, May 09, 2025 at 09:00:58PM +, Joseph Myers wrote: > > On Fri, 9 May 2025, Alejandro Colomar wrote: > > > > > contrib/ChangeLog: > > > > > > * gcc-changelog/git_commit.py (GitCommit): > > > Add support for 'Cc: ' and '

Re: [PATCH v19 1/3] contrib/: Add support for Cc: and Link: tags

2025-05-09 Thread Alejandro Colomar
Hi Joseph, On Fri, May 09, 2025 at 09:39:34PM +, Joseph Myers wrote: > > > > contrib/ChangeLog: > > > > > > > > * gcc-changelog/git_commit.py (GitCommit): > > > > Add support for 'Cc: ' and 'Link: ' tags. > > > > > > Please remove this patch from this patch series; it has not

[pushed] c++: CWG2369 workaround and ... [PR120185]

2025-05-09 Thread Jason Merrill
Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- My r16-479 adjustment to the PR99599 workaround broke on a class with a varargs constructor. It also occurred to me that we don't need to do non-dep conversion checking in two phases when concepts aren't supported. PR c++/99599

Re: [PATCH 2/2] c++/modules: Remove unnecessary lazy_load_pendings

2025-05-09 Thread Jason Merrill
On 4/21/25 6:22 AM, Nathaniel Shead wrote: This call is not necessary, as we don't access the bodies of any classes that we instantiate here. This turns out to break 20_util/function_objects/mem_fn/constexpr.cc std/ranges/view.cc when modified to use import std (as attached). For the former,

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Sandiford
Tamar Christina writes: >> -Original Message- >> From: Richard Biener >> Sent: Friday, May 9, 2025 11:08 AM >> To: Richard Sandiford >> Cc: Pengfei Li ; gcc-patches@gcc.gnu.org; >> ktkac...@nvidia.com >> Subject: Re: [PATCH] vect: Improve vectorization for small-trip-count loops >> usin

[PATCH v3 1/2] RISC-V: Support RISC-V Profiles 20/22.

2025-05-09 Thread Jiawei
This patch introduces support for RISC-V Profiles RV20 and RV22 [1], enabling developers to utilize these profiles through the -march option. [1] https://github.com/riscv/riscv-profiles/releases/tag/v1.0 Version log: Using lowercase letters to present Profiles. Using '_' as divsor between Profile

[PATCH] Fix wrong optimization of complex boolean expression

2025-05-09 Thread Eric Botcazou
Hi, this is a regression introduced on the mainline, 15 and 14 branches by: https://gcc.gnu.org/pipermail/gcc-patches/2023-December/639303.html although one may consider that the problem was latent before. The VRP2 pass turns: # prephitmp_3 = PHI <0(4)> _1 = prephitmp_3 == 0; _5 = stretc

Re: [PATCH] match: Remove (ne (cmp) 0) and (eq (cmp) 1) patterns

2025-05-09 Thread Richard Biener
On Fri, May 9, 2025 at 1:34 PM Andrew Pinski wrote: > > On Fri, May 9, 2025 at 1:21 AM Richard Biener > wrote: > > > > On Fri, May 9, 2025 at 4:51 AM Andrew Pinski > > wrote: > > > > > > These patterns are not needed any more. There were already > > > 2 patterns which did `(ne bool_var 0)` into

Re: [PATCH RFC] libstdc++: run testsuite with -Wabi

2025-05-09 Thread Jonathan Wakely
On Fri, 9 May 2025 at 11:19, Jonathan Wakely wrote: > > On Thu, 8 May 2025 at 20:56, Jason Merrill wrote: > > > > Tested x86_64-pc-linux-gnu. Does this make sense for trunk? > > Yes, it looks useful. I'm going to test it with my "very -std and -m32 > and old-string ABI" test settings to be sure

Re: [PATCH] libstdc++: Suppress GDB output from new 'skip' commands [PR118260]

2025-05-09 Thread Tomasz Kaminski
On Fri, May 9, 2025 at 1:32 PM Jonathan Wakely wrote: > I added some gdb.execute('skip -rfu ...') commands to the Python hook > loaded with libstdc++.so but this makes GDB print output like: > > Function(s) ^std::(move|forward|as_const|(__)?addressof) will be skipped > when stepping. > > This pro

Re: [PATCH v3] i386/cygming: Decrease default preferred stack boundary for 32-bit targets

2025-05-09 Thread LIU Hao
在 2025-5-3 20:52, LIU Hao 写道: 在 2025-5-2 01:25, LIU Hao 写道: Remove `STACK_REALIGN_DEFAULT` for this target, because now the default value of `incoming_stack_boundary` equals `MIN_STACK_BOUNDARY` and it doesn't have an effect any more. I suddenly realized the previous patch was for GCC 15 br

[PATCH v3 2/2] RISC-V: Support RISC-V Profiles 23.

2025-05-09 Thread Jiawei
This patch introduces support for RISC-V Profiles RV23A and RV23B [1], enabling developers to utilize these profiles through the -march option. [1] https://github.com/riscv/riscv-profiles/releases/tag/rva23-rvb23-v0.7-ratification-vote Version log: Update the testcases, using lowercase letter.

Re: [PATCH] Printf properly on systems without %zu [PR120086]

2025-05-09 Thread Jørgen Kvalsvik
On 5/6/25 13:36, Jakub Jelinek wrote: On Tue, May 06, 2025 at 01:28:16PM +0200, Jørgen Kvalsvik wrote: Mostly because it would make the print more noisy, and because by the time we have 4 billion prime paths, all systems would probably already have been crushed under the load of computing them.

Re: [PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Jakub Jelinek wrote: > On Fri, May 09, 2025 at 09:34:14AM +0200, Richard Biener wrote: > > > Perhaps better CONST_SCALAR_INT_P instead of CONST_INT_P? > > > > Do we ever get a wide_int for Pmode/ptr_mode? But sure, I can > > Most likely not. Only if we start supporting > 64

[committed] libgomp.{c, fortran}/interop-{hip, cuda}: Fix dg-run target selection

2025-05-09 Thread Tobias Burnus
Committed asr16-497-g94e63410474a36. It turned out that the interop HIP/CUDA testcases could FAIL in the following less common case: The CUDA or HIP runtime is installed but the default device is not an Nvidia or AMD device, respectively. With the commit, the 'dg-do run' is downgraded to a 'dg-

Re: [PATCH] Extend vect_recog_cond_expr_convert_pattern to handle floating point type.

2025-05-09 Thread Richard Biener
On Mon, Apr 28, 2025 at 3:30 PM liuhongt wrote: > > For floating point, !flag_trapping_math is needed for the pattern which > transforms 2 conversions to 1 conversion, and may lose 1 potential trap. > There shouldn't be any accuracy issue. > > It also handles real_cst if it can be represented in d

Re: [PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Jakub Jelinek
On Fri, May 09, 2025 at 11:01:58AM +0200, Richard Biener wrote: > On Fri, 9 May 2025, Jakub Jelinek wrote: > > > On Fri, May 09, 2025 at 09:34:14AM +0200, Richard Biener wrote: > > > > Perhaps better CONST_SCALAR_INT_P instead of CONST_INT_P? > > > > > > Do we ever get a wide_int for Pmode/ptr_mo

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Sandiford
Richard Biener writes: > On Thu, 8 May 2025, Pengfei Li wrote: > >> This patch improves the auto-vectorization for loops with known small >> trip counts by enabling the use of subvectors - bit fields of original >> wider vectors. A subvector must have the same vector element type as the >> origina

Re: [PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Jakub Jelinek wrote: > On Fri, May 09, 2025 at 11:01:58AM +0200, Richard Biener wrote: > > On Fri, 9 May 2025, Jakub Jelinek wrote: > > > > > On Fri, May 09, 2025 at 09:34:14AM +0200, Richard Biener wrote: > > > > > Perhaps better CONST_SCALAR_INT_P instead of CONST_INT_P? > >

[PATCH 3/3] Remove non-SLP path from vectorizable_operation

2025-05-09 Thread Richard Biener
This removes the non-SLP path from vectorizable_operation and folds away ncopies, replaces STMT_VINFO_VECTYPE with SLP_TREE_VECTYPE and removes a big comment that's inaccurate in many details since a long time. It does not get rid of the 'vec_stmt' argument since splitting the function into analys

[PATCH 1/3] Remove non-SLP path from vectorizable_operation

2025-05-09 Thread Richard Biener
Step 1 --- gcc/tree-vect-stmts.cc | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 3373d75a8ae..7a6a10ee0e6 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -6985,7 +6985,7 @@ vectorizable_opera

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Richard Sandiford wrote: > Richard Biener writes: > > On Thu, 8 May 2025, Pengfei Li wrote: > > > >> This patch improves the auto-vectorization for loops with known small > >> trip counts by enabling the use of subvectors - bit fields of original > >> wider vectors. A subvecto

Re: [PATCH 6/7] OpenMP: C front end support for "begin declare variant"

2025-05-09 Thread Tobias Burnus
Hi all, hi Sandra, I am wondering whether such an example (see attachment) should also be added, confirming that always the correct function is called. (It mixes base/variant calls in various ways, also thanks to 'dispatch novariants(true)'.) I expected it to pass – as the code should fall

Re: [PATCH] vect: Improve vectorization for small-trip-count loops using subvectors

2025-05-09 Thread Richard Biener
On Thu, 8 May 2025, Pengfei Li wrote: > This patch improves the auto-vectorization for loops with known small > trip counts by enabling the use of subvectors - bit fields of original > wider vectors. A subvector must have the same vector element type as the > original vector and enough bits for al

Re: [PATCH] AArch64: Optimize SVE loads/stores with ptrue predicates to unpredicated instructions.

2025-05-09 Thread Jennifer Schmitz
> On 8 May 2025, at 12:28, Richard Sandiford wrote: > > External email: Use caution opening links or attachments > > > Sorry for the slow review. > > Jennifer Schmitz writes: >> SVE loads and stores where the predicate is all-true can be optimized to >> unpredicated instructions. For exampl

Re: [PATCH] gimple-fold: Don't replace `{true/false} != false` with `true/false` inside GIMPLE_COND

2025-05-09 Thread Richard Biener
On Thu, May 8, 2025 at 9:05 PM Andrew Pinski wrote: > > This is like the patch where we don't want to replace `bool_name != 0` > with `bool_name` but for instead for INTEGER_CST. The only thing > difference is there are a few different forms for always true/always > false; only handle it if it was

Re: [PATCH] match: Remove (ne (cmp) 0) and (eq (cmp) 1) patterns

2025-05-09 Thread Richard Biener
On Fri, May 9, 2025 at 4:51 AM Andrew Pinski wrote: > > These patterns are not needed any more. There were already > 2 patterns which did `(ne bool_var 0)` into `bool_var` and > `(eq bool_var 1)` into `bool_var`. Just they were after the > pattern that did `(cmp (cond @0 @1 @2) @3)` simplification

Re: [PATCH] RISC-V: Use vclmul for CRC expansion if available

2025-05-09 Thread Anton Blanchard
Hi Jeff, > So this failed pre-commit CI: > > > https://github.com/ewlu/gcc-precommit-ci/issues/3301#issuecomment-2849962485 > > Whatever failure that is needs to be fixed :-) Sorry about that, I'll submit a new version with a fix to the test case. Thanks, Anton

[pushed] [PATCH] check_GNU_style: Remove literal prefix

2025-05-09 Thread Torbjörn SVENSSON
Hello, Below patch is pushed as obvious (r16-490-g86a7642ef59). Kind regards, Torbjörn -- The path "b/binutils/dwarf.c" should be printed as binutils/dwarf.c", not "inutils/dwarf.c". contrib/ChangeLog: * check_GNU_style_lib.py: Remove literal prefix. Signed-off-by: Torbjörn SVENSSON

[PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Richard Biener
RTL DSE forms store groups from unique invariant bases but that is confused when presented with constant addresses where it assigns one store group per unique address. That causes it to not consider 0x101:QI to alias 0x100:SI. Constant accesses can really alias to every object, in practice they a

Re: [pushed] [PATCH] check_GNU_style: Remove literal prefix

2025-05-09 Thread Andreas Schwab
On Mai 09 2025, Torbjörn SVENSSON wrote: > diff --git a/contrib/check_GNU_style_lib.py b/contrib/check_GNU_style_lib.py > index f680983d2f3..8b930ef6bdb 100755 > --- a/contrib/check_GNU_style_lib.py > +++ b/contrib/check_GNU_style_lib.py > @@ -279,7 +279,9 @@ def check_GNU_style_file(file, format)

Re: [pushed] [PATCH] check_GNU_style: Remove literal prefix

2025-05-09 Thread Torbjorn SVENSSON
On 2025-05-09 09:30, Andreas Schwab wrote: On Mai 09 2025, Torbjörn SVENSSON wrote: diff --git a/contrib/check_GNU_style_lib.py b/contrib/check_GNU_style_lib.py index f680983d2f3..8b930ef6bdb 100755 --- a/contrib/check_GNU_style_lib.py +++ b/contrib/check_GNU_style_lib.py @@ -279,7 +279,9 @@

Re: [PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Richard Biener
On Fri, 9 May 2025, Jakub Jelinek wrote: > On Fri, May 09, 2025 at 09:17:23AM +0200, Richard Biener wrote: > > RTL DSE forms store groups from unique invariant bases but that is > > confused when presented with constant addresses where it assigns > > one store group per unique address. That cause

Re: [PATCH v2] match.pd: Fold (x + y) >> 1 into IFN_AVG_FLOOR (x, y) for vectors

2025-05-09 Thread Richard Biener
On Thu, 8 May 2025, Pengfei Li wrote: > This patch folds vector expressions of the form (x + y) >> 1 into > IFN_AVG_FLOOR (x, y), reducing instruction count on platforms that > support averaging operations. For example, it can help improve the > codegen on AArch64 from: > add v0.4s, v0.4

[PATCH][14] tree-optimization/120156 - ICE in ptr_derefs_may_alias_p

2025-05-09 Thread Richard Biener
This picks the ptr_derefs_may_alias_p fix from the PR99954 fix which said: This makes us run into a latent issue in ptr_deref_may_alias_decl_p when the pointer is something like &MEM[0].a in which case we fail to handle non-SSA name pointers. Add code similar to what we have in ptr_derefs_may_ali

Re: [PATCH] rtl-optimization/120182 - wrong-code with RTL DSE and constant addresses

2025-05-09 Thread Jakub Jelinek
On Fri, May 09, 2025 at 09:34:14AM +0200, Richard Biener wrote: > > Perhaps better CONST_SCALAR_INT_P instead of CONST_INT_P? > > Do we ever get a wide_int for Pmode/ptr_mode? But sure, I can Most likely not. Only if we start supporting > 64-bit pointers. Jakub

Re: [PATCH] [testsuite] [ppc] pr87600, pr89313: test for __PPC__ as well

2025-05-09 Thread Alexandre Oliva
On Apr 16, 2025, Alexandre Oliva wrote: > On Apr 14, 2025, Peter Bergner wrote: >> On 4/11/25 1:03 PM, Alexandre Oliva wrote: >>> gcc.dg/pr87600.h and gcc.dg/pr89313.c test for __powerpc__ and >>> __POWERPC__ to choose ppc register names, but ppc-elf defines neither; >>> it defines __PPC__, so t

[PATCH, COMMITTED] MAINTAINERS: Update my email address

2025-05-09 Thread Peter Bergner
MAINTAINERS: Update my email address 2025-05-09  Peter Bergner  /     * MAINTAINERS: Update my email address and add myself to DCO. Signed-off-by: Peter Bergner ---  MAINTAINERS | 5 +++--  1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index b1e7fadf1

[PATCH] fortran: Fix debug info for unsigned(kind=1) and unsigned(kind=4) [PR120193]

2025-05-09 Thread Jakub Jelinek
Hi! As the following testcase shows, debug info for unsigned(kind=1) and unsigned(kind=4) vars is wrong while unsigned(kind=2), unsigned(kind=8) and unsigned(kind=16) look right. Instead of objects having unsigned(kind=1) type they have character(kind=1) and instead of unsigned(kind=4) they have c

[PATCH v2] match: Add a condition to `(ne (cmp) 0)` and `(eq (cmp) 1)` patterns for non-call exceptions

2025-05-09 Thread Andrew Pinski
The problem with these patterns is they will do a copy of the comparison so for non-call exceptions (and trapping math), we could copy a statement that can throw internally and then remove the landing pad information. Or in the case of throwing externally, always create a copy from GIMPLE_COND. Th

Re: [PATCH] [testsuite] [ppc] block-cmp-8 should require powerpc64

2025-05-09 Thread Alexandre Oliva
On Apr 11, 2025, Alexandre Oliva wrote: > * gcc.target/powerpc/block-cmp-8.c: Require powerpc64 > instruction execution support. > --- a/gcc/testsuite/gcc.target/powerpc/block-cmp-8.c > +++ b/gcc/testsuite/gcc.target/powerpc/block-cmp-8.c > -/* { dg-require-effective-target has_arch_p

[PATCH] aarch64: Fix narrowing warning in aarch64_detect_vector_stmt_subtype

2025-05-09 Thread Andrew Pinski
There is a narrowing warning in aarch64_detect_vector_stmt_subtype about gather_load_x32_cost and gather_load_x64_cost converting from int to unsigned. These fields are always unsigned and even the constructor for sve_vec_cost takes an unsigned. So let's just move the fields over to unsigned. Bui

[PATCH] aarch64: Fix narrowing warning in driver-aarch64.cc [PR118603]

2025-05-09 Thread Andrew Pinski
Since the AARCH64_CORE defines in aarch64-cores.def all use -1 for the variant, it is just easier to add the cast to unsigned in the usage in driver-aarch64.cc. Build and tested on aarch64-linux-gnu. gcc/ChangeLog: PR target/118603 * config/aarch64/driver-aarch64.cc (aarch64_cpu_

[PATCH 1/6] emit-rtl: document next_nonnote_nondebug_insn_bb () can breach into next BB

2025-05-09 Thread Vineet Gupta
gcc/ChangeLog: * emit-rtl.cc (next_nonnote_nondebug_insn): Update comments. Signed-off-by: Vineet Gupta --- gcc/emit-rtl.cc | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/emit-rtl.cc b/gcc/emit-rtl.cc index 3e2c4309dee6..b78b29ecf989 100644 --- a/gcc/emit-r

Re: [PATCH v19 1/3] contrib/: Add support for Cc: and Link: tags

2025-05-09 Thread Alejandro Colomar
On Fri, May 09, 2025 at 11:43:18PM +0200, Alejandro Colomar wrote: > Hi Joseph, > > On Fri, May 09, 2025 at 09:39:34PM +, Joseph Myers wrote: > > > > > contrib/ChangeLog: > > > > > > > > > > * gcc-changelog/git_commit.py (GitCommit): > > > > > Add support for 'Cc: ' and 'Link: ' t

  1   2   >