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

2025-05-10 Thread Jiawei
Committed on trunk, thanks! https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=43b450e3f72a53c744e77f55393962f1d349373a  BR, Jiawei 在 2025/5/11 0:42, Jeff Law 写道: On 5/10/25 6:30 AM, Jiawei wrote: This patch introduces support for RISC-V Profiles RV20 and RV22 [1], enabling developers to utiliz

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

2025-05-10 Thread Vineet Gupta
On 5/10/25 07:17, Jeff Law wrote: > On 5/9/25 2:27 PM, Vineet Gupta wrote: >> 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 >> ca

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

2025-05-10 Thread Vineet Gupta
On 5/10/25 06:49, Jeff Law wrote: > On 5/9/25 2:27 PM, Vineet Gupta wrote: >> 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

Re: [PATCH v1] libstdc++: More efficient weekday from year_month_day.

2025-05-10 Thread Cassio Neri
Thanks Andrew for your prompt reply. The results below regard my PoC which is as close to the proposed patch as I could make. This is because I can't have chrono with my patch on godbold for a comparison between current chrono and patched chrono. I tried on all platforms that I could make it to c

Re: [PATCH, fortran] Fix simple typo in libgfortran

2025-05-10 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: Thanks for the tip! I ran the git_check_commit.py script, and it reported "OK." However, when I regenerated the ChangeLog, the function name wasn't included automatically. Usually 'git diff' shows the function name in the '@@' line, but that does not always work – ei

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

2025-05-10 Thread Jeff Law
On 5/10/25 6:30 AM, Jiawei wrote: 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 Profil

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

2025-05-10 Thread Jeff Law
On 5/9/25 2:27 PM, Vineet Gupta wrote: 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 3e2c

Re: [PATCH v1] libstdc++: More efficient weekday from year_month_day.

2025-05-10 Thread Andrew Pinski
On Mon, May 5, 2025, 11:48 AM Cassio Neri wrote: > Use a better algorithm to calculate n % 7, taking into account that the > divisor > is a Mersenne number. This is explained in this two-part lightning talk at > CppCon 2024 [1, 2]. > > Roughly speaking, the algorithm is used for n = sys_days but

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

2025-05-10 Thread Jeff Law
On 5/9/25 2:27 PM, Vineet Gupta wrote: 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

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

2025-05-10 Thread Jeff Law
On 5/9/25 2:27 PM, Vineet Gupta wrote: 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).

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

2025-05-10 Thread Jeff Law
On 5/9/25 2:27 PM, Vineet Gupta wrote: 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

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

2025-05-10 Thread Jeff Law
On 5/9/25 2:27 PM, Vineet Gupta wrote: 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 blen

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

2025-05-10 Thread Jonathan Yong
On 5/10/25 12:54 PM, LIU Hao wrote: 在 2025-5-10 20:48, Jonathan Yong 写道: On 5/9/25 4:26 PM, LIU Hao wrote: 在 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_

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

2025-05-10 Thread Jeff Law
On 5/9/25 4:09 AM, Anton Blanchard wrote: 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.

Re: [extern] Re: [PATCH 1/2] libstdc++: Support UNC paths on MinGW in fs::path

2025-05-10 Thread Johannes Grunenberg
On 10/05/2025 15:09, Jonathan Wakely wrote: > Please confirm that you're using it that way (and not just adding it > because others do so). Yes, that's how I'm using it.

Re: [PATCH 1/2] libstdc++: Support UNC paths on MinGW in fs::path

2025-05-10 Thread Jonathan Wakely
On Sat, 10 May 2025 at 12:49, Johannes Grunenberg wrote: > > UNC paths on Windows start with a root name "\\server" instead of a > drive letter ("c:"). Support for parsing this was already implemented > for cygwin, which (compared to MinGW) doesn't use backslash as the > preferred separator. > Thi

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

2025-05-10 Thread LIU Hao
在 2025-5-10 20:48, Jonathan Yong 写道: On 5/9/25 4:26 PM, LIU Hao wrote: 在 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 effec

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

