[PATCH] match: Add `cmp - 1` simplification to `-icmp` [PR110949]

2025-07-20 Thread Andrew Pinski
I have seen this a few places though the testcase from PR 95906 is an obvious place where this shows up for sure. This convert `cmp - 1` into `-icmp` as that form is more useful in many cases. Bootstrapped and tested on x86_64-linux-gnu. PR tree-optimization/110949 PR tree-optimiz

[PATCH] libstdc++: Export std::byteswap from std.cc.in

2025-07-20 Thread hexne
After import std, std::byteswap cannot be used. After my observation, this function is the only one in the header file that has not been exported. The purpose of this patch is to export std::byteswap so that it can be used normally after import std. Signed-off-by: hexne <61956889

[PATCH] Use regular libdir/includedir in libssp Makefiles

2025-07-20 Thread John Ericson
The details are exactly the same as https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689865.html, except this is for libssp not libgcc. It probably makes sense to just pick one of these to review first, and then based on any feedback I can rework the other one. But for posterity, and to illustr

Re: [PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-20 Thread Martin Uecker
I think the question is not whether this could be done somehow, but whether it should. Why design a language feature that requires  storing tokens and parsing it outside the original context?   For an attribute this may still be acceptable, but we need the same thing for array sizes in C. For

[PATCH] [RFC] Delayed parsing for bounds safety attributes

2025-07-20 Thread morbo
From: Bill Wendling Also, this code doesn't go further than parsing. I.e., it doesn't generate the internal gimple code that accesses the struct fields. The code is meant to show that it *is* possible to perform a delayed parsing with no "double parsing" and still be performant. Minor Nomenclatu

RE: [PATCH 1/2] aarch64: NFC - Make vec_* rtx costing logic consistent

2025-07-20 Thread Tamar Christina
> -Original Message- > From: Kyrylo Tkachov > Sent: Friday, July 18, 2025 5:48 PM > To: Tamar Christina > Cc: GCC Patches ; Richard Sandiford > ; Alex Coplan ; Andrew > Pinski > Subject: Re: [PATCH 1/2] aarch64: NFC - Make vec_* rtx costing logic > consiste

Re: [PATCH] Export std::dextents from std.cc.in [PR121174]

2025-07-19 Thread Jonathan Wakely
e implemented but not exported. > > The following patch exports it, and additionally appends some further > entities to the FIXME list, those all seems to be unimplemented yet. > Yes, those are all C++26 additions to the header and not supported yet. > Tested on x86_64-linux, ok fo

[PATCH v3] Change __builtin_unreachable to __builtin_trap (or infinite loop) if only thing in function [PR109267]

2025-07-19 Thread Andrew Pinski
When we have an empty function, things can go wrong with cfi_startproc/cfi_endproc and a few other things like exceptions. So if the only thing the function does is a call to __builtin_unreachable, let's replace that with a __builtin_trap instead if the target has a trap instruction. For targets w

[COMMITTED, GCC-15, PATCH] libstdc++: Update some baseline_symbols.txt (x32)

2025-07-19 Thread H.J. Lu
Lu" Date: Wed, 9 Jul 2025 09:43:52 +0800 Subject: [PATCH] libstdc++: Update some baseline_symbols.txt (x32) * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated. Signed-off-by: H.J. Lu (cherry picked from commit c7baa61a583b49df63d3df8c6336f8405e24f012) ---

Re: [PATCH] [RISC-V] Fix wrong CFA during stack probe

2025-07-19 Thread Jeff Law
On 7/16/25 7:04 AM, Andreas Schwab wrote: PR target/121121 * config/riscv/riscv.cc (riscv_allocate_and_probe_stack_space): Use temp2 instead of temp1 for the CFA note. --- gcc/config/riscv/riscv.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g

Re: [PATCH] RISC-V: Vector-scalar widening negate-multiply-(subtract-)accumulate [PR119100]

2025-07-19 Thread Jeff Law
On 7/16/25 8:38 AM, Paul-Antoine Arras wrote: This pattern enables the combine pass (or late-combine, depending on the case) to merge a float_extend'ed vec_duplicate into a (possibly negated) minus-mult RTL instruction. Before this patch, we have six instructions, e.g.: vse

Re: [PATCH v5 0/3] Hard Register Constraints

2025-07-19 Thread Jeff Law
nt via -fdemote-register-asm I removed it from this patch series. I compiled and used the Linux kernel and glibc successfully with it for s390x. For x86_64, the Linux kernel compiles fine, too, except of one small manual change. For powerpc64le, I ran into an odd case compiling glibc which I wo

Re: [PATCH v1] RISC-V: Support RVVDImode for avg3_ceil auto vect

2025-07-19 Thread Jeff Law
On 7/18/25 7:06 AM, Li, Pan2 wrote: OK. Curious if you've seen this show up in practice and is using the vaaddu and similar instructions actually profitable? I remember avg will be presented in somewhere else but not for DImode. I tried to add vaadd related vx combine and notice we don't ha

Re: [PATCH] RISC-V: prevent NULL_RTX dereference in riscv_macro_fusion_pair_p ()

2025-07-19 Thread Jeff Law
a few submissions to do everything we want to do. This patch is primarily concerned with avoiding signaling that fusion can occur in cases where it obviously should not be signaling fusion. Hi Jeff, With this change, we're liable to ICE whenever prev_set or curr_set are NULL_RTX. For a fix,

Re: [PATCH v1] RISC-V: Add ashiftrt operand 2 for vector avg_floor and avg_ceil

2025-07-19 Thread Jeff Law
e op2 of the ashiftrt but seems missed. Thus, add it back to align the definition. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/ChangeLog: * config/riscv/autovec.md: Add (const_int 1) as the op2 of ashiftrt. OK. I wonder if this would have

Re: [PATCH v1] RISC-V: Refine the test case for vector avg_floor and avg_ceil [NFC]

2025-07-19 Thread Jeff Law
0 for DEF_AVG_0(WT, NT). The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/avg_floor-1-i16-from-i32.c: Leverage DEF_AVG_0_WRAP to generate the correct func name. * gcc.target/riscv/rvv/au

[PATCH] Export std::dextents from std.cc.in [PR121174]

2025-07-19 Thread Jakub Jelinek
Hi! r16-442 implemented both std::extents and std::dextents (and perhaps other stuff), but exported only std::extents. I went through https://eel.is/c++draft/mdspan.syn and I think std::dextents is the only one implemented but not exported. The following patch exports it, and additionally

[patch,avr,applied] Fuse get_insns with end_sequence

2025-07-19 Thread Georg-Johann Lay
There were two cases where get_insns() can be fused with end_sequence(). Applied as obvious. Johann -- AVR: Fuse get_insns with end_sequence. gcc/ * config/avr/avr-passes.cc (avr_optimize_casesi): Fuse get_insns() with end_sequence(). diff --git a/gcc/config/avr/avr-passes.cc

[PATCH v4] libstdc++: Implement Philox Engine [PR119794]

2025-07-19 Thread 1nfocalypse
From: 1nfocalypse <1nfocaly...@protonmail.com> Date: Sat, 19 Jul 2025 02:08:07 + Subject: [PATCH] [PATCH v4] libstdc++: Implement Philox Engine [PR119794] Implemented additional changes according to feedback from Patrick Palka. _charT, _traits -> _CharT, _Traits in stream operator tem

[PATCH v1] RISC-V: Add ashiftrt operand 2 for vector avg_floor and avg_ceil

2025-07-19 Thread pan2 . li
ack to align the definition. The below test suites are passed for this patch. * The rv64gcv fully regression test. gcc/ChangeLog: * config/riscv/autovec.md: Add (const_int 1) as the op2 of ashiftrt. Signed-off-by: Pan Li --- gcc/config/riscv/autovec.md | 6 -- 1 fil

Re: [PATCH] [RFC] Move STMT_VINFO_TYPE to SLP_TREE_TYPE

2025-07-19 Thread Richard Biener
> Am 18.07.2025 um 20:06 schrieb Robin Dapp : > >  >> >> Can the risc-v people try to sort out this up to a point >> where I can just s/STMT_VINFO_TYPE/SLP_TREE_TYPE there? > > I think for us this mainly (only?) concerns the dynamic LMUL heuristic. > Currently we go through all vectorized in

Re: [ping^3][ping^2] [PATCH v2] MIPS: Fix the issue with the '-fpatchable-function-entry=' feature.

2025-07-18 Thread Lulu Cheng
Ping^3 在 2025/5/27 上午8:54, Lulu Cheng 写道: Ping^2 在 2025/5/13 下午2:06, Lulu Cheng 写道: Ping? 在 2025/5/9 上午10:14, Lulu Cheng 写道: From: ChengLulu PR target/99217 gcc/ChangeLog: * config/mips/mips.cc (mips_start_function_definition): Implements the functionality of '-fpatchable-fun

Re: [PATCH v3] libstdc++: Implement Philox Engine [PR119794]

2025-07-18 Thread 1nfocalypse
n excess of 80 chars. Since it was the result of autogen, I let it lie. If > > this > > was incorrect, I can adjust it. > > > That's fine, we don't care about line lengths of autogenerated files. > > > Otherwise, thank you for the review, and please let m

[PATCH v1] RISC-V: Refine the test case for vector avg_floor and avg_ceil [NFC]

2025-07-18 Thread pan2 . li
d for this patch. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/avg_floor-1-i16-from-i32.c: Leverage DEF_AVG_0_WRAP to generate the correct func name. * gcc.target/riscv/rvv/autovec/avg_floor-1-i16-from-i64.c:

[pushed-15] [PATCH] PR modula2/121164 Modula 2 build failure

2025-07-18 Thread Gaius Mulley
This patch fixes the 2nd parameter name mismatch in ARRAYOFCHAR.mod. gcc/m2/ChangeLog: PR modula2/121164 * gm2-libs/ARRAYOFCHAR.mod (Write): Rename 2nd parameter name a to str. (cherry picked from commit 22d8b89689769e5efefd2c4e6dda88d9f0b2a945) Signed-off-by: Gaius

[pushed] [PATCH] PR modula2/121164 Modula 2 build failure

2025-07-18 Thread Gaius Mulley
This patch fixes the 2nd parameter name mismatch in ARRAYOFCHAR.mod. gcc/m2/ChangeLog: PR modula2/121164 * gm2-libs/ARRAYOFCHAR.mod (Write): Rename 2nd parameter name a to str. Signed-off-by: Gaius Mulley --- gcc/m2/gm2-libs/ARRAYOFCHAR.mod | 6 +++--- 1 file changed

Re: [PATCH] libstdc++: Teach std::distance and std::advance about C++20 iterators [PR102181]

2025-07-18 Thread Jonathan Wakely
On Fri, 18 Jul 2025, 18:51 Jonathan Wakely, wrote: > When the C++98 std::distance and std::advance functions (and C++11 > std::next and std::prev) are used with C++20 iterators there can be > unexpected results, ranging from compilation failure to decreased > performance to undefined behaviour. >

Re: [PATCH] defaults.h: Default MAX_FIXED_MODE_SIZE to MAX (BITS_PER_WORD * 2, 64)

2025-07-18 Thread Pietro Monteiro
27;t use the default > MAX_FIXED_MODE_SIZE. > > I can't build a complete toolchain for BPF (fails building > libgcc, PR121149), but from what I can see with that build, > having MAX_FIXED_MODE_SIZE 64 is unintended: TImode isn't > disabled for BPF. So, I'm not offering a patc

Re: [PATCH 2/2] libstdc++: Protect std::shared_ptr against counter overflow [PR71945]

2025-07-18 Thread Jonathan Wakely
in extreme cases > where the reference count somehow exceeds INT_MAX). > > However, in a very simple benchmark I see a significant impact in > performance, which is not entirely surprising given that this patch adds > a test to every increment. Maybe we could change [[__unlikely__]]

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

