Re: [PATCH v1] Doc: Add doc for standard name mask_len_strided_load{store}m

2024-10-30 Thread Richard Biener
On Wed, Oct 30, 2024 at 2:39 AM wrote: > > From: Pan Li > > This patch would like to add doc for the below 2 standard names. > > 1. strided load: v = mask_len_strided_load (ptr, stried, mask, len, bias) > 2. strided store: mask_len_stried_store (ptr, stride, v, mask, len, bias) > > gcc/ChangeLog:

[committed] i386: Use assign_stack_temp instead of assign_386_stack_local with SLOT_TEMP

2024-10-30 Thread Uros Bizjak
It is better to use assign_stack_temp instead of assign_386_stack_local with SLOT_TEMP because assign_stack_temp also shares sub-space of stack slots (e.g. HImode temp shares stack slot with SImode stack slot). Use assign_386_stack_local only for special stack slots (SLOT_STV_TEMP that can be nest

Re: [PATCH 1/5] Match: Simplify branch form 4 of unsigned SAT_ADD into branchless

2024-10-30 Thread Richard Biener
On Wed, Oct 30, 2024 at 3:09 AM Li, Pan2 wrote: > > Thanks Richard for comments. > > > You are testing GENERIC folding, so gcc.dg/ is a better location, not > > tree-ssa/ > > Sure, will move all test files to there. > > > I wonder if the simplification is already applied by the frontend and thus

*PING* [PATCH 0/7] fortran: Inline MINLOC/MAXLOC with DIM [PR90608]

2024-10-30 Thread Mikael Morin
*PING* The first series of patches was pushed, the second (and last) one [1][2] is awaiting review. [1] https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665360.html [2] https://gcc.gnu.org/pipermail/fortran/2024-October/061180.html

Re: [PATCH v8] c++: Fix overeager Woverloaded-virtual with conversion operators [PR109918]

2024-10-30 Thread Simon Martin
Friendly ping. Thanks! Simon On 16 Oct 2024, at 17:43, Simon Martin wrote: > Hi Jason, > > On 12 Oct 2024, at 4:51, Jason Merrill wrote: > >> On 10/11/24 7:02 AM, Simon Martin wrote: >>> Hi Jason, >>> >>> On 11 Oct 2024, at 0:35, Jason Merrill wrote: >>> On 10/7/24 3:35 PM, Simon Martin wrot

Re: [PATCH] c++: Relax checking assert about elision to support -fno-elide-constructors [PR114619]

2024-10-30 Thread Simon Martin
On 19 Oct 2024, at 11:09, Simon Martin wrote: > We currently ICE in checking mode with cxx_dialect < 17 on the > following > valid code > > === cut here === > struct X { > X(const X&) {} > }; > extern X x; > void foo () { > new X[1]{x}; > } > === cut here === > > The problem is that cp_gimpli

[COMMITED] [wwwdocs] index: GCC developer room at FOSDEM 2025: Call for Participation open

2024-10-30 Thread Marc Poulhiès
--- htdocs/index.html | 4 1 file changed, 4 insertions(+) diff --git a/htdocs/index.html b/htdocs/index.html index b303744c..d20c7348 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -55,6 +55,10 @@ mission statement. News +https://inbox.sourceware.org/gcc/875xparmhn@katap

[committed] [PATCH] arm: [MVE intrinsics] Remove unused builtins qualifiers

2024-10-30 Thread Christophe Lyon
After the re-implementation of MVE vld/vst intrinsics, a few builtins qualifiers became useless. This patch removes them to restore bootstrap (otherwise the build fails because of 'defined but not used' errors. gcc/ChangeLog: * config/arm/arm-builtins.cc (STRS_QUALIFIERS): Delete.

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Richard Sandiford
Vineet Gupta writes: > On 10/29/24 11:51, Wilco Dijkstra wrote: >> Hi Vineet, >>> I agree the NARROW/WIDE stuff is obfuscating things in technicalities. >> Is there evidence this change would make things significantly worse for >> some targets? > > Honestly I don't think this needs to be behind a

Re: [PATCH v4 3/7] OpenMP: C front-end support for dispatch + adjust_args

2024-10-30 Thread Paul-Antoine Arras
On 24/10/2024 13:42, Tobias Burnus wrote: Hi, some more comments: Paul-Antoine Arras wrote: Here is an updated patch following these comments. gcc/testsuite/ChangeLog: * gcc.dg/gomp/adjust-args-1.c: New test. * gcc.dg/gomp/dispatch-1.c: New test. The Cha

Re: [PATCH] Fortran: fix several front-end memleaks

2024-10-30 Thread Harald Anlauf
Am 29.10.24 um 23:06 schrieb Jerry D: On 10/29/24 2:00 PM, Harald Anlauf wrote: Dear all, while looking at the recent testcase gfortran.dg/pr115070.f90 with f951 running under valgrind, I noticed minor front-end memleaks of gfc_expr's that are probably fallout from a code refactoring, which are

Re: [PATCH] genmatch: Fix build on hppa64-hpux [PR117348]

2024-10-30 Thread Richard Biener
On Wed, 30 Oct 2024, Jakub Jelinek wrote: > Hi! > > Apparently autoconf defines the HAVE_DECL_* macros to 0 > rather than not defining them at all, so defined(HAVE_DECL_FMEMOPEN) > test doesn't do much. > > The following patch fixes it by testing HAVE_DECL_FMEMOPEN > for being non-zero instead.

Re: [PATCH 2/2] Add a new permute optimization step in SLP

2024-10-30 Thread Christoph Müllner
On Fri, Oct 18, 2024 at 1:08 PM Richard Biener wrote: > > On Fri, 18 Oct 2024, Tamar Christina wrote: > > > > -Original Message- > > > From: Richard Biener > > > Sent: Friday, October 18, 2024 11:03 AM > > > To: Tamar Christina > > > Cc: Christoph Müllner ; > > > gcc-patches@gcc.gnu.org

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Jeff Law
On 10/30/24 4:05 AM, Richard Sandiford wrote: Vineet Gupta writes: On 10/29/24 11:51, Wilco Dijkstra wrote: Hi Vineet, I agree the NARROW/WIDE stuff is obfuscating things in technicalities. Is there evidence this change would make things significantly worse for some targets? Honestly I

Re: [PATCH v2] c++: Implement P2662R3, Pack Indexing [PR113798]

2024-10-30 Thread Patrick Palka
On Tue, 29 Oct 2024, Marek Polacek wrote: > On Tue, Oct 22, 2024 at 07:42:57PM -0400, Jason Merrill wrote: > > On 10/22/24 3:22 PM, Marek Polacek wrote: > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > > > > > -- >8 -- > > > This patch implements C++26 Pack Indexing, as desc

RE: [PATCH 1/5] Match: Simplify branch form 4 of unsigned SAT_ADD into branchless

2024-10-30 Thread Li, Pan2
Thanks Richard for comments. > The > former variant indeed needs to duplicate the simplify result expression for > each > matched source (but you could use preprocessor macros if it doesn't > get too ugly). Got it, will have a try similar to #define cheap_sat_u_add (op_0, op_1) ... in v2. Pan

Re: [PATCH] c: Diagnose char argument to __builtin_stdc_*

2024-10-30 Thread Joseph Myers
On Wed, 30 Oct 2024, Jakub Jelinek wrote: > 2024-10-30 Jakub Jelinek > > gcc/c/ > * c-parser.cc (c_parser_postfix_expression): Diagnose if > first __builtin_stdc_* argument has char type even when > -funsigned-char. > gcc/testsuite/ > * gcc.dg/builtin-stdc-bit-3.c: New

Re: [PATCH] Allow BB vectorisation of scalar loop when ifcvt versioned loop is not vectorized

2024-10-30 Thread Richard Biener
On Wed, Oct 30, 2024 at 8:47 AM Kugan Vivekanandarajah wrote: > > Hi Richard, > > > On 29 Oct 2024, at 8:33 pm, Richard Biener > > wrote: > > > > External email: Use caution opening links or attachments > > > > > > On Tue, Oct 29, 2024 at 9:24 AM Kugan Vivekanandarajah > > wrote: > >> > >> Hi R

Ping^3 [PATCH 0/2] Prime path coverage to gcc/gcov

2024-10-30 Thread Jørgen Kvalsvik
Ping. On 10/21/24 15:21, Jørgen Kvalsvik wrote: Ping. On 10/10/24 10:08, Jørgen Kvalsvik wrote: Ping. On 10/3/24 12:46, Jørgen Kvalsvik wrote: This is both a ping and a minor update. A few of the patches from the previous set have been merged, but the big feature still needs review. Since t

[pushed] c++, contracts: Only check contracts attributes [PR116607].

2024-10-30 Thread Iain Sandoe
Tested on x86_64-darwin, powerpc64-linux, pushed to trunk as trivial/obvious, thanks. Iain --- 8< --- The ICE described in the PR is caused by not filtering out non- contract attributes before making the has_active_contract_condition test. Fixed, as suggested by Andrew Pinski, by just using the

[PATCH v4] [aarch64] Fix function multiversioning dispatcher link error with LTO

2024-10-30 Thread Yangyu Chen
We forgot to apply DECL_EXTERNAL to __init_cpu_features_resolver decl. When building with LTO, the linker cannot find the __init_cpu_features_resolver.lto_priv* symbol, causing the link error. This patch gets this fixed by adding DECL_EXTERNAL to the decl. To avoid used but never defined warning f

[PATCH v2] phi-opt: Add missed optimization for "(cond | (a != b)) ? b : a"

2024-10-30 Thread Jovan Vukic
Thanks for the feedback on the first version of the patch. Accordingly: I have corrected the code formatting as requested. I added new tests to the existing file phi-opt-11.c, instead of creating a new one. I performed testing before and after applying the patch on the x86 architecture, and I con

[PATCH] RISC-V: Fix gcc.target/riscv/rvv/base/cpymem-1.c f3

2024-10-30 Thread Craig Blackmore
The function body checks for f3 only ran with -mcmodel explicitly set which meant I missed a regression in my local testing of: commit b039d06c9a810a3fab4c5eb9d50b0c7aff94b2d8 Author: Craig Blackmore Date: Fri Oct 18 09:17:21 2024 -0600 [PATCH 3/7] RISC-V: Fix vector memcpy smaller

Re: [PATCH #1/7] allow vuses in ifcombine blocks (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-30 Thread Richard Biener
On Fri, Oct 25, 2024 at 4:39 PM Alexandre Oliva wrote: > > > Disallowing vuses in blocks for ifcombine is too strict, and it > prevents usefully moving fold_truth_andor into ifcombine. That > tree-level folder has long ifcombined loads, absent other relevant > side effects. OK. Richard. > > fo

Re: [PATCH #3/7] introduce ifcombine_replace_cond (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-30 Thread Richard Biener
On Fri, Oct 25, 2024 at 4:39 PM Alexandre Oliva wrote: > > > Refactor ifcombine_ifandif, moving the common code from the various > paths that apply the combined condition to a new function. > > > for gcc/ChangeLog > > * tree-ssa-ifcombine.cc (ifcombine_replace_cond): Factor out >

Re: [PATCH v4 3/7] OpenMP: C front-end support for dispatch + adjust_args

2024-10-30 Thread Tobias Burnus
Hi, Paul-Antoine Arras wrote: On 24/10/2024 13:42, Tobias Burnus wrote: But there is reason to move them to 5/7: I think we also need a run test for C++ to make sure that it works, i.e. moving them to libgomp.c-c++- common/ makes sense, which in turn requires the 4/7 C++ FE patch. I still n

Re: [PATCH #4/7] adjust update_profile_after_ifcombine for noncontiguous ifcombine (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-30 Thread Richard Biener
On Fri, Oct 25, 2024 at 4:39 PM Alexandre Oliva wrote: > > > Prepare for ifcombining noncontiguous blocks, adding (still unused) > logic to the ifcombine profile updater to handle such cases. > > > for gcc/ChangeLog > > * tree-ssa-ifcombine.cc (known_succ_p): New. > (update_profil

Re: [pushed: r15-4760] diagnostics: support multiple output formats simultaneously [PR116613]

2024-10-30 Thread David Malcolm
On Wed, 2024-10-30 at 12:22 +, Jonathan Wakely wrote: > On 29/10/24 19:19 -0400, David Malcolm wrote: > > This patch generalizes diagnostic_context so that rather than > > having > > a single output format, it has a vector of zero or more. > > [snip] > > > +/* Class for parsing the arguments

Re: [PATCH #5/7] extend ifcombine_replace_cond to handle noncontiguous ifcombine (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-30 Thread Richard Biener
On Fri, Oct 25, 2024 at 4:39 PM Alexandre Oliva wrote: > > > Prepare to handle noncontiguous ifcombine, introducing logic to modify > the outer condition when needed. There are two cases worth > mentioning: > > - when blocks are noncontiguous, we have to place the combined > condition in the ou

Re: [PATCH #2/7] drop redundant ifcombine_ifandif parm (was: Re: [PATCH] fold fold_truth_andor field merging into ifcombine)

2024-10-30 Thread Richard Biener
On Fri, Oct 25, 2024 at 4:39 PM Alexandre Oliva wrote: > > > In preparation to changes that may modify both inner and outer > conditions in ifcombine, drop the redundant parameter result_inv, that > is always identical to inner_inv. OK. > > for gcc/ChangeLog > > * tree-ssa-ifcombine.cc

Re: [PATCH v3] [aarch64] Fix function multiversioning dispatcher link error with LTO

2024-10-30 Thread Yangyu Chen
> On Oct 30, 2024, at 19:59, Richard Sandiford > wrote: > > Yangyu Chen writes: >> We forgot to apply DECL_EXTERNAL to __init_cpu_features_resolver decl. When >> building with LTO, the linker cannot find the >> __init_cpu_features_resolver.lto_priv* symbol, causing the link error. >> >> Thi

jit backports to GCC 14

2024-10-30 Thread David Malcolm
I've backported the following patches from trunk to releases/gcc-14 testsuite, jit: fix test-error-pr63969-missing-driver.c https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665552.html Trunk: r15-4360-gf8dcb559e615db. GCC 14: r14-10854-g771873f0a95162 jit: reset state in varasm.cc [PR11

Re: [PATCH 2/4] RISC-V: Implement TARGET_SCHED_PRESSURE_PREFER_NARROW [PR/114729]

2024-10-30 Thread Jeff Law
On 10/20/24 1:40 PM, Vineet Gupta wrote: This inhibits sched1 aggressive spilling on RISC-V (see prev commit for details of what the hook does). On RISC-V (BPI-F3) we see good results. (Build: -Ofast -march=rv64gcv_zba_zbb_zbs) Before: -- Performance counter stats for './cactusB

Re: [PATCH 4/4] sched1: model: ICE on infinite loops in predecessor promotion (Not for Merge)

2024-10-30 Thread Jeff Law
On 10/20/24 1:40 PM, Vineet Gupta wrote: This is just a testing hack in case someone runs into infinite loops with model schedule change. I did run into quite a few during the course of development and instead of sched trace files eating up the disk, better to ICE and abort. gcc/ChangeLog:

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Vineet Gupta
On 10/30/24 10:25, Jeff Law wrote: > On 10/30/24 9:31 AM, Richard Sandiford wrote: >> That might need some finessing of the name. But I think the concept >> is right. I'd rather base the hook (or param) on a general concept >> like that rather than a specific "wide vs narrow" thing. > Agreed. Na

[PATCH 3/5] ctf: translate annotation DIEs to internal ctf

2024-10-30 Thread David Faust
Translate DW_TAG_GNU_annotation DIEs created for C attributes btf_decl_tag and btf_type_tag into an in-memory representation in the CTF/BTF container. They will be output in BTF as BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG records. The new CTF kinds used to represent these annotations, CTF_K_DECL_T

[PATCH 1/5] c-family: add btf_type_tag and btf_decl_tag attributes

2024-10-30 Thread David Faust
Add two new c-family attributes, "btf_decl_tag" and "btf_type_tag" along with a simple shared handler for them. gcc/c-family/ * c-attribs.cc (c_common_attribute_table): Add btf_decl_tag and btf_type_tag attributes. (handle_btf_tag_attribute): New handler for both new attri

[PATCH 5/5] doc: document btf_type_tag and btf_decl_tag attributes

2024-10-30 Thread David Faust
gcc/ * doc/extend.texi (Common Variable Attributes): Document new btf_decl_tag attribute. (Common Type Attributes): Document new btf_type_tag attribute. --- gcc/doc/extend.texi | 68 + 1 file changed, 68 insertions(+) diff --git

[PATCH 4/5] btf: generate and output DECL_TAG and TYPE_TAG records

2024-10-30 Thread David Faust
Support the btf_decl_tag and btf_type_tag attributes in BTF by creating and emitting BTF_KIND_DECL_TAG and BTF_KIND_TYPE_TAG records, respectively, for them. Some care is required when -gprune-btf is in effect to avoid emitting decl or type tags for declarations or types which have been pruned and

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread David Malcolm
On Wed, 2024-10-30 at 15:53 +, Qing Zhao wrote: > > > > On Oct 30, 2024, at 10:48, David Malcolm > > wrote: > > > > On Wed, 2024-10-30 at 14:34 +, Sam James wrote: > > > Qing Zhao writes: > > > > > > > Control this with a new option -fdiagnostics-details. > > > > [...] > > I have

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread David Malcolm
On Wed, 2024-10-30 at 17:33 +, Sam James wrote: > Qing Zhao writes: > > > > On Oct 30, 2024, at 10:48, David Malcolm > > > wrote: > > > > > > On Wed, 2024-10-30 at 14:34 +, Sam James wrote: > > > > Qing Zhao writes: > > > > > > > > > Control this with a new option -fdiagnostics-detail

Re: [PATCH v3] Remove sys/user time in -ftime-report

2024-10-30 Thread Andi Kleen
On Wed, Oct 23, 2024 at 02:56:51PM +0200, Richard Biener wrote: > On Wed, Oct 9, 2024 at 6:18 PM Andi Kleen wrote: > > > > From: Andi Kleen > > > > Retrieving sys/user time in timevars is quite expensive because it > > always needs a system call. Only getting the wall time is much > > cheaper bec

[Patch, fortran] PR115700 - comment 5: uninitialized string length in ASSOCIATE

2024-10-30 Thread Paul Richard Thomas
This wrinkle to PR115700 came about because the associate-name string length was not being initialized, when an array selector had a substring reference with non-constant start or end. This, of course, caused subsequent references to fail. The ChangeLog provides an adequate explanation of the atta

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
> On Oct 30, 2024, at 10:34, Sam James wrote: > > Qing Zhao writes: > >> Control this with a new option -fdiagnostics-details. >> >> [...] > > The patch doesn't apply for me on very latest trunk -- I think David's > recent diag refactoring means it needs a slight rebase. Could you send > th

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Richard Sandiford
Jeff Law writes: > On 10/30/24 8:44 AM, Richard Sandiford wrote: > >>> But the data from the BPI (spacemit k1 chip) is an in-order core. >>> Granted we don't have a good model of its pipeline, but it's definitely >>> in-order. >> >> Damn :) (I did try to clarify what was being tested earlier, bu

[PATCH v1 2/2] aarch64: specify fpm mode in function instances and groups

2024-10-30 Thread Claudio Bantaloukas
Some intrinsics require setting the fpm register before calling the specific asm opcode required. In order to simplify review, this patch: - adds the fpm_mode_index attribute to function_group_info and function_instance objects - updates existing initialisations and call sites. - updates equalit

[PATCH v1 0/2] aarch64: Add fp8 sve foundation

2024-10-30 Thread Claudio Bantaloukas
The ACLE defines a new set of fp8 vector types and intrinsics that operate on these, some of them operating on the vectors as if they were bags of bits and some requiring an additional argument of type fpm_t. The following two patches introduce: - the types - intrinsics that operate without the f

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
Qing Zhao writes: > Control this with a new option -fdiagnostics-details. > > $ cat t.c > extern void warn(void); > static inline void assign(int val, int *regs, int *index) > { > if (*index >= 4) > warn(); > *regs = val; > } > struct nums {int vals[4];}; > > void sparx5_set (int *ptr, st

Re: [Patch, fortran] PR115700 - comment 5: uninitialized string length in ASSOCIATE

2024-10-30 Thread Steve Kargl
On Wed, Oct 30, 2024 at 04:41:40PM +, Paul Richard Thomas wrote: > This wrinkle to PR115700 came about because the associate-name string > length was not being initialized, when an array selector had a substring > reference with non-constant start or end. This, of course, caused > subsequent re

Re: [PATCH] libgo: Use stub syscall on GNU/Hurd

2024-10-30 Thread Ian Lance Taylor
On Tue, Oct 29, 2024 at 2:04 PM Samuel Thibault wrote: > > * libgo/go/syscall/syscall_funcs.go: Do not build on GNU/Hurd. > * libgo/go/syscall/syscall_funcs_stubs.go: Build on GNU/Hurd. > * libgo/runtime/go-nosys.c: Do not produce syscall() stub on > GNU/Hurd. > T

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Richard Sandiford
Vineet Gupta writes: > On 10/30/24 10:25, Jeff Law wrote: >> On 10/30/24 9:31 AM, Richard Sandiford wrote: >>> That might need some finessing of the name. But I think the concept >>> is right. I'd rather base the hook (or param) on a general concept >>> like that rather than a specific "wide vs

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
> On Oct 30, 2024, at 13:48, Sam James wrote: > > Qing Zhao writes: > >> Control this with a new option -fdiagnostics-details. >> >> $ cat t.c >> extern void warn(void); >> static inline void assign(int val, int *regs, int *index) >> { >> if (*index >= 4) >>warn(); >> *regs = val; >> }

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
Hi, Andi > On Oct 30, 2024, at 12:15, Andi Kleen wrote: > > Qing Zhao writes: > >> Control this with a new option -fdiagnostics-details. > > It would be useful to be also able to print the inline call stack, > maybe with a separate option. Thank you for the suggestion. Yes, inline call stac

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
David Malcolm writes: > On Wed, 2024-10-30 at 17:33 +, Sam James wrote: >> Qing Zhao writes: >> >> > > On Oct 30, 2024, at 10:48, David Malcolm >> > > wrote: >> > > >> > > On Wed, 2024-10-30 at 14:34 +, Sam James wrote: >> > > > Qing Zhao writes: >> > > > >> > > > > Control this wit

[committed] aarch64: Assume alias conflict if common address reg changes [PR116783]

2024-10-30 Thread Alex Coplan
Hi, This is a backport of the PR116783 fix to GCC 14. It was pre-approved here: https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665097.html The only intended non-contextual difference w.r.t. the patch on trunk is that the test no longer needs -fno-late-combine-instructions on the 14 branc

Re: [PATCH] c++: Fix crash during NRV optimization with invalid input [PR117099]

2024-10-30 Thread Simon Martin
[ Resending since this was somehow sent in HMTL mode and was scrubbed ] On 30 Oct 2024, at 17:16, Simon Martin wrote: > Hi, > > Just closing the loop on this... > > On 19 Oct 2024, at 11:57, Iain Sandoe wrote: > > On 19 Oct 2024, at 10:16, Simon Martin wrote: > > On 18 Oct 2024, at 10:55, Sam Ja

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Andi Kleen
Qing Zhao writes: > Control this with a new option -fdiagnostics-details. It would be useful to be also able to print the inline call stack, maybe with a separate option. In some array bounds cases I looked at the problem was hidden in some inlines and it wasn't trivial to figure it out. I wro

Re: [PATCH] gimple: Remove special handling of COND_EXPR for COMPARISON_CLASS_P [PR116949, PR114785]

2024-10-30 Thread Richard Biener
On Wed, Oct 30, 2024 at 1:56 AM Andrew Pinski wrote: > > After r13-707-g68e0063397ba82, COND_EXPR for gimple assign no longer could > contain a comparison. > The vectorizer was builting gimple assigns with comparison until > r15-4695-gd17e672ce82e69 > (which added an assert to make sure it no lo

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
Qing Zhao writes: >> On Oct 30, 2024, at 10:48, David Malcolm wrote: >> >> On Wed, 2024-10-30 at 14:34 +, Sam James wrote: >>> Qing Zhao writes: >>> Control this with a new option -fdiagnostics-details. [...] >>> >>> The patch doesn't apply for me on very latest trunk --

Re: [PATCH v4 3/7] OpenMP: C front-end support for dispatch + adjust_args

2024-10-30 Thread Paul-Antoine Arras
On 30/10/2024 15:08, Tobias Burnus wrote: I still need to look at 4/7 (C++) and 5/7 (tests for C and C++) [either before after you posted the new version]. I sent a revised C++ patch a few moments ago. * * * However, this 3/7 patch LGTM 🙂 One comment: For the < C23 testcase, can you add, e.

Re: [PATCH v3 0/2][RFC]Provide more contexts for -Warray-bounds warning messages

2024-10-30 Thread Sam James
Qing Zhao writes: > Hi, > > This is the 3rd version of the patch for fixing PR109071. > > Thanks a lot for San James's help to test the previous 2nd version of > the patch on a lot of packages in the wild and provide detailed analysis > and filed new bugs. (PR117179, PR117180, etc). Thank you Q

[PATCH v2] RISC-V: Fix gcc.target/riscv/rvv/base/cpymem-1.c f3

2024-10-30 Thread Craig Blackmore
The function body checks for f3 only ran with -mcmodel explicitly set which meant I missed a regression in my local testing of: commit b039d06c9a810a3fab4c5eb9d50b0c7aff94b2d8 Author: Craig Blackmore Date: Fri Oct 18 09:17:21 2024 -0600 [PATCH 3/7] RISC-V: Fix vector memcpy smaller

[Patch] OpenMP/C++: Fix declare variant with reference-returning functions

2024-10-30 Thread Tobias Burnus
Before the patch, the included testcase fails with: declare-variant-9.C:4:29: error: could not find variant declaration 4 | #pragma omp declare variant(variant_fn) match(user={condition(1)}) | ^~ Comments, remarks, suggestions before I commit it? To

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Richard Sandiford
Jeff Law writes: > On 10/30/24 9:31 AM, Richard Sandiford wrote: > >> >> OK (and yeah, I can sympathise). But I think there's an argument that, >> if you're scheduling for one in-order core using the pipeline of an >> unrelated core, that's effectively scheduling for the core as though >> it wer

Re: [PATCH v3 2/2][RFC] Add debugging for move history.

2024-10-30 Thread Sam James
Qing Zhao writes: > gcc/ChangeLog: > > * diagnostic-move-history.cc (dump_move_history): New routine. > (dump_move_history_for): Likewise. > (debug_mv_h): Likewise. > * diagnostic-move-history.h (dump_move_history): New prototype. > (dump_move_history_for): Likewise.

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
Thanks, Sam. Yes, the changes you made are exactly what I made in my local area for the rebase. All the new testing cases passed. I am doing the complete regression test on X86 and also bootstrap on aarch64 right now. Qing > On Oct 30, 2024, at 13:33, Sam James wrote: > > Qing Zhao writes:

Re: [PATCH v3 0/2][RFC]Provide more contexts for -Warray-bounds warning messages

2024-10-30 Thread Qing Zhao
> On Oct 30, 2024, at 13:38, Sam James wrote: > > > Absolutely. Both in terms of improving safety as the whole point of > these warnings is, but also stopping users from being panicked. They > sometimes believe the warnings imply miscompilation because they can't > understand how they would ha

Re: [PATCH] c++: Fix crash during NRV optimization with invalid input [PR117099]

2024-10-30 Thread Simon Martin
Hi, Just closing the loop on this... On 19 Oct 2024, at 11:57, Iain Sandoe wrote: On 19 Oct 2024, at 10:16, Simon Martin wrote: On 18 Oct 2024, at 10:55, Sam James wrote: Simon Martin writes: Hi Sam, Hi Simon, On 16 Oct 2024, at 22:06, Sam James wrote: Simon Martin writes: We ICE upon

Re: [PATCH v4 4/7] OpenMP: C++ front-end support for dispatch + adjust_args

2024-10-30 Thread Paul-Antoine Arras
On 24/10/2024 16:10, Tobias Burnus wrote: Hi PA; only playing around quickly and glancing at the patch; I need to have a real look at this later. Paul-Antoine Arras: This patch adds C++ support for the `dispatch` construct and the `adjust_args` clause. It relies on the c-family bits comprised

[PATCH] aarch64: Forbid F64MM permutes in streaming mode

2024-10-30 Thread Richard Sandiford
The current code was based on an early version of the SME spec, which allowed the .Q forms of TRN1, TRN2, UZP1, UZP2, ZIP1, and ZIP2 to be used in streaming mode. We should now forbid them instead; see https://developer.arm.com/documentation/ddi0602/2024-09/SVE-Instructions/TRN1--TRN2--vectors---

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
> On Oct 30, 2024, at 10:48, David Malcolm wrote: > > On Wed, 2024-10-30 at 14:34 +, Sam James wrote: >> Qing Zhao writes: >> >>> Control this with a new option -fdiagnostics-details. >>> >>> [...] >> >> The patch doesn't apply for me on very latest trunk -- I think >> David's >> recent

Re: [PATCH v2 2/2] Match: make SAT_ADD case 7 commutative

2024-10-30 Thread Akram Ahmad
On 29/10/2024 12:48, Richard Biener wrote: On Mon, Oct 28, 2024 at 4:45 PM Akram Ahmad wrote: Case 7 of unsigned scalar saturating addition defines SAT_ADD = X <= (X + Y) ? (X + Y) : -1. This is the same as SAT_ADD = Y <= (X + Y) ? (X + Y) : -1 due to usadd_left_part_1 being commutative. The p

[PATCH 0/5] Add btf_decl_tag and btf_type_tag C attributes

2024-10-30 Thread David Faust
This patch series adds support for the btf_decl_tag and btf_type_tag attributes to GCC. This entails: - Two new C-family attributes that allow to associate (to "tag") particular declarations and types with arbitrary strings. As explained below, this is intended to be used to, for example, char

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Vineet Gupta
Hi Richard, Apologies as I replied w/o looking for another update on the thread first. On 10/30/24 11:35, Richard Sandiford wrote: I'm not saying that the algorithm gets the decision right for cactu when tuning for in-order CPU X and running on that same CPU X. But it seems like th

[PATCH 1/3] aarch64: Move ENTRY_VHSDF to aarch64-simd-pragma-builtins.def

2024-10-30 Thread Richard Sandiford
It's more convenient for later patches if we only define ENTRY_VHSDF once, in the .def file. Then the only macro that needs to be defined before including the file is ENTRY itself. The patch also moves the architecture requirements out of the individual ENTRY invocations into a block-level defini

[PATCH 0/3] aarch64: Allow separate SVE and SME feature requirements

2024-10-30 Thread Richard Sandiford
Currently we represent architecture requirements using a single bitmask of features. However, some of the new extensions have different requirements in non-streaming mode compared to stremaing mode. This series adds support for that and applies it to FAMINMAX. Tested on aarch64-linux-gnu. Since

[PATCH 2/3] aarch64: Record separate streaming and non-streaming ISA requirements

2024-10-30 Thread Richard Sandiford
For some upcoming extensions, we need to add intrinsics whose ISA requirements differ between streaming mode and non-streaming mode. This patch tries to generalise the infrastructure to support that: - Rather than have a single set of feature flags, the patch uses a separate set for sm_off (non-

[PATCH 2/5] dwarf: create annotation DIEs for btf tags

2024-10-30 Thread David Faust
The btf_decl_tag and btf_type_tag attributes provide a means to annotate declarations and types respectively with arbitrary user provided strings. These strings are recorded in debug information for post-compilation uses, and despite the name they are meant to be recorded in DWARF as well as BTF.

[PATCH 3/3] aarch64: Require SVE2 and/or SME2 for SVE FAMINMAX intrinsics

2024-10-30 Thread Richard Sandiford
After the previous patch, we can now accurately model the ISA requirements for the SVE FAMINMAX intrinsics. They can be used in non-streaming mode if TARGET_SVE2 and in streaming mode if TARGET_SME2 (with both cases also requiring TARGET_FAMINMAX). They can be used in streaming-compatible mode if

[committed] c: Do not document C23 support as experimental and incomplete

2024-10-30 Thread Joseph Myers
Since C23 support is substantially feature-complete, update documentation to no longer refer to it as experimental and incomplete. Bootstrapped with no regressions for x86_64-pc-linux-gnu. gcc/ * doc/cpp.texi (__STDC_VERSION__): Do not refer to C23 support as experimental.

Re: [Patch, fortran] PR115700 - comment 5: uninitialized string length in ASSOCIATE

2024-10-30 Thread Jerry D
On 10/30/24 9:58 AM, Steve Kargl wrote: On Wed, Oct 30, 2024 at 04:41:40PM +, Paul Richard Thomas wrote: This wrinkle to PR115700 came about because the associate-name string length was not being initialized, when an array selector had a substring reference with non-constant start or end. Th

Re: [PATCH 6/7] RISC-V: Make vectorized memset handle more cases

2024-10-30 Thread Craig Blackmore
On 29/10/2024 15:09, Jeff Law wrote: On 10/29/24 7:59 AM, Craig Blackmore wrote: On 19/10/2024 14:05, Jeff Law wrote: On 10/18/24 7:12 AM, Craig Blackmore wrote: `expand_vec_setmem` only generated vectorized memset if it fitted into a single vector store.  Extend it to generate a loop

Re: [PATCH 1/4] sched1: hookize pressure scheduling spilling agressiveness

2024-10-30 Thread Jeff Law
On 10/30/24 9:31 AM, Richard Sandiford wrote: OK (and yeah, I can sympathise). But I think there's an argument that, if you're scheduling for one in-order core using the pipeline of an unrelated core, that's effectively scheduling for the core as though it were out-of-order. In other words

Re: [PATCH v2 7/8] i386: Add else operand to masked loads.

2024-10-30 Thread Robin Dapp
> Could you just try the below change? They work, including them in v3. -- Regards Robin

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
Hi, David, > On Oct 30, 2024, at 14:54, David Malcolm wrote: > > On Wed, 2024-10-30 at 15:53 +, Qing Zhao wrote: >> >> >>> On Oct 30, 2024, at 10:48, David Malcolm >>> wrote: >>> >>> On Wed, 2024-10-30 at 14:34 +, Sam James wrote: Qing Zhao writes: > Control this with

[PATCH v3] c++: Implement P2662R3, Pack Indexing [PR113798]

2024-10-30 Thread Marek Polacek
On Wed, Oct 30, 2024 at 09:01:36AM -0400, Patrick Palka wrote: > On Tue, 29 Oct 2024, Marek Polacek wrote: > > +/* Substitute ARGS into T, which is a pack index (i.e., PACK_INDEX_TYPE or > > + PACK_INDEX_EXPR). Returns a single type or expression, a PACK_INDEX_* > > + node if only a partial su

[PATCH v2 08/10] Test: Add testcases for form 6 of unsigned integer SAT_ADD simplify

2024-10-30 Thread pan2 . li
From: Pan Li The phiopt2 pass will also try the gimple_simplify for the form 6 of unsigned integer SAT_ADD. Thus add the testcase to make sure it will be performed in phiopt2 pass. gcc/testsuite/ChangeLog: * gcc.dg/sat_arith_simplify.h: Add test helper macros. * gcc.dg/sat_u_ad

[PATCH] aarch64: Add support for FUJITSU-MONAKA (-mcpu=fujitsu-monaka) CPU

2024-10-30 Thread Yuta Mukai (Fujitsu)
Hello, This patch adds initial support for FUJITSU-MONAKA CPU, which we are developing. This is the slides for the CPU: https://www.fujitsu.com/downloads/SUPER/topics/isc24/next-arm-based-processor-fujitsu-monaka-and-its-software-ecosystem.pdf Bootstrapped/regtested on aarch64-unknown-linux-gnu.

Re: [PATCH v3] [aarch64] Fix function multiversioning dispatcher link error with LTO

2024-10-30 Thread Richard Sandiford
Yangyu Chen writes: > We forgot to apply DECL_EXTERNAL to __init_cpu_features_resolver decl. When > building with LTO, the linker cannot find the > __init_cpu_features_resolver.lto_priv* symbol, causing the link error. > > This patch gets this fixed by adding DECL_EXTERNAL to the decl. To avoid us

[PATCH v2] Doc: Add doc for standard name mask_len_strided_load{store}m

2024-10-30 Thread pan2 . li
From: Pan Li This patch would like to add doc for the below 2 standard names. 1. strided load: v = mask_len_strided_load (ptr, stried, mask, len, bias) 2. strided store: mask_len_stried_store (ptr, stride, v, mask, len, bias) gcc/ChangeLog: * doc/md.texi: Add doc for mask_len_stried_lo

Re: [pushed: r15-4760] diagnostics: support multiple output formats simultaneously [PR116613]

2024-10-30 Thread Jonathan Wakely
On 29/10/24 19:19 -0400, David Malcolm wrote: This patch generalizes diagnostic_context so that rather than having a single output format, it has a vector of zero or more. [snip] +/* Class for parsing the arguments of -fdiagnostics-add-output= and + -fdiagnostics-set-output=, and making dia

[PATCH v2 9/9] aarch64: Handle alignment when it is bigger than BIGGEST_ALIGNMENT

2024-10-30 Thread Evgeny Karpov
Tuesday, October 29, 2024 Richard Sandiford wrote: > Hmm, I see. I think this is surprising enough that it would be worth > a comment. How about: > > /* Since the assembly directive only specifies a size, and not an > alignment, we need to follow the default ASM_OUTPUT_LOCAL behavior >

RE: [PATCH v1] Doc: Add doc for standard name mask_len_strided_load{store}m

2024-10-30 Thread Li, Pan2
>> +Load several separate memory locations into a destination vector of mode >> @var{m}. >> +Operand 0 is a destination vector of mode @var{m}. >> +Operand 1 is a scalar base address and operand 2 is a scalar stride of >> Pmode. >> +operand 3 is mask operand, operand 4 is length operand and opera

[PATCH] c++: Fix ICE on constexpr virtual function [PR117317]

2024-10-30 Thread Jakub Jelinek
Hi! Since C++20 virtual methods can be constexpr, and if they are constexpr evaluated, we choose tentative_decl_linkage for those defer their output and decide at_eof again. On the following testcases we ICE though, because if expand_or_defer_fn_1 decides to use tentative_decl_linkage, it returns

[PATCH] c: Diagnose char argument to __builtin_stdc_*

2024-10-30 Thread Jakub Jelinek
Hi! When working on __builtin_stdc_rotate_*, I've noticed that while the second argument to those is explicitly allowed to have char type, the first argument to all the stdc_* type-generic functions is - standard unsigned integer type, excluding bool; - extended unsigned integer type; - or, bit-pr

[PATCH v3 2/2][RFC] Add debugging for move history.

2024-10-30 Thread Qing Zhao
gcc/ChangeLog: * diagnostic-move-history.cc (dump_move_history): New routine. (dump_move_history_for): Likewise. (debug_mv_h): Likewise. * diagnostic-move-history.h (dump_move_history): New prototype. (dump_move_history_for): Likewise. * gimple-ssa-i

[PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Qing Zhao
Control this with a new option -fdiagnostics-details. $ cat t.c extern void warn(void); static inline void assign(int val, int *regs, int *index) { if (*index >= 4) warn(); *regs = val; } struct nums {int vals[4];}; void sparx5_set (int *ptr, struct nums *sg, int index) { int *val = &sg

Re: [PATCH v4] [aarch64] Fix function multiversioning dispatcher link error with LTO

2024-10-30 Thread Richard Sandiford
Yangyu Chen writes: > We forgot to apply DECL_EXTERNAL to __init_cpu_features_resolver decl. When > building with LTO, the linker cannot find the > __init_cpu_features_resolver.lto_priv* symbol, causing the link error. > > This patch gets this fixed by adding DECL_EXTERNAL to the decl. To avoid us

Re: [PATCH v3 1/2][RFC] Provide more contexts for -Warray-bounds, -Wstringop-* warning messages due to code movements from compiler transformation [PR109071]

2024-10-30 Thread Sam James
Qing Zhao writes: > Control this with a new option -fdiagnostics-details. > > [...] The patch doesn't apply for me on very latest trunk -- I think David's recent diag refactoring means it needs a slight rebase. Could you send that?

[PATCH v2 9/9] aarch64: Handle alignment when it is bigger than BIGGEST_ALIGNMENT

2024-10-30 Thread Evgeny Karpov
> Symbols in the object file also look good. > > 015 SECT2 notype External | large_aligned_array > 016 0010 SECT2 notype External | large_aligned_array2 > 017 0020 SECT2 notype External | large_aligned_array3 > 018 0040 SECT2 notype Exte

  1   2   >