Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 11:09 PM Jonathan Wakely wrote: > On Thu, 5 Jun 2025 at 18:58, Tomasz Kaminski wrote: > > > > > > > > On Thu, Jun 5, 2025 at 6:44 PM Jonathan Wakely > wrote: > >> > >> On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski > wrote: > >> > > >> > > >> > > >> > On Thu, Jun 5, 2025 a

Re: [PATCH] cselim: Update the vop manually for cond_if_else_store replacement

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 7:30 AM Andrew Pinski wrote: > > To speed up things slightly, we can do the update of the vop for the > newly inserted store manually. > This will also allow a simplified part of cselim to be used inside > phi-opt to move the store out earlier and independent of the full cse

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

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 6:09 AM Dhruv Chawla wrote: > > On 05/06/25 12:01, Richard Biener wrote: > > External email: Use caution opening links or attachments > > > > > > On Wed, Jun 4, 2025 at 7:44 PM Andrew Pinski wrote: > >> > >> On Wed, Jun 4, 2025 at 6:27 AM Richard Biener > >> wrote: > >>> >

Ping²: [PATCH 0/2] asm() operand 'c' modifier handling

2025-06-05 Thread Jan Beulich
On 21.11.2024 13:03, Jan Beulich wrote: > Documentation is pretty clear here: "Require a constant operand and > print the constant expression with no punctuation." See the patches for > further details. > > 1: fix asm() operand 'c' modifier handling > 2: x86: fix asm() operand 'c' modifier handlin

[PATCH] doc: allow extend.texi to be processed by makeinfo 4.13

2025-06-05 Thread Jan Beulich
As per documentation, even 4.7 ought to suffice. At least 4.13 objects to there being nothing ahead of the first comma in @xref{}. --- The text inserted it merely a guess; I'm open to better suggestions. Noticed with gcc15, so may want backporting. --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.t

[PATCH] doc: allow gcov.texi to be processed by makeinfo 4.13

2025-06-05 Thread Jan Beulich
As per documentation, even 4.7 ought to suffice. At least 4.13 objects to there being a blank between @anchor and the opening curly brace. --- Noticed with gcc15, so may want backporting. --- a/gcc/doc/gcov.texi +++ b/gcc/doc/gcov.texi @@ -1077,7 +1077,7 @@ condition 1 not covered (true)

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

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 2:08 AM 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/g

Re: [PATCH] expand: Improve store_field for `{}` stores of non mode size [PR110459]

2025-06-05 Thread Richard Biener
On Fri, Jun 6, 2025 at 12:14 AM Andrew Pinski wrote: > > Currently we expand `{}` and store zeros to the stack and then do a full > mode load back. This is a waste, instead we should just use the zero cst > in the mode that fits the bitsize. > > Boostrapped and tested on x86_64-linux-gnu. > Build

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

2025-06-05 Thread Richard Biener
On Thu, Jun 5, 2025 at 4:44 PM Robin Dapp wrote: > > >> But that would not pass the alignment check either, no? In fact, I assume > >> that for strided loads we have a scalar type as component (ptype), so we > >> always get supported unaligned accesses here? > > > Perhaps I'm missing something, t

Re: [PATCH] [lra] force reg update after spilling to memory [PR120424]

2025-06-05 Thread Alexandre Oliva
On May 27, 2025, Vladimir Makarov wrote: > This is a good explanation of the patch and the bug and the affected > code seem very old (from the first commit of LRA). So thank you very > much for working on and fixing this PR. Thanks for the review. Jeff points out gcc.target/avr/torture/pr11859

Re: [AutoFDO] Profile merging for clone test

2025-06-05 Thread Andrew Pinski
On Thu, Jun 5, 2025 at 11:01 PM Kugan Vivekanandarajah wrote: > > Hi Andrew, > > > On 6 Jun 2025, at 8:18 am, Andrew Pinski wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Wed, Jun 4, 2025 at 12:02 AM Kugan Vivekanandarajah > > wrote: > >> > >> This patch i

Re: [AutoFDO] Profile merging for clone test

2025-06-05 Thread Kugan Vivekanandarajah
Hi Andrew, > On 6 Jun 2025, at 8:18 am, Andrew Pinski wrote: > > External email: Use caution opening links or attachments > > > On Wed, Jun 4, 2025 at 12:02 AM Kugan Vivekanandarajah > wrote: >> >> This patch introduces a new testcase to verify the merging of profiles >> is performed for clo

Re: [PATCH] i386: Improve "movcc" expander for DImode immediates [PR120553]

2025-06-05 Thread Richard Biener
On Thu, 5 Jun 2025, Uros Bizjak wrote: > "movcc" expander uses x86_64_general_operand predicate that limits the > range of immediate operands to 32-bit size. The usage of this predicate > causes ifcvt to force out-of-range immediates to registers when converting > through noce_try_cmove. The tes