2025-07-18 Thread Marek Polacek
gt; > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > > > > > > > > > > > -- >8 -- > > > > > > > > This patch is an attempt to implement P2036R3 along with > > > > > > > > P2

[PATCH v2] c++: consteval blocks

2025-07-18 Thread Marek Polacek
_64-pc-linux-gnu, ok for trunk? > > > > > > > > -- >8 -- > > > > This patch implements consteval blocks, as specified by P2996. > > > > They aren't very useful without define_aggregate, but having > > > > a reviewed implementation on

Re: [PATCH] Fortran: fix bogus runtime error with optional procedure argument [PR121145]

2025-07-18 Thread Harald Anlauf
Hi Andre, Am 18.07.25 um 21:41 schrieb Andre Vehreschild: Hi Harald, that looks fine to me. Ok to commit and backport. Thanks for the patch. pushed as r16-2355-g8f9450505f8244 so far. Thanks for the review! Harald - Andre Andre Vehreschild * ve...@gmx.de Am 18. Juli 2025 21:19:00 schrieb

Re: [PATCH 2/2] libstdc++: Protect std::shared_ptr against counter overflow [PR71945]

2025-07-18 Thread Jonathan Wakely
On Fri, 18 Jul 2025 at 19:18, Tomasz Kaminski wrote: > > > > On Fri, Jul 18, 2025 at 8:03 PM Jonathan Wakely wrote: >> >> This adds a check when incrementing the shared count and weak count and >> will trap if it overflows. This also double the effective range of the >> counts for most 64-bit tar