2025-05-10 Thread Jonathan Yong
On 5/9/25 4:26 PM, LIU Hao wrote: 在 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

Re: [PATCH, fortran] Fix simple typo in libgfortran

2025-05-10 Thread Tobias Burnus
Hi Yuao, Yuao Ma wrote: I'm writing to express my sincere gratitude for the opportunity to participate in Google Summer of Code with GCC this year. I am very enthusiastic about this program and fully committed to making a valuable contribution and fulfilling my responsibilities. Welcome an

Re: [PATCH, fortran] Fix simple typo in libgfortran

2025-05-10 Thread Thomas Koenig
Hi Yuao, first, good to have you on board! As I am relatively new to submitting patches via mailing lists, I would like to send a very simple patch primarily to familiarize myself with the correct procedure. I have reviewed the contribution guidelines on the GCC website and have tried to fol

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

2025-05-10 Thread Tobias Burnus
Jakub Jelinek wrote: This unfortunately only fixes some of the cases in the new testcase. We indeed should drop the kind argument from what is passed to the library, but need to do it not only when one uses the argument name for it (so kind=4 etc.) but also when one passes all the arguments to t

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

2025-05-10 Thread Thomas Koenig
Hi Jakub, The following patch uses a variant of the character(kind=4) type for unsigned(kind=4) and a distinct type based on character(kind=1) type for unsigned(kind=1). The reason for the latter is that unsigned_char_type_node has TYPE_STRING_FLAG set on it, so it has DW_AT_encoding DW_ATE_uns

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

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

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

2025-05-09 Thread Andrew Pinski
On Fri, May 9, 2025 at 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

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

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

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: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: > 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

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 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: [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 > > @

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] 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 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] 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: R

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 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] 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, ...

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

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.

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

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] 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

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] 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] 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.

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

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

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 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.p

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:

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 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] 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: Improv

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 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 > >

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

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] 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 >

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] 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] 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] 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? > >

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

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] 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

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] 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] 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 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] 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] 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

Re: [PATCH] vxworks: libstdc++: include ioLib.h for dup()

2025-05-08 Thread Jonathan Wakely
On Fri, 9 May 2025, 03:29 Alexandre Oliva, wrote: > > vxworks's dup function is not declared in unistd.h, but c++23/print.cc > expects to be able to call it if unistd.h is available. On vxworks, > the function is only declared in ioLib.h, so arrange to include it. > > Tested with gcc-14 targetin

Re: [PATCH v5 05/10] libstdc++: Implement layout_left from mdspan.

2025-05-08 Thread Tomasz Kaminski
On Wed, May 7, 2025 at 11:37 AM Luc Grosheintz wrote: > > On 5/6/25 2:47 PM, Tomasz Kaminski wrote: > > On Tue, May 6, 2025 at 1:39 PM Luc Grosheintz > > wrote: > > > >> > >> On 5/6/25 11:28 AM, Tomasz Kaminski wrote: > >>> For better reference, here is illustration of the design I was thinking

Re: [PATCH] ctf: emit CTF_K_ARRAY for GNU vector types

2025-05-08 Thread Indu
On 2025-05-01 2:34 p.m., Bruce McCulloch wrote: Currently, there is a check in gen_ctf_array_type that prevents GNU vectors generated by the vector attribute from being emitted (e.g. typedef int v8si __attribute__ ((vector_size (32)));). Because this check happens in dwarf2ctf.cc, this prevents G

Re: [PATCH] [testsuite] [ppc] require float128 available for copysign

2025-05-08 Thread Alexandre Oliva
On Apr 11, 2025, Alexandre Oliva wrote: > for gcc/testsuite/ChangeLog > * lib/target-supports.exp (check_effective_target_ifn_copysign): > Require float128 on ppc. I hereby withdraw this patch, it was based on a misunderstanding. -- Alexandre Oliva, happy hackerhttps:

Re: [PATCH v2] RISC-V: Fix missing implied Zicsr from Zve32x

2025-05-08 Thread Nelson Chu
I think this should be sent to gcc-patches@gcc.gnu.org rather than binut...@sourceware.org, so redirect it to the right place. Nelson On Wed, Apr 30, 2025 at 10:30 AM Jerry Zhang Jian < jerry.zhangj...@sifive.com> wrote: > The Zve32x extension depends on the Zicsr extension. > Currently, enablin

RE: [PATCH v1 0/5] Add testcases for another case of vec_duplicate + vadd.vv combine

2025-05-08 Thread Li, Pan2
Robin Dapp ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffreya...@gmail.com; Chen, Ken ; Liu, Hongtao ; Robin Dapp Subject: Re: [PATCH v1 0/5] Add testcases for another case of vec_duplicate + vadd.vv combine >> it's just a vector cost model issue

Re: [PATCH] aarch64: Use LDR for first-element loads for Advanced SIMD

2025-05-08 Thread Richard Sandiford
Dhruv Chawla writes: > This patch modifies Advanced SIMD assembly generation to emit an LDR > instruction when a vector is created using a load to the first element with > the > other elements being zero. > > This is similar to what *aarch64_combinez already does. > > Example: > > uint8x16_t foo(

Re: [PATCH 2/3] gimple-fold: Return early for GIMPLE_COND with true/false

2025-05-08 Thread Andrew Pinski
On Wed, Apr 23, 2025 at 2:03 AM Richard Biener wrote: > > On Wed, Apr 23, 2025 at 5:59 AM Andrew Pinski > wrote: > > > > To speed up things slightly so not needing to call all the way through > > to match and simplify, we should return early for true/false on GIMPLE_COND. > > I think we'd still

Re: [PATCH] libstdc++: Update rows in C++17 status table

2025-05-08 Thread Jonathan Wakely
On Thu, 8 May 2025 at 18:57, Björn Schäpers wrote: > > Am 08.05.2025 um 15:50 schrieb Jonathan Wakely: > > Document that std::to_chars and std::from_chars are complete, mentioning > > the libraries used for floating-point types. > > > > libstdc++-v3/ChangeLog: > > > > * doc/xml/manual/status

RE: [PATCH ]RISCV :Added MIPS P8700 Subtarget

2025-05-08 Thread Palmer Dabbelt
e.com; Jesse Huang ; and...@sifive.com Subject: Re: [PATCH]RISCV :Added MIPS P8700 Subtarget Hi @Jeff Law and @pal...@dabbelt.com , Please do needful by reviewing the below changes and helps us to upstream the same . Thank you ~U -Original Message- From: Umesh Kalappa Sent: 29 April 20

Re: [PATCH v1 0/5] Add testcases for another case of vec_duplicate + vadd.vv combine

2025-05-08 Thread Robin Dapp
it's just a vector cost model issue and some loops are not profitable to vectorize? Yes. For example, when gpr2vr is 1, int8_t cannot vectorize while uint8_t can. OK, understood. I think that's expected given the fine granularity of the tests. IMHO nothing that should block progress. -- R

Re: [PATCH] libstdc++: Update rows in C++17 status table

2025-05-08 Thread Björn Schäpers
Am 08.05.2025 um 15:50 schrieb Jonathan Wakely: Document that std::to_chars and std::from_chars are complete, mentioning the libraries used for floating-point types. libstdc++-v3/ChangeLog: * doc/xml/manual/status_cxx2017.xml: Update status for std::to_chars and std::from_chars.

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

2025-05-08 Thread Jonathan Wakely
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 guard object. "appropriately" > > libstdc++-v3/ChangeLog: > >

Re: [PATCH] libstdc++: Use _Padding_sink in __formatter_chrono to produce padded output.

2025-05-08 Thread Jonathan Wakely
On Wed, 7 May 2025 at 12:00, Tomasz Kamiński wrote: > > Formatting code is extracted to _M_format_to function, that produced output > to specified iterator. This function is now invoked either with __fc.out() > directly (if width is not specified) or _Padding_sink::out(). > > This avoid formatting

Re: [PATCH v2] libstdc++: Provide ability to query _Sink_iter if writes are discarded.

2025-05-08 Thread Jonathan Wakely
On Tue, 6 May 2025 at 13:30, Tomasz Kamiński wrote: > > This patch provides _M_discarding functiosn for _Sink_iter and _Sink function > that returns true, if any further writes to the _Sink_iter and underlying > _Sink, > will be discared, and thus can be omitted. > > Currently only the _Padding_s

Re: [PATCH] Fix tree-ssa/pr31261.c testcase after r16-400 [PR120168]

2025-05-08 Thread Richard Biener
> Am 08.05.2025 um 18:19 schrieb Andrew Pinski : > > AFter r16-400-g5e363ffefaceb9, on targets where char is unsigned by > default, tree-ssa/pr31261.c testcase started to fail: > FAIL: gcc.dg/tree-ssa/pr31261.c scan-tree-dump-times original "return > (char) -(unsigned char) c

Re: [PATCH 2/2] gensupport: validate compact constraint modifiers

2025-05-08 Thread Richard Sandiford
Richard Earnshaw writes: > For constraints there are operand modifiers and constraint qualifiers. > Operand modifiers apply to all alternatives and must appear, in > traditional syntax before the first alternative. Constraint > qualifiers, on the other hand must appear in each alternative to whic

RE: [PATCH ]RISCV :Added MIPS P8700 Subtarget

2025-05-08 Thread Umesh Kalappa
-patches@gcc.gnu.org; pal...@dabbelt.com Cc: kito.ch...@sifive.com; Jesse Huang ; and...@sifive.com Subject: Re: [PATCH]RISCV :Added MIPS P8700 Subtarget Hi @Jeff Law and @pal...@dabbelt.com , Please do needful by reviewing the below changes and helps us to upstream the same . Thank you ~U

RE: [PATCH v1 0/5] Add testcases for another case of vec_duplicate + vadd.vv combine

2025-05-08 Thread Li, Pan2
_binary.h" + +DEF_VX_BINARY_CASE_1(int64_t, +, VX_BINARY_BODY) + +/* { dg-final { scan-assembler-not {vadd.vx} } } */ Pan -Original Message- From: Robin Dapp Sent: Thursday, May 8, 2025 8:01 PM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; jeffr

Re: [PATCH] emit-rtl: Add extra checks for paradoxical hardware subregs [PR119966]

2025-05-08 Thread Richard Sandiford
Dimitar Dimitrov writes: > On Tue, May 06, 2025 at 01:17:40PM +0100, Richard Sandiford wrote: >> Dimitar Dimitrov writes: >> > After r16-160-ge6f89d78c1a752, late_combine2 started transforming the >> > following RTL for pru-unknown-elf: >> > >> > (insn 3949 3948 3951 255 (set (reg:QI 56 r14.b0

Re: [PATCH v2] asf: Fix calling of emit_move_insn on registers of different modes [PR119884]

2025-05-08 Thread Richard Sandiford
Konstantinos Eleftheriou writes: > During the base register initialization, when we are eliminating the load > instruction, we were calling `emit_move_insn` on registers of the same > size but of different mode in some cases, causing an ICE. > > This patch uses `lowpart_subreg` for the base regist

Re: [PATCH] libstdc++: Update rows in C++17 status table

2025-05-08 Thread Jonathan Wakely
On Thu, 8 May 2025 at 14:59, Jakub Jelinek wrote: > > On Thu, May 08, 2025 at 02:50:27PM +0100, Jonathan Wakely wrote: > > Document that std::to_chars and std::from_chars are complete, mentioning > > the libraries used for floating-point types. > > > > libstdc++-v3/ChangeLog: > > > > * doc/x

  1   2   3   4   5   6   7   8   9   10   >