Re: [PATCH] ranger: Add support for float <-> float casts [PR120231]

2025-06-05 Thread Aldy Hernandez
Andrew MacLeod writes: > Fine with me.  I don't think Aldy got to many of the cast conversions. None is the actual answer :). Thanks Jakub. Aldy

[PATCH] cselim: Update the vop manually for cond_if_else_store replacement

2025-06-05 Thread Andrew Pinski
To speed up things slightly, we can do the update of the vop for the newly inserted store manually. This will also allow a simplified part of cselim to be used inside phi-opt to move the store out earlier and independent of the full cselim. gcc/ChangeLog: * tree-ssa-phiopt.cc (cond_if_els

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

2025-06-05 Thread Vineet Gupta
On 6/5/25 20:09, 钟居哲 wrote: > Hi. Vineet. The series of patches LGTM from myside. Thx. > But I wonder whether you would like to optimize VXRM which is using > mode-switching too. Was not planning to :-) > I saw in spec 2017 spec 624 x264. > csrwi vxrm is calling multiples times. Is it now ?

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

2025-06-05 Thread Dhruv Chawla
On 05/06/25 12:01, Richard Biener wrote: External email: Use caution opening links or attachments On Wed, Jun 4, 2025 at 7:44 PM Andrew Pinski wrote: On Wed, Jun 4, 2025 at 6:27 AM Richard Biener wrote: On Thu, May 29, 2025 at 10:04 AM wrote: From: Dhruv Chawla This patch folds the f

Re: [PATCH v2 4/5] RISC-V: frm/mode-switch: Reduce FRM restores on DYN transition [PR119164]

2025-06-05 Thread Vineet Gupta
On 6/5/25 19:11, Jiawei wrote: >> Changes since v1: >> - NFC with attribution to PR/119164 it helps fix and the testcase. >> >> 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_EM

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Max Filippov
On Thu, Jun 5, 2025 at 7:20 PM Takayuki 'January June' Suwa wrote: > > On 2025/06/06 8:55, Max Filippov wrote: > > > On Thu, Jun 05, 2025 at 09:19:19PM +0900, Takayuki 'January June' Suwa > > wrote: > >> On 2025/06/05 5:09, Max Filippov wrote: > >>> On Tue, Jun 3, 2025 at 7:44 AM Takayuki 'Januar

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

2025-06-05 Thread 钟居哲
Hi. Vineet. The series of patches LGTM from myside. But I wonder whether you would like to optimize VXRM which is using mode-switching too. I saw in spec 2017 spec 624 x264. csrwi vxrm is calling multiples times. juzhe.zh...@rivai.ai From: Vineet Gupta Date: 2025-06-06 08:04 To: gcc-patches

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Takayuki 'January June' Suwa
On 2025/06/06 8:55, Max Filippov wrote: On Thu, Jun 05, 2025 at 09:19:19PM +0900, Takayuki 'January June' Suwa wrote: On 2025/06/05 5:09, Max Filippov wrote: On Tue, Jun 3, 2025 at 7:44 AM Takayuki 'January June' Suwa wrote: By using the previously unused CEIL|FLOOR|ROUND.S floating-point c

Re: [PATCH v2 4/5] RISC-V: frm/mode-switch: Reduce FRM restores on DYN transition [PR119164]

2025-06-05 Thread Jiawei
Changes since v1: - NFC with attribution to PR/119164 it helps fix and the testcase. 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 t

Ping^3: [RFC PATCH v2] cselib: Reuse VALUEs on reg adjustments

2025-06-05 Thread Bohan Lei
Ping. -- From:Bohan Lei Send Time:2025 May. 16 (Fri.) 17:27 To:Jeff Law; "gcc-patches" CC:jakub Subject:Ping^2: [RFC PATCH v2] cselib: Reuse VALUEs on reg adjustments Ping. ---

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

2025-06-05 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

[PATCH v2 5/5] RISC-V: frm/mode-switch: robustify call_insn backtracking [PR120203]

2025-06-05 Thread Vineet Gupta
Changes since v1: - NFC change to commitlog and drop test case for PR/119164 As described in prior patches of this series, RM manipulation could require save/restore around calls (not in the caller-saved sense) but to retain the global semantics. To that effect the current implementation require

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

2025-06-05 Thread Vineet Gupta
Changes since v1: - NFC with attribution to PR/119164 it helps fix and the testcase. 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

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

2025-06-05 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 v2 1/5] emit-rtl: document next_nonnote_nondebug_insn_bb () can breach into next BB