Re: [PATCH] Fortran: fix bogus runtime error with optional procedure argument [PR121145]

2025-07-18 Thread Andre Vehreschild
Hi Harald, that looks fine to me. Ok to commit and backport. Thanks for the patch. - Andre Andre Vehreschild * ve...@gmx.de Am 18. Juli 2025 21:19:00 schrieb Harald Anlauf : Dear all, the attached simple and obvious patch fixes an erroneous runtime check with -fcheck=pointer when passing a

Re: [PATCH v3] libstdc++: Implement Philox Engine [PR119794]

2025-07-18 Thread Patrick Palka
t; alterations are needed. Nice, thanks! A couple of more review comments added inline. > > Built/tested on x86_64-linux-gnu. > > > Subject: [PATCH] [PATCH v3] libstdc++: implement Philox Engine [PR119794] > > Implemented changes according to feedb

[PATCH] Fortran: fix bogus runtime error with optional procedure argument [PR121145]

2025-07-18 Thread Harald Anlauf
Dear all, the attached simple and obvious patch fixes an erroneous runtime check with -fcheck=pointer when passing a non-associated proc-pointer to an optional dummy. Regtested on x86_64-pc-linux-gnu. OK for mainline / backports? Thanks, Harald From 8f9450505f8244d262f8b4ff274f113f99cdc7e2

Re: [PATCH] ipa, cgraph: Enable constant propagation to OpenMP kernels

2025-07-18 Thread Josef Melcr
Hello, On 7/11/25 6:47 PM, Martin Jambor wrote: Hello, and sorry for a rather late reaction. First and foremost, thanks for the patch, I think it is great to have this finally implemented and although I would like to see a couple things changed, I think the patch is quite close to what could

Re: [PATCH] RISC-V: prevent NULL_RTX dereference in riscv_macro_fusion_pair_p ()

