[PATCH] Remove STMT_VINFO_REDUC_VECTYPE_IN

2025-08-25 Thread Richard Biener
This was added when invariants/externals outside of SLP didn't have an easily accessible vector type. Now it's redundant so the following removes it. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. * tree-vectorizer.h (stmt_vec_info_::reduc_vectype_in): Remove. (STMT

Re: [PATCH v2] [x86] Enable unroll in the vectorizer when there's reduction for FMA/DOT_PROD_EXPR/SAD_EXPR

2025-08-25 Thread Hongtao Liu
On Mon, Aug 18, 2025 at 4:52 PM Hongtao Liu wrote: > > On Mon, Aug 11, 2025 at 8:57 PM Richard Biener wrote: > > > > On Sun, 10 Aug 2025, liuhongt wrote: > > > > > > > > > > The comment doesn't match the bool type. > > > > > > > Fixed. > > > > > > > > > > > is_gimple_assign (stmt_info->stmt) > >

[PATCH v2] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-25 Thread Kees Cook
The __attribute__((__copy__)) functionality was crashing when copying sanitizer-related attributes because these attributes violated the standard GCC attribute infrastructure by storing INTEGER_CST values directly instead of wrapping them in TREE_LIST like all other attributes. Wrap sanitizer attr

Re: [PATCH] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-25 Thread Kees Cook
On Mon, Aug 25, 2025 at 08:24:20PM +, Qing Zhao wrote: > Hi, Kees, > > Is this patch for GCC14? I noticed that some codes have been changed in the > latest trunk GCC already. Oh, I may be a bit behind. My base commit was 3e4ced9de1f1c6444eae44c1fed493742c345bc6 (Aug 1st). I will rebase...

Re: [PATCH] Add a test for PR tree-optimization/121656

2025-08-25 Thread Andrew Pinski
On Mon, Aug 25, 2025 at 9:51 PM Sam James wrote: > > "H.J. Lu" writes: > > > PR tree-optimization/121656 > > * gcc.dg/pr121656.c: New file. > > > > Signed-off-by: H.J. Lu > > --- > > gcc/testsuite/gcc.dg/pr121656.c | 21 + > > 1 file changed, 21 insertions(+) > >

Re: [PATCH] Add a test for PR tree-optimization/121656

2025-08-25 Thread Sam James
"H.J. Lu" writes: > PR tree-optimization/121656 > * gcc.dg/pr121656.c: New file. > > Signed-off-by: H.J. Lu > --- > gcc/testsuite/gcc.dg/pr121656.c | 21 + > 1 file changed, 21 insertions(+) > create mode 100644 gcc/testsuite/gcc.dg/pr121656.c > > diff --git a/g

[PATCH] arc: Add const attribute support for mathematical ARC builtins

2025-08-25 Thread Kees Cook
The ARC builtin functions __builtin_arc_ffs and __builtin_arc_fls perform pure mathematical operations equivalent to the standard GCC __builtin_ffs function, which is marked with the const attribute. However, the ARC target-specific versions were not marked as const, preventing compiler optimizatio

Re: [PATCH] Fix an ICE with recent GFNI changes

2025-08-25 Thread Hongtao Liu
On Tue, Aug 26, 2025 at 9:38 AM Andi Kleen wrote: > > From: Andi Kleen > > Make the expand pattern for operand 1 match the final instruction. > > PR 121658 > > gcc/ChangeLog: > > * config/i386/sse.md ("3"): Use > register_operand for rotate patterns. > > gcc/testsuite/Chan

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Sandra Loosemore
On 8/25/25 00:13, Jakub Jelinek wrote: Yes, GCC doesn't have it implemented fully, but that doesn't mean it should be ripped off, the implementation should be simply finished. Well, I have no idea how to make this work, nor any enthusiasm for devoting a big block of time to this. So I've take

[PATCH] Fix an ICE with recent GFNI changes

2025-08-25 Thread Andi Kleen
From: Andi Kleen Make the expand pattern for operand 1 match the final instruction. PR 121658 gcc/ChangeLog: * config/i386/sse.md ("3"): Use register_operand for rotate patterns. gcc/testsuite/ChangeLog: * gcc.target/i386/pr121658.c: New test. --- gcc/config/

Re: [PATCH v2] match.pd: Fold pattern of round semantics.

2025-08-25 Thread Zhou Zhao
Ping 在 2025/8/21 下午8:37, Zhou Zhao 写道: This patch is a respond of the patch posted at https://gcc.gnu.org/pipermail/gcc-patches/2025-January/673051.html as some suggestion by Richard Biener, I have adopted these suggestions and regenerated the patch. In the 538.imagick_r benchmark of Spec2017,

Re: [PATCH] i386: Fix up recent changes to use GFNI for rotates/shifts [PR121658]

2025-08-25 Thread Hongtao Liu
On Tue, Aug 26, 2025 at 6:40 AM Jakub Jelinek wrote: > > Hi! > > The vgf2p8affineqb_ pattern uses "register_operand" > predicate for the first input operand, so using "general_operand" > for the rotate operand passed to it leads to ICEs, and so does > the "nonimmediate_operand" in the v16qi3 defin

Re: [PATCH] PR target/89828 Inernal compiler error on "-fno-omit-frame-pointer"

2025-08-25 Thread Jeff Law
On 8/25/25 9:00 AM, Yoshinori Sato wrote: The problem was caused by an erroneous note about creating a stack frame, which caused the cur_cfa reg to fail to assert with a value other than the frame pointer. This fix will generate notes that correctly update cur_cfa. gcc/config/rx/ * r

[PATCH] i386: Fix up recent changes to use GFNI for rotates/shifts [PR121658]

2025-08-25 Thread Jakub Jelinek
Hi! The vgf2p8affineqb_ pattern uses "register_operand" predicate for the first input operand, so using "general_operand" for the rotate operand passed to it leads to ICEs, and so does the "nonimmediate_operand" in the v16qi3 define_expand. The following patch fixes it by using "register_operand"

[committed] omp-expand: Initialize fd->loop.n2 if needed for the zero iter case [PR121453]

2025-08-25 Thread Jakub Jelinek
Hi! When expand_omp_for_init_counts is called from expand_omp_for_generic, zero_iter1_bb is NULL and the code always creates a new bb in which it clears fd->loop.n2 var (if it is a var), because it can dominate code with lastprivate guards that use the var. When called from other places, zero_iter

Re: [PATCH] c++, v2: Fix ICE with parameter uses in expansion stmts [PR121575]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 03:49:56PM -0400, Jason Merrill wrote: > On 8/25/25 10:53 AM, Jakub Jelinek wrote: > > On Mon, Aug 25, 2025 at 09:44:29AM -0400, Jason Merrill wrote: > > > > --- gcc/cp/pt.cc.jj 2025-08-23 15:00:04.262787988 +0200 > > > > +++ gcc/cp/pt.cc2025-08-23 15:51:08.72608

Re: [PATCH] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-25 Thread Qing Zhao
Hi, Kees, Is this patch for GCC14? I noticed that some codes have been changed in the latest trunk GCC already. > On Aug 25, 2025, at 11:59, Kees Cook wrote: > > The __attribute__((__copy__)) functionality was crashing when copying > sanitizer-related attributes because these attributes viola

[PATCH] ctf: use HOST_WIDE_INT for type bit sizes [PR121411]

2025-08-25 Thread David Faust
When translating type bit sizes from DWARF, ctf_die_bitsize was using uint32_t. For extremely large struct types, the bit size may be larger than 32-bits and hence truncated, which caused incorrect encoding for these huge structs rather than properly using CTF's large type size encoding. Switchin

Re: [PATCH] c++: Fix auto return type deduction with expansion statements [PR121583]

2025-08-25 Thread Jason Merrill
On 8/25/25 12:02 PM, Jakub Jelinek wrote: On Mon, Aug 25, 2025 at 11:55:24AM -0400, Patrick Palka wrote: The following patch fixes that by testing DECL_TEMPLATE_INFO, dunno what else would be more appropriate for this function is a template, maybe decl_dependent_p? I was going to suggest just

Re: [PATCH] c++, v2: Fix ICE with parameter uses in expansion stmts [PR121575]

2025-08-25 Thread Jason Merrill
On 8/25/25 10:53 AM, Jakub Jelinek wrote: On Mon, Aug 25, 2025 at 09:44:29AM -0400, Jason Merrill wrote: --- gcc/cp/pt.cc.jj 2025-08-23 15:00:04.262787988 +0200 +++ gcc/cp/pt.cc2025-08-23 15:51:08.726081054 +0200 @@ -22321,6 +22321,13 @@ tsubst_expr (tree t, tree args, tsubst_f

Re: [PATCH] ctf: avoid overflow for array num elements [PR121411]

2025-08-25 Thread David Faust
On 8/25/25 10:33, Indu Bhagat wrote: > On 8/25/25 8:08 AM, David Faust wrote: >> >> >> On 8/22/25 23:49, Indu Bhagat wrote: >>> On 8/6/25 9:26 AM, David Faust wrote: CTF array encoding uses uint32 for number of elements. This means there is a hard upper limit on array types which the

Re: [PATCH] fortran: implement conditional expression for fortran 2023

2025-08-25 Thread Yuao Ma
Hi Tobias, I addressed some review comments and included additional feedback. On 8/22/2025 11:22 PM, Tobias Burnus wrote: Hi Yuao, Yuao Ma wrote: Hi Paul, On 7/31/2025 6:02 AM, Paul Richard Thomas wrote: That's exactly how I had a mind to do it. You beat me to it 🙁 Just get on, polish the

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 06:43:11PM +0200, Jakub Jelinek wrote: > On Mon, Aug 25, 2025 at 10:23:52AM -0600, Sandra Loosemore wrote: > > On 8/25/25 09:29, Jakub Jelinek wrote: > > > On Mon, Aug 25, 2025 at 09:13:58AM -0600, Sandra Loosemore wrote: > > > > How? Declare variant substitution presently

Re: [PATCH] ctf: avoid overflow for array num elements [PR121411]

2025-08-25 Thread Indu Bhagat
On 8/25/25 8:08 AM, David Faust wrote: On 8/22/25 23:49, Indu Bhagat wrote: On 8/6/25 9:26 AM, David Faust wrote: CTF array encoding uses uint32 for number of elements. This means there is a hard upper limit on array types which the format can represent. Hi David, Thanks for the patch.

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 10:23:52AM -0600, Sandra Loosemore wrote: > On 8/25/25 09:29, Jakub Jelinek wrote: > > On Mon, Aug 25, 2025 at 09:13:58AM -0600, Sandra Loosemore wrote: > > > How? Declare variant substitution presently happens primarily during > > > gimplification which is way before any v

Re: [PATCH] ctf: avoid overflow for array num elements [PR121411]

2025-08-25 Thread Bruce McCulloch
Hi David, This LGTM. Good catch! Bruce McCulloch On 8/6/25 9:26 AM, David Faust wrote: CTF array encoding uses uint32 for number of elements. This means there is a hard upper limit on array types which the format can represent. GCC internally was also using a uint32_t for this, which would o

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Sandra Loosemore
On 8/25/25 09:29, Jakub Jelinek wrote: On Mon, Aug 25, 2025 at 09:13:58AM -0600, Sandra Loosemore wrote: How? Declare variant substitution presently happens primarily during gimplification which is way before any vectorization happens. And fixing the various bugs esp in the C++ front end with

Re: [PATCH] config: Remove unused autoconf files

2025-08-25 Thread Pietro Monteiro
On Sun, Aug 24, 2025, at 12:33 PM, Joseph Myers wrote: > On Thu, 21 Aug 2025, Pietro Monteiro wrote: > >> Both GCC and binutils/gdb trees do not use any of the macros defined >> in these files. Removing them from both trees and regenerating the >> build scripts results in no diff. > > Can you conf

Re: [PATCH] c++: Fix auto return type deduction with expansion statements [PR121583]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 11:55:24AM -0400, Patrick Palka wrote: > > The following patch fixes that by testing DECL_TEMPLATE_INFO, dunno > > what else would be more appropriate for this function is a template, > > maybe decl_dependent_p? > > I was going to suggest just replacing the !processing_temp

[PATCH] Fix sanitizer attribute infrastructure to use standard TREE_LIST format [PR113264]

2025-08-25 Thread Kees Cook
The __attribute__((__copy__)) functionality was crashing when copying sanitizer-related attributes because these attributes violated the standard GCC attribute infrastructure by storing INTEGER_CST values directly instead of wrapping them in TREE_LIST like all other attributes. Wrap sanitizer attr

Re: [PATCH] c++: Fix auto return type deduction with expansion statements [PR121583]

2025-08-25 Thread Patrick Palka
On Mon, 25 Aug 2025, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs during expansion, because cfun->returns_struct > wasn't cleared, despite auto being deduced to int. > > The problem is that check_return_type -> apply_deduced_return_type > is called when parsing the expansion stmt b

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 05:29:13PM +0200, Jakub Jelinek wrote: > That is not what should be done. The lookup should be done at the declare > variant declaration side, that is how the design has been since that > meeting. The compiler records the variants and later on just picks from > that list o

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 09:13:58AM -0600, Sandra Loosemore wrote: > If it has always been the intent that "declare variant" substitution should > do this SIMD replacement directly rather than it being a separate > transformation, can you come up with some references that say this, or code > example

[PATCH] Add a test for PR tree-optimization/121656

2025-08-25 Thread H.J. Lu
PR tree-optimization/121656 * gcc.dg/pr121656.c: New file. Signed-off-by: H.J. Lu --- gcc/testsuite/gcc.dg/pr121656.c | 21 + 1 file changed, 21 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr121656.c diff --git a/gcc/testsuite/gcc.dg/pr121656.c b/g

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Sandra Loosemore
On 8/25/25 00:13, Jakub Jelinek wrote: On Sun, Aug 24, 2025 at 08:16:32PM -0600, Sandra Loosemore wrote: As noted in PR middle-end/121630, GCC seems to think that the "simd" construct selector on "declare variant" implies that the variant function accepts vectorized arguments, although this is n

Re: [PATCH] ctf: avoid overflow for array num elements [PR121411]

2025-08-25 Thread David Faust
On 8/22/25 23:49, Indu Bhagat wrote: > On 8/6/25 9:26 AM, David Faust wrote: >> CTF array encoding uses uint32 for number of elements. This means there >> is a hard upper limit on array types which the format can represent. >> > > Hi David, > > Thanks for the patch. > > Few nits. But otherwi

Re: [PATCH 3/3] xtensa: Make use of compact insn definition syntax for insns whose have multiple alternatives

2025-08-25 Thread Max Filippov
On Sun, Aug 24, 2025 at 2:31 PM Takayuki 'January June' Suwa wrote: > > The use of compact syntax makes the relationship between asm output, > operand constraints, and insn attributes easier to understand and modify, > especially for "mov_internal". > > gcc/ChangeLog: > > * config/xtensa/x

[PATCH] PR target/89828 Inernal compiler error on "-fno-omit-frame-pointer"

2025-08-25 Thread Yoshinori Sato
The problem was caused by an erroneous note about creating a stack frame, which caused the cur_cfa reg to fail to assert with a value other than the frame pointer. This fix will generate notes that correctly update cur_cfa. gcc/config/rx/ * rx.cc (add_pop_cfi_notes): Release the frame poi

[PATCH] c++, v2: Fix ICE with parameter uses in expansion stmts [PR121575]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 09:44:29AM -0400, Jason Merrill wrote: > > --- gcc/cp/pt.cc.jj 2025-08-23 15:00:04.262787988 +0200 > > +++ gcc/cp/pt.cc2025-08-23 15:51:08.726081054 +0200 > > @@ -22321,6 +22321,13 @@ tsubst_expr (tree t, tree args, tsubst_f > > if (DECL_NAME (t) == this_identi

Re: [PATCH v2 1/1] contrib: add bpf-vmtest-tool to test BPF programs

2025-08-25 Thread Jose E. Marchesi
Thanks Piyush. > Hi Jose, > > Thank you for the edit permission. > I’ve updated the branch name in my repository to a clearer one and > also updated the wiki. I’ll continue making edits to add more details > about the tool. > > Best regards, > Piyush > > > On Tue, 19 Aug 2025 at 23:01, Jose E. M

Re: [PATCH v2 0/3] RISC-V: Combine vec_duplicate + vmacc.vv to vmacc.vx on GR2VR cost

2025-08-25 Thread Jeff Law
On 8/23/25 2:34 AM, pan2...@intel.com wrote: From: Pan Li This patch would like to introduce the combine of vec_dup + vmacc.vv into vmacc.vx on the cost value of GR2VR. The late-combine will take place if the cost of GR2VR is zero, or reject the combine if non-zero like 1, 2, 15 in test. F

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-25 Thread Qing Zhao
> On Aug 25, 2025, at 04:13, Peter Zijlstra wrote: > > On Fri, Aug 22, 2025 at 03:29:11PM -0700, Kees Cook wrote: >> On Fri, Aug 22, 2025 at 08:29:16PM +, Qing Zhao wrote: On Aug 22, 2025, at 15:02, Kees Cook wrote: Right, and sometimes we have to explicitly perform a no-op

Re: [PATCH] c++: Fix ICE with parameter uses in expansion stmts [PR121575]

2025-08-25 Thread Jason Merrill
On 8/25/25 2:52 AM, Jakub Jelinek wrote: Hi! The following testcase shows an ICE when a parameter of a non-template function is referenced in expansion stmt body. tsubst_expr in that case assumes that either the PARM_DECL has registered local specialization, or is this argument or it is in unev

Re: [PATCH][PR121599] aarch64: Fix ICE when op2 is zero for SVE2 saturating add intrinsics.

2025-08-25 Thread Kyrylo Tkachov
Hi Jennifer, > On 25 Aug 2025, at 12:56, Jennifer Schmitz wrote: > > When op2 in SVE2 saturating add intrinsics (svuqadd, svsqadd) is a zero > vector and predication is _z, an ICE in vregs occurs, e.g. for > > svuint8_t foo (svbool_t pg, svuint8_t op1) > { >return svsqadd_u8_z (pg, op1, svd

Re: [PATCH] c++: Implement C++ CWG3048 - Empty destructuring expansion statements

2025-08-25 Thread Jason Merrill
On 8/25/25 2:56 AM, Jakub Jelinek wrote: Hi! The following patch implements the proposed resolution of https://cplusplus.github.io/CWG/issues/3048.html Instead of rejecting structured binding size it just builds a normal decl rather than structured binding declaration. Bootstrapped/regtested on

Re: [PATCH v4 6/9] asan: add new memtag sanitizer

2025-08-25 Thread Claudiu Zissulescu-Ianculescu
>>/* Check error recovery for -fsanitize-recover option. */ >>for (int i = 0; sanitizer_opts[i].name != NULL; ++i) >> if ((opts->x_flag_sanitize_recover & sanitizer_opts[i].flag) >> @@ -2300,7 +2319,8 @@ parse_sanitizer_options (const char *p, location_t >> loc, int scode, >>

PING^2: [PATCH v2 1/3] Support symbol reference in jump label and jump table

2025-08-25 Thread H.J. Lu
On Thu, Jun 26, 2025 at 3:32 PM H.J. Lu wrote: > > On Thu, May 8, 2025 at 11:11 AM H.J. Lu wrote: > > > > Conditional and unconditional branch targets can be either a label or > > a symbol. For conditional jump: > > > > (jump_insn 7 6 14 2 (set (pc) > > (if_then_else (eq (reg:CCZ 17 flag

Re: [PATCH] c++: Check for *jump_target earlier in cxx_bind_parameters_in_call [PR121601]

2025-08-25 Thread Jason Merrill
On 8/25/25 2:48 AM, Jakub Jelinek wrote: Hi! The following testcase ICEs, because the /* Check we aren't dereferencing a null pointer when calling a non-static member function, which is undefined behaviour. */ if (i == 0 && DECL_OBJECT_MEMBER_FUNCTION_P (fun)

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

2025-08-25 Thread Jason Merrill
On 8/23/25 1:24 AM, 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: * parser.cc (cp_parser_braced_list): You're missing a descri

Re: [PATCH] c++/modules: Provide definitions of synthesized methods outside their defining module [PR120499]

2025-08-25 Thread Jason Merrill
On 8/24/25 9:05 AM, Nathaniel Shead wrote: On Sat, Aug 23, 2025 at 01:18:19PM -0400, Patrick Palka wrote: On Fri, 22 Aug 2025, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? -- >8 -- In the PR, we're getting a linker error from _Vector_impl's destruct

Re: [PATCH v3] Use incoming small integer argument value as if promoted

2025-08-25 Thread H.J. Lu
On Fri, Jun 27, 2025 at 05:53:57AM +0800, H.J. Lu wrote: > Here is the v3 patch. The difference from v2 is to use > > if (MEM_P (src) > && MEM_EXPR (src) > && (TREE_CODE (get_base_address (MEM_EXPR (src))) > == PARM_DECL)) > cont

[PATCH] libstdc++: Do not require assignment for vector::resize(n, v) [PR90192]

2025-08-25 Thread Tomasz Kamiński
This patch introduces a new function, _M_fill_append, which is invoked when copies of the same value are appended to the end of a vector. Unlike _M_fill_insert(end(), n, v), _M_fill_append never permute elements in place, so it does not require: * vector element type to be assignable; * a copy of t

[PATCH] tree-optimization/121638 - missed SLP discovery of live induction

2025-08-25 Thread Richard Biener
The following fixes a missed SLP discovery of a live induction. Our pattern matching of those fails because of the PR81529 fix which I think was misguided and should now no longer be relevant. So this essentially reverts that fix. I have added a GIMPLE testcase to increase the chance the particula

Re: [PATCH v4 1/9] targhooks: i386: rename TAG_SIZE to TAG_BITSIZE

2025-08-25 Thread Claudiu Zissulescu-Ianculescu
On 8/22/25 4:23 PM, Richard Sandiford wrote: > claudiu.zissulescu-iancule...@oracle.com writes: >> From: Indu Bhagat >> >> gcc/Changelog: >> >> * asan.h (HWASAN_TAG_SIZE): Use targetm.memtag.tag_bitsize. >> * config/i386/i386.cc (ix86_memtag_tag_size): Rename to >> ix86_memtag_ta

[v3 PATCH 5/6] aarch64: Regression tests for parsing of user-provided AArch64 CPU tuning parameters

2025-08-25 Thread soumyaa
From: Soumya AR Signed-off-by: Soumya AR gcc/testsuite/ChangeLog: * gcc.target/aarch64/aarch64-json-tunings/aarch64-json-tunings.exp: New test. * gcc.target/aarch64/aarch64-json-tunings/boolean-1.c: New test. * gcc.target/aarch64/aarch64-json-tunings/boolean-1.json: Ne

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

2025-08-25 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

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

2025-08-25 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 regression. Si

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

2025-08-25 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 regtested on aarch

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

2025-08-25 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 well

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

2025-08-25 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. To do this, we expose the map_t typedef, the return type of get_map(). This change is needed to allow traversal of key-value pairs when

[v3 PATCH 0/6] aarch64: Support for user-defined aarch64 tuning

2025-08-25 Thread soumyaa
From: Soumya AR Hi, This is a follow-up to suggestions given on v2 of the aarch64 user-defined tunings. https://gcc.gnu.org/pipermail/gcc-patches/2025-July/689893.html Attaching an updated patch series here. Regarding some questions on this thread: I've made the changes suggested by Andrew

[PATCH][PR121599] aarch64: Fix ICE when op2 is zero for SVE2 saturating add intrinsics.

2025-08-25 Thread Jennifer Schmitz
When op2 in SVE2 saturating add intrinsics (svuqadd, svsqadd) is a zero vector and predication is _z, an ICE in vregs occurs, e.g. for svuint8_t foo (svbool_t pg, svuint8_t op1) { return svsqadd_u8_z (pg, op1, svdup_s8 (0)); } The insn failed to match the pattern (aarch64-sve2.md): ;; Predic

Re: [PATCH] fortran: add optional lower arg to c_f_pointer

2025-08-25 Thread Tobias Burnus
Hi Yua, Yuao Ma wrote: I noticed that this patch was already committed as r16-3154-g587b8a62f50179! Sorry for the delay in committing. I committed it + wrote an email about it during my vacation, but seemingly, I forgot to hit "send". (I found it in my draft emails.) Tobias

Re: [PATCH v2 1/3] OpenMP: Improve front-end error-checking for "declare variant"

2025-08-25 Thread Tobias Burnus
Sandra Loosemore wrote: This patch fixes a number of problems with parser error checking of "declare variant", especially in the C front end. ... gcc/c/ChangeLog * c-parser.cc (c_finish_omp_declare_variant): Rework diagnostic code. Do not record variant if there are errors. Ma

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Jakub Jelinek
On Mon, Aug 25, 2025 at 11:58:17AM +0200, Tobias Burnus wrote: > Am 25.08.25 um 08:13 schrieb Jakub Jelinek: > > On Sun, Aug 24, 2025 at 08:16:32PM -0600, Sandra Loosemore wrote: > > > As noted in PR middle-end/121630, GCC seems to think that the "simd" > > > construct selector on "declare variant"

Re: [PATCH] match.pd: Fold (C << x) == x -> 0

2025-08-25 Thread Dhruv Chawla
On 21/08/25 16:38, Richard Biener wrote: External email: Use caution opening links or attachments On Thu, 21 Aug 2025, dhr...@nvidia.com wrote: From: Dhruv Chawla Bootstrapped and regtested on aarch64-linux-gnu. Signed-off-by: Dhruv Chawla gcc/ChangeLog: * match.pd: New pattern.

[PATCH v2] match.pd: Fold (C << x) x -> 0 or 1

2025-08-25 Thread dhruvc
From: Dhruv Chawla For ==, < and <=, the fold is to 0. For !=, > and >=, the fold is to 1. This only applies when C != 0. Bootstrapped and regtested on aarch64-linux-gnu. Signed-off-by: Dhruv Chawla gcc/ChangeLog: * match.pd: New patterns. gcc/testsuite/ChangeLog: * gcc.dg/

Re: [PATCH 2/3] OpenMP: Fix handling of "simd" selector on "declare variant" [PR121630]

2025-08-25 Thread Tobias Burnus
Am 25.08.25 um 08:13 schrieb Jakub Jelinek: On Sun, Aug 24, 2025 at 08:16:32PM -0600, Sandra Loosemore wrote: As noted in PR middle-end/121630, GCC seems to think that the "simd" construct selector on "declare variant" implies that the variant function accepts vectorized arguments, although this

[PING] [PATCH v3] testsuite: arm: Disable sched2 and sched3 in unsigned-extend-2.c

2025-08-25 Thread Torbjorn SVENSSON
Hi, Gentle ping for below patch. Kind regards, Torbjörn On 2025-08-10 13:51, Torbjörn SVENSSON wrote: Ok for trunk and releases/gcc-15? For releases/gcc-15, I would also want to cherry-pick r16-562-g20c25919132 that converts the test to use function body instead of three scan-assembler. Chan

Re: [RFC PATCH 2/7] mangle: Introduce C typeinfo mangling API

2025-08-25 Thread Peter Zijlstra
On Fri, Aug 22, 2025 at 03:29:11PM -0700, Kees Cook wrote: > On Fri, Aug 22, 2025 at 08:29:16PM +, Qing Zhao wrote: > > > On Aug 22, 2025, at 15:02, Kees Cook wrote: > > > Right, and sometimes we have to explicitly perform a no-op > > > address-taking to make sure a symbol gets generated: > >

Re: [PATCH v3 2/2] Rewrite bool loads for undefined case [PR121279]

2025-08-25 Thread Richard Biener
On Thu, Aug 21, 2025 at 9:30 AM Andrew Pinski wrote: > > Just like r16-465-gf2bb7ffe84840d8 but this time > instead of a VCE there is a full on load from a boolean. > This showed up when trying to remove the extra copy > in the testcase from the revision mentioned above (pr120122-1.c). > So when m

Re: [PATCH v3 1/2] LIM: Manually put uninit decl into ssa

2025-08-25 Thread Richard Biener
On Thu, Aug 21, 2025 at 9:26 AM Andrew Pinski wrote: > > When working on PR121279, I noticed that lim > would create an uninitialized decl and marking > it with supression for uninitialization warning. > This is fine but then into ssa would just call > get_or_create_ssa_default_def on that new dec

Re: [PATCH 3/3] forwprop: Boolify simplify_permutation

2025-08-25 Thread Richard Biener
On Mon, Aug 25, 2025 at 2:48 AM Andrew Pinski wrote: > > After the return type of remove_prop_source_from_use was changed to void, > simplify_permutation only returns 1 or 0 so it can be boolified. > > Bootstrapped and tested on x86_64-linux-gnu. OK. Richard. > gcc/ChangeLog: > > * tree

Re: [PATCH 2/3] Forwprop: boolify forward_propagate_into_comparison

2025-08-25 Thread Richard Biener
On Mon, Aug 25, 2025 at 2:49 AM Andrew Pinski wrote: > > After changing the return type of remove_prop_source_from_use, > forward_propagate_into_comparison will never return 2. So boolify > forward_propagate_into_comparison. > > Bootstrapped and tested on x86_64-linux-gnu. OK. > gcc/ChangeLog: >

Re: [PATCH 1/3] forwprop: Remove return type of remove_prop_source_from_use

2025-08-25 Thread Richard Biener
On Mon, Aug 25, 2025 at 2:48 AM Andrew Pinski wrote: > > Since r5-4705-ga499aac5dfa5d9, remove_prop_source_from_use has always > return false. This removes the return type of remove_prop_source_from_use > and cleans up the usage of remove_prop_source_from_use. OK. > Bootstrapped and tested on x8

Re: [PATCH] vect: Extend peeling and versioning for alignment to VLA modes

2025-08-25 Thread Robin Dapp
Hi Pengfei, we're seeing several dozens of ICEs in apply_scale since this patch (PR121523). I didn't pay too much attention due to vacation etc. but now coming back to this. Any specific spot I should start looking? -- Regards Robin

Re: [PATCH] forwprop: Mark the old switch index for (maybe) dceing

2025-08-25 Thread Richard Biener
On Sun, Aug 24, 2025 at 5:12 PM Andrew Pinski wrote: > > While looking at this code I noticed that we don't remove > the old switch index assignment if it is only used in the switch > after it is modified in simplify_gimple_switch. > This fixes that by marking the old switch index for the dce work

[PATCH] c++: Fix auto return type deduction with expansion statements [PR121583]

2025-08-25 Thread Jakub Jelinek
Hi! The following testcase ICEs during expansion, because cfun->returns_struct wasn't cleared, despite auto being deduced to int. The problem is that check_return_type -> apply_deduced_return_type is called when parsing the expansion stmt body, at that time processing_template_decl is non-zero an