2025-06-05 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 3f453cda67ed..65e0f1e6d8d6 100644 --- a/gcc/emit-r

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

2025-06-05 Thread Vineet Gupta
Changes since v1 - Dropped removal of TARGET_MODE_AFTER - NFC changes to last 2 patches, with reattribution to PRs they address seperately. 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 nee

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Max Filippov
On Thu, Jun 05, 2025 at 09:19:19PM +0900, Takayuki 'January June' Suwa wrote: > On 2025/06/05 5:09, Max Filippov wrote: > > On Tue, Jun 3, 2025 at 7:44 AM Takayuki 'January June' Suwa > > wrote: > > > > > > By using the previously unused CEIL|FLOOR|ROUND.S floating-point > > > coprocessor > > >

Re: [PATCH v6 0/3][Middle-end]Provide more contexts for -Warray-bounds and -Wstringop-* warning messages

2025-06-05 Thread Kees Cook
On Thu, Jun 05, 2025 at 03:52:21PM -0700, Kees Cook wrote: > On Mon, May 19, 2025 at 11:23:34AM -0700, Kees Cook wrote: > > On Fri, May 16, 2025 at 01:34:14PM +, Qing Zhao wrote: > > > Adding -fdiagnotics-details into GCC to provide more hints to the > > > end users on how the warnings come fro

Re: [PATCH] RISC-V:Add the MIPS P8700 conditional move extension instruction support.

2025-06-05 Thread Jeff Law
On 6/5/25 2:30 AM, Umesh Kalappa wrote: Thank you @Jeff Law   for the initial comments ,yes will update the ChangeLog accordingly and typo fix and >>My biggest concern is overall structure of riscv_expand_conditional_move.  I kind of get the sense >>that we ne

Re: [PATCH v6 0/3][Middle-end]Provide more contexts for -Warray-bounds and -Wstringop-* warning messages

2025-06-05 Thread Kees Cook
On Mon, May 19, 2025 at 11:23:34AM -0700, Kees Cook wrote: > On Fri, May 16, 2025 at 01:34:14PM +, Qing Zhao wrote: > > Adding -fdiagnotics-details into GCC to provide more hints to the > > end users on how the warnings come from, in order to help the user > > to locate the exact location in so

Re: [AutoFDO] Profile merging for clone test

2025-06-05 Thread Andrew Pinski
On Wed, Jun 4, 2025 at 12:02 AM Kugan Vivekanandarajah wrote: > > This patch introduces a new testcase to verify the merging of profiles > is performed for cloned functions. > > Since this is invoked very early, before the pass manager, we need to > set up the dumping explicitly. This is similar t

Re: [PATCH] Add newlib to gitignore

2025-06-05 Thread Thomas Schwinge
Hi! On 2025-06-02T22:01:44+0530, Arijit Kumar Das wrote: >> Umm, I don't think so. I've been building crosses with gcc for decades. >> It should not be necessary, though it may sometimes be convenient. Right. Similarly to how it's, for example, documented on

[PATCH] expand: Improve store_field for `{}` stores of non mode size [PR110459]

2025-06-05 Thread Andrew Pinski
Currently we expand `{}` and store zeros to the stack and then do a full mode load back. This is a waste, instead we should just use the zero cst in the mode that fits the bitsize. Boostrapped and tested on x86_64-linux-gnu. Build and tested for aarch64-linux-gnu. PR middle-end/110459 gcc

Re: [PATCH] libstdc++: do not use an unreserved name in _Temporary_buffer [PR119496]

2025-06-05 Thread Giuseppe D'Angelo
On 05/06/2025 21:46, Jonathan Wakely wrote: On Thu, 5 Jun 2025 at 20:19, Giuseppe D'Angelo wrote: Hi, This is a super-minor fix regarding the usage of an unreserved identifier in some private API. The patch is also available on forge here: https://forge.sourceware.org/gcc/gcc-TEST/pulls/53 I'

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 18:58, Tomasz Kaminski wrote: > > > > On Thu, Jun 5, 2025 at 6:44 PM Jonathan Wakely wrote: >> >> On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski wrote: >> > >> > >> > >> > On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely wrote: >> >> >> >> On Thu, 5 Jun 2025 at 10:00, Tomasz

Re: [PING * 3][PATCH v3] Add new warning Wmissing-designated-initializers [PR39589]

2025-06-05 Thread Peter Frost
Thanks for the review, much appreciated. Agreed on all those points, I'll remove it from -Wextra and just leave it as a standalone warning, and I'll add those tests you suggested. On 02/06/2025 19:08, Joseph Myers wrote: On Sun, 1 Jun 2025, Peter Frost wrote: Ping https://gcc.gnu.org/piperma

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > On Thu, Jun 05, 2025 at 08:46:25PM +, Joseph Myers wrote: > > On Thu, 5 Jun 2025, Marek Polacek wrote: > > > > > Also adjust redirects. > > > > I don't see the .htaccess updates here, the existing redirects should be > > updated and a new one for /