2025-07-18 Thread Artemiy Volkov
gt; take > > > a few submissions to do everything we want to do. > > > > > > This patch is primarily concerned with avoiding signaling that fusion can > > > occur in cases where it obviously should not be signaling fusion. > > > > Hi Jeff, > > >

Re: [PATCH 2/2] libstdc++: Protect std::shared_ptr against counter overflow [PR71945]

2025-07-18 Thread Tomasz Kaminski
use_count to unsigned > before returning as long. > --- > > This improves safety for std::shared_ptr and std::weak_ptr, removing a > possible source of undefined behaviour (although only in extreme cases > where the reference count somehow exceeds INT_MAX). > > However,

Re: [PATCH] [RFC] Move STMT_VINFO_TYPE to SLP_TREE_TYPE

2025-07-18 Thread Robin Dapp
Can the risc-v people try to sort out this up to a point where I can just s/STMT_VINFO_TYPE/SLP_TREE_TYPE there? I think for us this mainly (only?) concerns the dynamic LMUL heuristic. Currently we go through all vectorized instructions of the loop's blocks, lookup the stmt_vec_info and then get

[PATCH 2/2] libstdc++: Protect std::shared_ptr against counter overflow [PR71945]

2025-07-18 Thread Jonathan Wakely
cases where the reference count somehow exceeds INT_MAX). However, in a very simple benchmark I see a significant impact in performance, which is not entirely surprising given that this patch adds a test to every increment. Maybe we could change [[__unlikely__]] on those branches to use __builtin

[PATCH 1/2] libstdc++: Make atomicity helpers use unsigned arithmetic [PR121148]

2025-07-18 Thread Jonathan Wakely
The standard requires that std::atomic::fetch_add does not have undefined behaviour for signed overflow, instead it wraps like unsigned integers. The compiler ensures this is true for the atomic built-ins that std::atomic uses, but it's not currently true for the __gnu_cxx::__exchange_and_add and _

[PATCH] libstdc++: Teach std::distance and std::advance about C++20 iterators [PR102181]

2025-07-18 Thread Jonathan Wakely
When the C++98 std::distance and std::advance functions (and C++11 std::next and std::prev) are used with C++20 iterators there can be unexpected results, ranging from compilation failure to decreased performance to undefined behaviour. An iterator which satisfies std::input_iterator but does not

Re: [PATCH] RISC-V: prevent NULL_RTX dereference in riscv_macro_fusion_pair_p ()

2025-07-18 Thread Jeff Law
On 7/18/25 11:03 AM, Artemiy Volkov wrote: On Wed, Jul 02, 2025 at 08:15:40PM -0600, Jeff Law wrote: A number of folks have had their fingers in this code and it's going to take a few submissions to do everything we want to do. This patch is primarily concerned with avoiding signaling

Re: [PATCH 2/2] aarch64: Allow CPU tuning to avoid INS-(W|X)ZR instructions

2025-07-18 Thread Kyrylo Tkachov
costs set ins_gp to COSTS_N_INSNS (1) to >> preserve the current codegen, though I'd be happy to increase it for generic >> tuning. >> >> For -Os we don't add any extra cost so the shorter INS-WZR form is still >> generated always. >> >> Bootstrap

[PATCH] RISC-V: prevent NULL_RTX dereference in riscv_macro_fusion_pair_p ()

2025-07-18 Thread Artemiy Volkov
On Wed, Jul 02, 2025 at 08:15:40PM -0600, Jeff Law wrote: > A number of folks have had their fingers in this code and it's going to take > a few submissions to do everything we want to do. > > This patch is primarily concerned with avoiding signaling that fusion can > occ

Re: [patch,wwwdocs] Remove cr16, tilegx, tilepro from backends.html

2025-07-18 Thread Gerald Pfeifer
On Fri, 18 Jul 2025, Jeff Law wrote: > On 7/18/25 8:37 AM, Georg-Johann Lay wrote: >> Ok to apply removal of backends no more present in v13? > Yes. And feel free to simply push such changes (under the obvious rule). Gerald

Re: [PATCH 1/2] aarch64: NFC - Make vec_* rtx costing logic consistent

2025-07-18 Thread Kyrylo Tkachov
Hi Tamar, > On 18 Jul 2025, at 18:25, Tamar Christina wrote: > > Hi Kyrill, > >> -Original Message- >> From: Kyrylo Tkachov >> Sent: Friday, July 18, 2025 10:40 AM >> To: GCC Patches >> Cc: Tamar Christina ; Richard Sandiford >> ; Alex C

RE: [PATCH 1/2] aarch64: NFC - Make vec_* rtx costing logic consistent

2025-07-18 Thread Tamar Christina
Hi Kyrill, > -Original Message- > From: Kyrylo Tkachov > Sent: Friday, July 18, 2025 10:40 AM > To: GCC Patches > Cc: Tamar Christina ; Richard Sandiford > ; Alex Coplan ; Andrew > Pinski > Subject: [PATCH 1/2] aarch64: NFC - Make vec_* rtx costing logi

Re: [Fortran, Patch, PR119106, v1] Allow iterator substitution in array constructors

2025-07-18 Thread Paul Richard Thomas
Hi Andre, After a false start, the patch was applied to mainline, did what it was supposed to do and regtests fine. Ok for mainline. Thanks Paul On Fri, 18 Jul 2025 at 13:42, Andre Vehreschild wrote: > Hi all, hi Harald, > > attached patch fixes a runtime out-of-bounds erro

Re: [patch,wwwdocs] Remove cr16, tilegx, tilepro from backends.html

2025-07-18 Thread Jeff Law
On 7/18/25 8:37 AM, Georg-Johann Lay wrote: Ok to apply removal of backends no more present in v13? Yes. jeff

Re: [PATCH] Add rvalue::get_name method (and its C equivalent)

2025-07-18 Thread Guillaume Gomez
Hi, Sorry for the very long delay (more than one year O.o). I finally took time to apply suggestions and to update the patch to be up-to-date. Joined to this email. Cordially. Le mer. 26 juin 2024 à 17:10, David Malcolm a écrit : > > On Mon, 2024-04-22 at 19:56 +0200, Guillaume Gomez

[patch,wwwdocs] Remove cr16, tilegx, tilepro from backends.html

2025-07-18 Thread Georg-Johann Lay
Ok to apply removal of backends no more present in v13? Johann -- backends.html (cr16, tilegx, tilepro): Remove entries. The cr16, tilegx and tilepro backends have been removed in v13, which is the oldest supported GCC release. diff --git a/htdocs/backends.html b/htdocs/backends.html index 52

[PATCH] mmix: Define MAX_FIXED_MODE_SIZE

2025-07-18 Thread Hans-Peter Nilsson
For master, let's change the default; see other recent patch. Committed to gcc-15 branch. Pietro, thanks again for the patch that led up to this. This is in a different place and with different contents, but you made the first move in this direction so IMHO attribution is in order.

[PATCH] defaults.h: Default MAX_FIXED_MODE_SIZE to MAX (BITS_PER_WORD * 2, 64)

2025-07-18 Thread Hans-Peter Nilsson
s building libgcc, PR121149), but from what I can see with that build, having MAX_FIXED_MODE_SIZE 64 is unintended: TImode isn't disabled for BPF. So, I'm not offering a patch to keep MAX_FIXED_MODE_SIZE 64 for BPF; with this patch, it moves to 2 * BITS_PER_WORD == 128 as all other 64-bitte

Re: [PATCH v3] libstdc++: Fixed localized empty-spec formatting for months/weekdays [PR121154]

2025-07-18 Thread Tomasz Kaminski
>are !ok(). > > > >This patch lifts debug checks from each conversion function into > _M_check_ok, > >that in case of !ok() values return a string_view containing the kind of > >calendar data, to be included after "is not a valid" string. The localized >

Re: [PATCH 2/2] aarch64: Allow CPU tuning to avoid INS-(W|X)ZR instructions

2025-07-18 Thread Remi Machet
On 7/18/25 05:39, Kyrylo Tkachov wrote: > External email: Use caution opening links or attachments > > > Hi all, > > For inserting zero into a vector lane we usually use an instruction like: > ins v0.h[2], wzr > > This, however, has not-so-great performance on some CPUs. > On Grace, f

RE: [PATCH] RISC-V: Add testcase for unsigned scalar SAT_ADD form 8 and form 9

2025-07-18 Thread Li, Pan2
: gcc-patches@gcc.gnu.org Cc: kito.ch...@gmail.com; richard.guent...@gmail.com; tamar.christ...@arm.com; juzhe.zh...@rivai.ai; Li, Pan2 ; jeffreya...@gmail.com; rdapp@gmail.com; panciyan Subject: [PATCH] RISC-V: Add testcase for unsigned scalar SAT_ADD form 8 and form 9 From: panciyan This patch add

Re: [PATCH v3] libstdc++: Fixed localized empty-spec formatting for months/weekdays [PR121154]

2025-07-18 Thread Jonathan Wakely
On 18/07/25 14:01 +0200, Tomasz Kamiński wrote: Previously for localized output, if _M_debug option was send, the _M_check_ok completed succesfully and _M_locale_fmt was called for months/weekdays that are !ok(). This patch lifts debug checks from each conversion function into _M_check_ok, that

RE: [PATCH v1] RISC-V: Support RVVDImode for avg3_ceil auto vect

2025-07-18 Thread Li, Pan2
cture and conditionalize the appropriate > code. I see, thanks Jeff. Pan -Original Message- From: Jeff Law Sent: Friday, July 18, 2025 1:23 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; rdapp@gmail.com; Chen, Ken ; Liu, Hongtao Subject:

[Fortran, Patch, PR119106, v1] Allow iterator substitution in array constructors

2025-07-18 Thread Andre Vehreschild
Hi all, hi Harald, attached patch fixes a runtime out-of-bounds error when an iterator of an implied do-loop was not substituted as expected. The resulting code would still use the uninitialized iterator variable which then lead to out-of-bounds accesses. Harald, I did not look at the patch you

[PATCH] [RFC] Move STMT_VINFO_TYPE to SLP_TREE_TYPE

2025-07-18 Thread Richard Biener
I am at a point where I want to store additional information from analysis (from loads and stores) to re-use them at transform stage without repeating the analysis. I do not want to add to stmt_vec_info at this point, so this starts adding kind specific sub-structures by moving the STMT_VINFO_TYPE