[PATCH] i386: Improve "movcc" expander for DImode immediates [PR120553]

2025-06-05 Thread Uros Bizjak
"movcc" expander uses x86_64_general_operand predicate that limits the range of immediate operands to 32-bit size. The usage of this predicate causes ifcvt to force out-of-range immediates to registers when converting through noce_try_cmove. The testcase: long long foo (long long c) { return c >

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Marek Polacek
On Thu, Jun 05, 2025 at 08:46:25PM +, Joseph Myers wrote: > On Thu, 5 Jun 2025, Marek Polacek wrote: > > > Also adjust redirects. > > I don't see the .htaccess updates here, the existing redirects should be > updated and a new one for /c99status.html added. Like so? -- >8 -- --- htdocs/.h

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > Also adjust redirects. I don't see the .htaccess updates here, the existing redirects should be updated and a new one for /c99status.html added. -- Joseph S. Myers josmy...@redhat.com

Re: [PATCH] doc: update links to c99status.html

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > Once we rename and move c99status.html, we also have to > update the links in the manual. > > -- >8 -- > gcc/ChangeLog: > > * doc/invoke.texi: Update a link to c99status.html. > * doc/standards.texi: Likewise. OK. -- Joseph S. Myers josmy

Re: [wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Joseph Myers
On Thu, 5 Jun 2025, Marek Polacek wrote: > Coming back to a project I first attempted here: > > but this time following steps as outlined by Joseph here: > . > > This patch

Re: [PATCH 03/14] aarch64: Relaxed SEL combiner patterns for unpacked SVE FP conversions

2025-06-05 Thread Richard Sandiford
Spencer Abson writes: > diff --git a/gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_cvtf_1.c > b/gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_cvtf_1.c > new file mode 100644 > index 000..8f69232f2cf > --- /dev/null > +++ b/gcc/testsuite/gcc.target/aarch64/sve/unpacked_cond_cvtf_

Re: c++: Fix greater-than operator in braced-init-lists [PR123456]

2025-06-05 Thread Eczbek
typo in subject - should be [PR116928] On June 5, 2025 2:34:23 PM EDT, Eczbek wrote: >From 0210a1a410cfafd79521e15cd96682ed3d5b4943 Mon Sep 17 00:00:00 2001 >From: Eczbek >Date: Thu, 5 Jun 2025 14:27:48 -0400 >Subject: [PATCH] c++: [PR116928] > > PR c++/116928 > >gcc/cp/ChangeLog: > >

[PATCH] emit-rtl: Use simplify_subreg_regno to validate hardware subregs [PR119966]

2025-06-05 Thread Dimitar Dimitrov
PR119966 showed that combine could generate unfoldable hardware subregs for pru-unknown-elf. To fix, strengthen the checks performed by validate_subreg. The simplify_subreg_regno performs more validity checks than the simple info.representable_p. Most importantly, the targetm.hard_regno_mode_ok

Re: [PATCH 02/14] aarch64: Add support for unpacked SVE FP conversions

2025-06-05 Thread Richard Sandiford
Richard Sandiford writes: >> ;; Predicated float-to-integer conversion, either to the same width or >> wider. >> (define_insn >> "@aarch64_sve__nontrunc" >>[(set (match_operand:SVE_FULL_HSDI 0 "register_operand") >> @@ -9517,18 +9537,34 @@ >>} >> ) >> >> +;; As above, for pairs used

[PATCH] doc: update links to c99status.html

2025-06-05 Thread Marek Polacek
Once we rename and move c99status.html, we also have to update the links in the manual. -- >8 -- gcc/ChangeLog: * doc/invoke.texi: Update a link to c99status.html. * doc/standards.texi: Likewise. --- gcc/doc/invoke.texi| 4 ++-- gcc/doc/standards.texi | 4 ++-- 2 files change

[wwwdocs] Add C status page (rename c99status.html)

2025-06-05 Thread Marek Polacek
Coming back to a project I first attempted here: but this time following steps as outlined by Joseph here: . This patch does step (a). Patch to update the GCC manual to fol

Re: [PATCH] libstdc++: do not use an unreserved name in _Temporary_buffer [PR119496]

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 20:19, Giuseppe D'Angelo wrote: > > Hi, > > This is a super-minor fix regarding the usage of an unreserved > identifier in some private API. The patch is also available on forge here: > > https://forge.sourceware.org/gcc/gcc-TEST/pulls/53 > > I'm just a bit unsure about where/

[PATCH] libstdc++: do not use an unreserved name in _Temporary_buffer [PR119496]

2025-06-05 Thread Giuseppe D'Angelo
Hi, This is a super-minor fix regarding the usage of an unreserved identifier in some private API. The patch is also available on forge here: https://forge.sourceware.org/gcc/gcc-TEST/pulls/53 I'm just a bit unsure about where/how to add an autotest for this, any feedback is welcome. Thank

c++: Fix greater-than operator in braced-init-lists [PR123456]

2025-06-05 Thread Eczbek
From 0210a1a410cfafd79521e15cd96682ed3d5b4943 Mon Sep 17 00:00:00 2001 From: Eczbek Date: Thu, 5 Jun 2025 14:27:48 -0400 Subject: [PATCH] c++: [PR116928] PR c++/116928 gcc/cp/ChangeLog: * parser.cc (cp_parser_braced_list): gcc/testsuite/ChangeLog: * g++.dg/parse/templ

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 6:44 PM Jonathan Wakely wrote: > On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski wrote: > > > > > > > > On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely > wrote: > >> > >> On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski > wrote: > >> > > >> > > >> > > >> > On Thu, Jun 5, 2025 a

Re: [PATCH 02/14] aarch64: Add support for unpacked SVE FP conversions

2025-06-05 Thread Richard Sandiford
Spencer Abson writes: > @@ -9487,21 +9489,39 @@ > ;; - FCVTZU > ;; - > > -;; Unpredicated conversion of floats to integers of the same size (HF to HI, > -;; SF to SI or DF to DI). > -(define_expand "2" > - [(set (match_op

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 15:42, Tomasz Kaminski wrote: > > > > On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely wrote: >> >> On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: >> > >> > >> > >> > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: >> >> >> >> Rename __semaphore_base to __semaph

[committed] cobol: Guard clock_gettime(). [PR119975]

2025-06-05 Thread Robert Dubner
>From 5aeef30c9f9fcb6b28403ad015790fdb273106be Mon Sep 17 00:00:00 2001 From: Robert Dubner mailto:rdub...@symas.com Date: Thu, 5 Jun 2025 10:53:02 -0400 Subject: [PATCH] cobol: Guard clock_gettime(). [PR119975] This attempts to eliminate "'clock_gettime' not declared..." when building on x86_64-a

Re: [PATCH 01/14] aarch64: Extend iterator support for partial SVE FP modes

2025-06-05 Thread Richard Sandiford
Spencer Abson writes: > diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md > index 146453b0516..b4ebc493a4d 100644 > --- a/gcc/config/aarch64/iterators.md > +++ b/gcc/config/aarch64/iterators.md > @@ -479,13 +479,25 @@ > ;; All fully-packed SVE integer and Advanced SIM

Re: [PATCH 00/14] aarch64: Add support for unpacked SVE FP operations

2025-06-05 Thread Richard Sandiford
Spencer Abson writes: > This series incrementally adds support for operations on unpacked vectors > of floating-point values. By "unpacked", we're referring to the in-register > layout of partial SVE vector modes. For example, the elements of a VNx4HF > are stored as: > > ... | X | HF | X | HF |

Re: [PATCH v2] aarch64:sve: Use make_ssa_name instead of create_tmp_var in the folder

2025-06-05 Thread Richard Sandiford
Andrew Pinski writes: > Currently gimple_folder::convert_and_fold calls create_tmp_var; that > means while in ssa form, the pass which calls fold_stmt will always > have to update the ssa (via TODO_update_ssa or otherwise). This seems > not very useful since we know that this will always be a ssa

Re: [PATCH v3 2/2]AArch64: propose -mmax-vectorization as an option to override vector costing

2025-06-05 Thread Richard Sandiford
Tamar Christina writes: > diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt > index > f32d56d4ffaef7862c1c45a11753be5d480220d0..2725c50da64a2c05489ea6202bdd5eedf1ba7e27 > 100644 > --- a/gcc/config/aarch64/aarch64.opt > +++ b/gcc/config/aarch64/aarch64.opt > @@ -290,6 +

Re: [PATCH] aarch64: Add testcase for vld2 which was fixed by r16-1113 [PR89606]

2025-06-05 Thread Richard Sandiford
Andrew Pinski writes: > This aarch64 specific vld2 intrinsics testcase was fixed by > r16-1113-g069caa5cea91f > (simple copy propagation for aggregates). I didn't include it in the original > patch as I was testing on x86_64 but I got around to testing this > and now we don't have any more extra

Re: [PATCH v2] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 5:19 PM Tomasz Kamiński wrote: > We do not test with wchar_t currently, as operator<< (and format) are > ill-formed in such case, because we do not widen abbrev member of > local_info. > > Adding a tests for behavior of the ostream operator and the formatting > with empty c

[PATCH v6 9/8] libstdc++: Uglify __mapping_alike template parameter and fix test and typo in comment.

2025-06-05 Thread Tomasz Kamiński
When the static assert was generated from instantiations of default member initializer of class B, the error was not generated for B<1, std::layout_left, std::layout_left> case, only when -D_GLIBCXX_DEBUG was set. Changing B calls to functions fixes that. libstdc++-v3/ChangeLog: * include

[PATCH v2] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kamiński
We do not test with wchar_t currently, as operator<< (and format) are ill-formed in such case, because we do not widen abbrev member of local_info. Adding a tests for behavior of the ostream operator and the formatting with empty chrono-spec for the chrono types. The coverage is now complete: * s

Re: [PATCH] ranger: Add support for float <-> int casts [PR120231]

2025-06-05 Thread Andrew MacLeod
On 6/5/25 11:00, Jakub Jelinek wrote: Hi! The following patch adds support for float <-> integer conversions in ranger. The patch reverts part of the r16-571 changes, those changes were right for fold_range, but not for op1_range, where RO_IFI and RO_FIF are actually called rather than RO_IFF

Re: [PATCH] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 4:46 PM Tomasz Kamiński wrote: > We do not test with wchar_t currently, as operator<< (and format) are > ill-formed in such case, because we do not widen abbrev member of > local_info. > > Adding a tests for behavior of the ostream operator and the formatting > with empty c

Re: [PATCH v5 08/24] Add get_clone_versions and get_target_version functions.

2025-06-05 Thread Alfie Richards
On 04/06/2025 15:57, Jeff Law wrote: On 5/29/25 6:46 AM, Alfie Richards wrote: This is a reimplementation of get_target_clone_attr_len, get_attr_str, and separate_attrs using string_slice and auto_vec to make memory management and use simpler. Adds get_target_version helper function to get th

[PATCH] ranger: Add support for float <-> int casts [PR120231]

2025-06-05 Thread Jakub Jelinek
Hi! The following patch adds support for float <-> integer conversions in ranger. The patch reverts part of the r16-571 changes, those changes were right for fold_range, but not for op1_range, where RO_IFI and RO_FIF are actually called rather than RO_IFF and RO_FII that the patch expected. Also,

Re: [PATCH] c++: substituting fn parm redeclared with dep alias tmpl [PR120224]

2025-06-05 Thread Jason Merrill
On 6/4/25 11:18 AM, Patrick Palka wrote: On Wed, 21 May 2025, Jason Merrill wrote: On 5/20/25 11:28 AM, Patrick Palka wrote: On Mon, 19 May 2025, Patrick Palka wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk/15/14? Whoops, CI reports I missed a testsui

[PATCH] libstdc++: Test for formatting with empty spec for local_info and sys_info.

2025-06-05 Thread Tomasz Kamiński
We do not test with wchar_t currently, as operator<< (and format) are ill-formed in such case, because we do not widen abbrev member of local_info. Adding a tests for behavior of the ostream operator and the formatting with empty chrono-spec for the chrono types. The coverage is now complete: * s

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

2025-06-05 Thread Robin Dapp
But that would not pass the alignment check either, no? In fact, I assume that for strided loads we have a scalar type as component (ptype), so we always get supported unaligned accesses here? Perhaps I'm missing something, though. What I was missing is that we're using the same element size

Re: [PATCH 2/4] Use ranger for table based CTZ detection

2025-06-05 Thread Richard Biener
> Am 05.06.2025 um 15:50 schrieb Andrew MacLeod : > >  >> On 6/5/25 09:28, Richard Biener wrote: >> The following uses context sensitive ranger for determining whether >> the input to the table based CTZ is ever zero. >> >> Bootstrapped and tested on x86_64-unknown-linux-gnu. >> >>* tree

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Tomasz Kaminski
On Thu, Jun 5, 2025 at 12:41 PM Jonathan Wakely wrote: > On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: > > > > > > > > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely > wrote: > >> > >> Rename __semaphore_base to __semaphore_impl, because it's not used as a > >> base class. Replace the th

[PATCH v1] libstdc++: Implement default_accessor from mdspan.

2025-06-05 Thread Luc Grosheintz
libstdc++-v3/ChangeLog: * include/std/mdspan (default_accessor): New class. * src/c++23/std.cc.in: Register default_accessor. * testsuite/23_containers/mdspan/default_accessor.cc: New test. Signed-off-by: Luc Grosheintz --- libstdc++-v3/include/std/mdspan |

[to-be-committed][RISC-V] Improve signed division by 2^n

2025-06-05 Thread Jeff Law
So another class of cases where we can do better than a zicond sequence. Like the prior patch this came up evaluating some code from Shreya to detect more conditional move cases. This patch allows us to use the "splat the sign bit" idiom to efficiently select between 0 and 2^n-1. That's part

Re: [to-be-committed] RISC-V: Don't use structured binding in riscv-common.cc

2025-06-05 Thread Kito Cheng
pushed On Thu, Jun 5, 2025 at 3:25 PM Kito Cheng wrote: > > It's new C++ language feature introduced in C++17, which is higher than > the build environment required by the GCC (C++14). > > gcc/ChangeLog: > > * common/config/riscv/riscv-common.cc: Remove structured binding > from t

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

2025-06-05 Thread Robin Dapp
But that would not pass the alignment check either, no? In fact, I assume that for strided loads we have a scalar type as component (ptype), so we always get supported unaligned accesses here? I was thinking of the case where we have e.g. a group of 4 int8s and use a strided load with int32 el

Re: [PATCH 2/4] Use ranger for table based CTZ detection

2025-06-05 Thread Andrew MacLeod
On 6/5/25 09:28, Richard Biener wrote: The following uses context sensitive ranger for determining whether the input to the table based CTZ is ever zero. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-ssa-forwprop.cc (simplify_count_trailing_zeroes): Use ranger in

[committed v2] libstdc++: Fix std::format thousands separators when sign present [PR120548]

2025-06-05 Thread Jonathan Wakely
The leading sign character should be skipped when deciding whether to insert thousands separators into a floating-point format. libstdc++-v3/ChangeLog: PR libstdc++/120548 * include/std/format (__formatter_fp::_M_localize): Do not include a leading sign character in the st

[PATCH 4/4] tree-optimization/120032 - CLZ matching, fallback for missing range-info

2025-06-05 Thread Richard Biener
The following allows us to emit a conditional move when the value of the table based CLZ/CLZ implementation at zero differs from what the target implementation guarantees or we cannot easily fixup otherwise. In that case emit a val == 0 ? table-based-zero-result : ... Bootstrapped and tested on x

[PATCH 3/4] tree-optimization/120032 - matching of table based CLZ

2025-06-05 Thread Richard Biener
The following adds the ability to match a table based CLZ implementation similar as to how we can do for CTZ. I'm re-using the workers for matching up array and string tables by using a lambda and templates and kept the transform step for CLZ/CTZ inter-mangled. Bootstrapped and tested on x86_64-u

[PATCH 2/4] Use ranger for table based CTZ detection

2025-06-05 Thread Richard Biener
The following uses context sensitive ranger for determining whether the input to the table based CTZ is ever zero. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-ssa-forwprop.cc (simplify_count_trailing_zeroes): Use ranger instead of tree_expr_nonzero_p. --- gcc/tree

[PATCH 1/4] Refactor CTZ detection in forwprop

2025-06-05 Thread Richard Biener
The following refactors the CTZ detection code to be more easily extensible to also handle CLZ. Bootstrapped and tested on x86_64-unknown-linux-gnu. * tree-ssa-forwprop.cc (optimize_count_trailing_zeroes): Inline into ... (simplify_count_trailing_zeroes): ... this function

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

2025-06-05 Thread Robin Dapp
So I do wonder how this interacts with vector_vector_composition_type, in fact the difference is that for strided_load we know the composition happens as part of a load, so how about instead extending this function, pass it VLS_LOAD/STORE and also consider strided_loads as composition kind there?

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

2025-06-05 Thread Richard Biener
On Thu, Jun 5, 2025 at 2:34 PM Robin Dapp wrote: > > > So I do wonder how this interacts with vector_vector_composition_type, > > in fact the difference is that for strided_load we know the composition > > happens as part of a load, so how about instead extending > > this function, pass it VLS_LOA

Re: [PATCH] RISC-V: Add 'bclr+binv' peephole2 optimization.

2025-06-05 Thread Jiawei
在 2025/5/30 1:46, Jeff Law 写道: On 5/28/25 9:05 PM, Jiawei wrote: This seems like it would be much better as a combine pattern.   In fact, I'm a bit surprised that combine didn't simplify this series of operations into a IOR. So I'd really like to see the .combine dump with and without thi

Re: [PATCH] xtensa: Implement l(ceil|floor|round|)sfsi2 insn patterns and their scaled variants

2025-06-05 Thread Takayuki 'January June' Suwa
On 2025/06/05 5:09, Max Filippov wrote: Hi Suwa-san, Hi Max, (thanks for every regtesting) On Tue, Jun 3, 2025 at 7:44 AM Takayuki 'January June' Suwa wrote: By using the previously unused CEIL|FLOOR|ROUND.S floating-point coprocessor instructions. In addition, two instruction operand fo

Re: [to-be-committed][RISC-V] Improve sequences to generate -1, 1 in some cases.

2025-06-05 Thread Jeff Law
On 6/4/25 7:11 PM, Jeff Law wrote: On 6/4/25 6:37 PM, Palmer Dabbelt wrote: On Wed, 04 Jun 2025 17:25:20 PDT (-0700), Jeff Law wrote: This patch has a minor improvement to if-converted sequences based on observations I found while evaluating another patch from Shreya to handle more cases with z

Re: [PATCH 0/7] Support privileged RISC-V extensions

2025-06-05 Thread Jiawei
Thanks, pushed to trunk. Jiawei 在 2025/6/5 14:36, Kito Cheng 写道: LGTM :) On Thu, Jun 5, 2025 at 2:21 PM Jiawei wrote: These patches add support for several privileged RISC-V extensions, including Sm/scsrind, Smrnmi, Ssccptr, Sscounterenw, Sstvala, Sstvecd, and Ssu64xl. The CSRs definition i

Re: [PATCH v6 3/8] libstdc++: Add tests for layout_left.

2025-06-05 Thread Luc Grosheintz
On 6/5/25 10:18, Tomasz Kaminski wrote: On Wed, Jun 4, 2025 at 5:15 PM Luc Grosheintz wrote: Implements a suite of tests for the currently implemented parts of layout_left. The individual tests are templated over the layout type, to allow reuse as more layouts are added. libstdc++-v3/Chang

Re: Reverted. (was Re: [PATCH v4] libstdc++: stringstream ctors from string_view [PR119741])

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 07:39, Jonathan Wakely wrote: > > There was no need to revert this, it wasn't breaking bootstrap, only causing > a handful of test failures. > > The new wchar_t tests just need the same { dg-do run { target c++26 } } > directives as the char tests. > > Dejagnu only looks fo

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: > > > > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: >> >> Rename __semaphore_base to __semaphore_impl, because it's not used as a >> base class. Replace the three identical lambda expressions with a named >> class, __semaphore_impl::_

Re: [PATCH 1/2] libstdc++: Optimize std::counting_semaphore for futex path

2025-06-05 Thread Jonathan Wakely
On Thu, 5 Jun 2025 at 11:41, Jonathan Wakely wrote: > > On Thu, 5 Jun 2025 at 10:00, Tomasz Kaminski wrote: > > > > > > > > On Thu, Jun 5, 2025 at 12:06 AM Jonathan Wakely wrote: > >> > >> Rename __semaphore_base to __semaphore_impl, because it's not used as a > >> base class. Replace the three

Re: [PATCH v6 0/8] Implement layouts from mdspan.

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:06 PM Luc Grosheintz wrote: > The previous iteration can be found here: > https://gcc.gnu.org/pipermail/libstdc++/2025-May/061781.html > > Changes since v5: > > * Fixed tests on 32-bit systems. > * Expand tests to check absense of UB while multiplying dynamic > ex

Re: [PATCH v6 8/8] libstdc++: Make layout_left(layout_stride) noexcept.

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:23 PM Luc Grosheintz wrote: > [mdspan.layout.left.cons] of N4950 states that this ctor is not > noexcept. Since, all other ctors of layout_left, layout_right or > layout_stride are noexcept, the choice was made, based on > [res.on.exception.handling], to make this ctor no

Re: [PATCH v6 7/8] libstdc++: Add tests for layout_stride.

2025-06-05 Thread Tomasz Kaminski
On Wed, Jun 4, 2025 at 5:26 PM Luc Grosheintz wrote: > Implements the tests for layout_stride and for the features of the other > two layouts that depend on layout_stride. > > libstdc++-v3/ChangeLog: > > * testsuite/23_containers/mdspan/layouts/class_mandate_neg.cc: Add > tests fo

[COMMITTED 06/40] ada: Mark constants inside a declare expression as referenced

2025-06-05 Thread Marc Poulhiès
From: Viljar Indus Expressions within a declare expression were simply bound to locally defined constants. However they were never marked as referenced. This would trigger an unreferenced constant warning if -gnatwu was used. gcc/ada/ChangeLog: * sem_res.adb (Resolve_Declare_Expression)

[COMMITTED 09/40] ada: Fix adareducer oracle generation

2025-06-05 Thread Marc Poulhiès
From: Ronan Desplanques This patch adds a missing "-quiet" switch to the compiler invocations performed by generated oracles. Without that switch, log lines could be present before bug boxes for crashes in gigi and that caused the crash detection logic to fail. gcc/ada/ChangeLog: * gene

  1   2   >