[PATCH v3] libstdc++: Fixed localized empty-spec formatting for months/weekdays [PR121154]

2025-07-18 Thread Tomasz Kamiński
Previously for localized output, if _M_debug option was send, the _M_check_ok completed succesfully and _M_locale_fmt was called for months/weekdays that are !ok(). This patch lifts debug checks from each conversion function into _M_check_ok, that in case of !ok() values return a string_view

[PATCH v2] libstdc++: Fixed localized empty-spec formatting for months/weekdays [PR121154]

2025-07-18 Thread Tomasz Kamiński
Previously for localized output, if _M_debug option was send, the _M_check_ok completed succesfully and _M_locale_fmt was called for months/weekdays that are !ok(). This patch lifts debug checks from each conversion function into _M_check_ok, that in case of !ok() values return a string_view

[PATCH] Record vect_check_gather_scatter analysis result and re-use it

2025-07-18 Thread Richard Biener
esult (and with the patch verify that does not change in unexpected ways). The 2nd step would elide the repeated calls, instead access the available info directly. Bootstrapped and tested on x86_64-unknown-linux-gnu. Note this is for the CI to catch non-x86 (aka IFN) issues, also due to low covera

Re: [PATCH] libstdc++: Fixed localized empty-spec formatting for months/weekdays [PR121154]

2025-07-18 Thread Jonathan Wakely
On Fri, 18 Jul 2025 at 11:04, Tomasz Kamiński wrote: > > Previously for localized output, if _M_debug option was send, the _M_check_ok > completed succesfully and _M_locale_fmt was called for months/weekdays that > are !ok(). > > This patch lifts debug checks from each conver

[PATCH] libstdc++: Fixed localized empty-spec formatting for months/weekdays [PR121154]

2025-07-18 Thread Tomasz Kamiński
Previously for localized output, if _M_debug option was send, the _M_check_ok completed succesfully and _M_locale_fmt was called for months/weekdays that are !ok(). This patch lifts debug checks from each conversion function into _M_check_ok, that in case of !ok() values return a string_view

[PATCH 2/2] aarch64: Allow CPU tuning to avoid INS-(W|X)ZR instructions

2025-07-18 Thread Kyrylo Tkachov
Hi all, For inserting zero into a vector lane we usually use an instruction like: ins v0.h[2], wzr This, however, has not-so-great performance on some CPUs. On Grace, for example it has a latency of 5 and throughput 1. The alternative sequence: moviv31.8b, #0 ins

[PATCH 1/2] aarch64: NFC - Make vec_* rtx costing logic consistent

2025-07-18 Thread Kyrylo Tkachov
size cost only. This patch makes the logic consistent by using the extra_cost fields to increment the cost when speed is set. This requires reducing the extra_cost values of the movi, dup and extract fields by COSTS_N_INSNS (1), as every insn being costed has a cost of COSTS_N_INSNS (1) at the

[PATCH] Remove non-SLP path from vectorizable_live_operation

2025-07-18 Thread Richard Biener
This removes paths gated by !slp_node and propagates out ncopies == 1, thereby reducing the vectorizable_live_operation_1 API. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vect-loop.cc (vectorizable_live_operation_1): Remove stmt_info and ncopies parameters.

[pushed-15] [PATCH] PR modula2/120912: Request for a procedure to obtain a file from an IOChan

2025-07-18 Thread Gaius Mulley
This patch introduces the procedure GetFile into the supplementary ISO style library IOChanUtils. gcc/m2/ChangeLog: PR modula2/120912 * gm2-libs-iso/IOChanUtils.def (GetFile): New procedure function. * gm2-libs-iso/IOChanUtils.mod (GetFile): New procedure function

[PATCH v3] libstdc++: Implement Philox Engine [PR119794]

2025-07-18 Thread 1nfocalypse
rther alterations are needed. Built/tested on x86_64-linux-gnu.From a175a89dd87426d1724812040bf8bb33680a9cb8 Mon Sep 17 00:00:00 2001 From: 1nfocalypse <1nfocaly...@protonmail.com> Date: Fri, 18 Jul 2025 01:16:48 + Subject: [PATCH] [PATCH v3] libstdc++: implement Philox Engine [PR119794]

Re: [PATCH v2] config/rs6000/t-float128: Don't encode full build paths into headers

2025-07-18 Thread Harish Sadineni
could kindly commit this v3 patch(link given below)  on my behalf. https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689920.html Do you want backports? Okay for those as well (if they are wanted). In addition to master branch, I would like this change to be backported to GCC 15 and GCC 14

Re: [PATCH 2/2] libstdc++: Implement reverse iteration for _Utf_view

2025-07-18 Thread Jonathan Wakely
On Fri, 18 Jul 2025 at 07:59, Tomasz Kaminski wrote: > > > > On Thu, Jul 17, 2025 at 7:02 PM Jonathan Wakely wrote: >> >> This implements the missing functions in _Utf_iterator to support >> reverse iteration. All existing tests pass when the view is reversed, so >> that the same code units are s

Re: [PATCH] [contrib] Add process_make.py

2025-07-18 Thread Filip Kastl
> Hi, > > Thanks for the review! No, there is no reason for it being CamelCase. I had > written > the code in CamelCase originally then 'sed s/CamelCase/snake_case/g'd the > functions. > I forgot to update this one :) > > Looks like I also forgot to update the Colors class as well. I'd actuall

Re: [PATCH] [contrib] Add process_make.py

2025-07-18 Thread Dhruv Chawla
ch: +return c_match +return re.match(self.ignored_cxx, line) + + + +# Main routine +#### + + +def main() -> None: +a

[PATCH] testsuite: Skip check-function-bodies sometimes

2025-07-18 Thread Stefan Schulze Frielinghaus
Added changelog entries. -- >8 -- If a check-function-bodies test is compiled using -fstack-protector*, -fhardened, -fstack-check*, or -fstack-clash-protection, but the test is not asking explicitly for those via dg-options or dg-additional-options, then mark the test as unsupported. Since these

Re: [PATCH v2] config/rs6000/t-float128: Don't encode full build paths into headers

2025-07-18 Thread Segher Boessenkool
at I prepare separate > backport > patches for these branches, or will the backports be handled by maintainers? Like I said above, all backports are approved. Please send emails here (i.e. gcc-patches@) when you do one, maybe with the patch if it needs modification, etc. Segher

Re: [PATCH v2] config/rs6000/t-float128: Don't encode full build paths into headers

2025-07-18 Thread Harish Sadineni
Hi Segher, On 7/17/2025 10:20 PM, Segher Boessenkool wrote: CAUTION: This email comes from a non Wind River email account! Do not click links or open attachments unless you recognize the sender and know the content is safe. Hi! On Thu, Jul 17, 2025 at 05:58:47AM -0700, harish.sadin...@windriv

[PATCH v3] config/rs6000/t-float128: Don't encode full build paths into headers

2025-07-18 Thread Harish . Sadineni
From: Harish Sadineni Avoid encoding full build paths into file headers, use only the basename of the source file. This improves build reproducibility, particularly in environments where build paths vary and source files are saved for debugging. For example, in addkf3-sw.c the file header previo

Re: [PATCH] [aarch64] Stop using sys/ifunc.h header in libatomic and libgcc

2025-07-18 Thread Yury Khrustalev
and future glibcs, starting with 2.42, that would pass hwcap, hwcap2,3,4. I should probably add tests to the patch, will do in v2. It is easy to miss the check for size at runtime. Thanks, Yury

Re: [PATCH] [contrib] Add process_make.py

2025-07-18 Thread Filip Kastl
C_PATTERN > +self.xgpp = XGPP_PATTERN > +self.gfortran = GFORTRAN_PATTERN > + > +def match_c_pattern(self, line: str): > +cc_match = re.match(self.cc, line) > +if cc_match: > +return cc_match > +return re.match(self.xgcc

Re: [PATCH] tree-optimization/120924 - up --param uninit-max-chain-len

2025-07-18 Thread Jakub Jelinek
On Fri, Jul 18, 2025 at 09:07:35AM +0200, Richard Biener wrote: > The PR shows that the uninit analysis limits are set too low in > cases we lower switches to ifs as happens on s390x for a linux > kernel TU. This causes false positive uninit diagnostics as we > abort the attempt to prove that a va

[PATCH] tree-optimization/120924 - up --param uninit-max-chain-len

2025-07-18 Thread Richard Biener
The PR shows that the uninit analysis limits are set too low in cases we lower switches to ifs as happens on s390x for a linux kernel TU. This causes false positive uninit diagnostics as we abort the attempt to prove that a value is initialized on all paths. The new testcase only would require up

[pushed-15] [PATCH] [modula2] Comment tidyup in gm2-compiler/M2GCCDeclare.mod

2025-07-18 Thread Gaius Mulley
This patch reformats three comments in the GNU GCC style. gcc/m2/ChangeLog: * gm2-compiler/M2GCCDeclare.mod (StartDeclareModuleScopeSeparate): Reformat statement comments. (StartDeclareModuleScopeWholeProgram): Ditto. (cherry picked from commit

Re: [PATCH] gimple-fold: Fix up big endian _BitInt adjustment [PR121131]

2025-07-18 Thread Richard Biener
R_INT_TYPE_MODE ()) and TREE_INT_CST_LOW (TYPE_SIZE_UNIT > ()) for the BLKmode ones. > In this case, it wants bits rather than bytes, so I've used > GET_MODE_BITSIZE like before and TYPE_SIZE otherwise. > > Furthermore, the patch only computes encoding_size for big endian > tar

Re: [PATCH] tree-sra: Fix grp_covered flag computation when totally scalarizing (PR117423)

2025-07-18 Thread Richard Biener
when we eventually cannot > scalarize, such as when a scalar access has children accesses) but the > actual bug is that the detection if all data in an aggregate is indeed > covered by replacements just assumes that is always the case if total > scalarization triggers which however may no

Re: [PATCH 2/2] libstdc++: Implement reverse iteration for _Utf_view

2025-07-18 Thread Tomasz Kaminski
On Thu, Jul 17, 2025 at 7:02 PM Jonathan Wakely wrote: > This implements the missing functions in _Utf_iterator to support > reverse iteration. All existing tests pass when the view is reversed, so > that the same code units are seen when iterating forwards or backwards. > > libstdc++-v3/ChangeLo

Re: [PATCH v5 2/6] dwarf: create annotation DIEs for btf tags

2025-07-17 Thread Richard Biener
TAG_GNU_annotation and DW_AT_GNU_annotation are used to represent > >> these user annotations in DWARF. > >> > >> This patch introduces the new DWARF extension DIE and attribute, and > >> generates them as necessary to represent user annotations from >

[PATCH v3] libstdc++: Add std::inplace_vector for C++26 (P0843R14) [PR119137]

2025-07-17 Thread Tomasz Kamiński
From: Jonathan Wakely Implement std::inplace_vector as specified in P0843R14, without follow up papers, in particular P3074R7 (trivial unions). In consequence inplace_vector can be used inside constant evaluations only if T is trivial or N is equal to zero. We provide a separate specialization f

[PATCH] tree-optimization/121126 - properly verify live LC PHIs

2025-07-17 Thread Richard Biener
The following makes sure we analyze live LC PHIs not part of a double reduction. Bootstrap and regtest running on x86_64-unknown-linux-gnu. PR tree-optimization/121126 * tree-vect-stmts.cc (vect_analyze_stmt): Analyze the live lane extract for LC PHIs that are vect_interna

Re: [PATCH v2] libstdc++: Add std::inplace_vector for C++26 (P0843R14) [PR119137]

2025-07-17 Thread Tomasz Kaminski
On Thu, Jul 17, 2025 at 10:39 PM Jonathan Wakely wrote: > On 17/07/25 15:23 -0400, Patrick Palka wrote: > >On Thu, 17 Jul 2025, Tomasz Kamiński wrote: > >> + constexpr inplace_vector& > >> + operator=(const inplace_vector& __other) > >> + noexcept(is_nothrow_copy_assignable_v<_Tp>

Re: [PATCH] rs6000: Backport r15-2928-gbf891fcabca7a5 to gcc-14

2025-07-17 Thread Kishan Parmar
On 18/07/25 2:09 am, Segher Boessenkool wrote: > So, how do you resolve it in this backport, simply leaving out those > hunks? > > If so: okay for 14. You don't want to backport further, right? More > stuff becomes missing :-) Yes, We need to ignore those patterns in this backport! Thanks, Kis

Re: [RFC PATCH 0/5] aarch64: Support for user-defined aarch64 tuning parameters in JSON

2025-07-17 Thread Soumya AR
l email: Use caution opening links or attachments > > > writes: >> From: Soumya AR >> >> Hi, >> >> This RFC and subsequent patch series introduces support for printing and >> parsing >> of aarch64 tuning parameters in the form of JSON. > >

Re: [RFC PATCH 0/5] aarch64: Support for user-defined aarch64 tuning parameters in JSON

2025-07-17 Thread Soumya AR
> On 7 May 2025, at 6:18 PM, David Malcolm wrote: > > External email: Use caution opening links or attachments > > > On Tue, 2025-05-06 at 14:00 +0530, soum...@nvidia.com wrote: >> From: Soumya AR >> >> Hi, >> >> This RFC and subsequent pat

[RFC PATCH v2 3/6] json: Add get_map() method to JSON object class

2025-07-17 Thread soumyaa
From: Soumya AR This patch adds a get_map () method to the JSON object class to provide access to the underlying hash map that stores the JSON key-value pairs. It also reorganizes the private and public sections of the class to expose the map_t typedef, which is the return type of get_map

[RFC PATCH v2 1/6] aarch64 + arm: Remove const keyword from tune_params members and nested members

2025-07-17 Thread soumyaa
From: Soumya AR To allow runtime updates to tuning parameters, the const keyword is removed from the members of the tune_params structure and the members of its nested structures. Since this patch also touches tuning structures in the arm backend, it was bootstrapped on aarch64-linux-gnu as

[RFC PATCH v2 4/6] aarch64: Enable parsing of user-provided AArch64 CPU tuning parameters

2025-07-17 Thread soumyaa
From: Soumya AR This patch adds support for loading custom CPU tuning parameters from a JSON file for AArch64 targets. The '-muser-provided-CPU=' flag accepts a user provided JSON file and overrides the internal tuning parameters at GCC runtime. This patch was bootstrapped and re

[RFC PATCH v2 2/6] aarch64: Enable dumping of AArch64 CPU tuning parameters to JSON

2025-07-17 Thread soumyaa
From: Soumya AR This patch adds functionality to dump AArch64 CPU tuning parameters to a JSON file. The new '-fdump-tuning-model=' flag allows users to export the current tuning model configuration to a JSON file. This patch was bootstrapped and regtested on aarch64-linux-gnu, no

[RFC PATCH v2 6/6] aarch64: Script to auto generate JSON tuning routines

2025-07-17 Thread soumyaa
From: Soumya AR This commit introduces a Python maintenance script that generates C++ code for parsing and serializing AArch64 JSON tuning parameters based on the schema defined in aarch64-json-schema.h. The script generates two include files: - aarch64-json-tunings-parser-generated.inc - aa

  1   2   3   4   5   6   7   8   9   10   >