Re: [PATCH 1/2] expand: Small speed up expansion of __builtin_prefetch

2024-08-29 Thread Richard Biener
On Fri, Aug 30, 2024 at 1:02 AM Andrew Pinski wrote: > > This is a small speed up of the expansion of __builtin_prefetch. > Basically for the optional arguments, no reason to call expand_normal > on a constant integer that we know the value, just replace it with > GEN_INT/const0_rtx instead. > > B

Re: [PATCH 2/2] middle-end: Remove integer_three_node [PR116537]

2024-08-29 Thread Richard Biener
On Fri, Aug 30, 2024 at 1:02 AM Andrew Pinski wrote: > > After the small expansion patch for __builtin_prefetch, the > only use of integer_three_node is inside tree-ssa-loop-prefetch.cc so let's > remove it as the loop prefetch pass is not enabled these days by default and > having a tree node aro

Re: [PATCH] [x86] Check avx upper register for parallel.

2024-08-29 Thread Uros Bizjak
On Fri, Aug 30, 2024 at 6:49 AM liuhongt wrote: > > > Can the above loop be a part of ix86_check_avx_upper_register, so this > > function would scan the full RTX for avx upper register? > Changed, also adjust ix86_check_avx_upper_stores and ix86_avx_u128_mode_needed > to either inline the old ix86

[PATCH] [x86] Check avx upper register for parallel.

2024-08-29 Thread liuhongt
> Can the above loop be a part of ix86_check_avx_upper_register, so this > function would scan the full RTX for avx upper register? Changed, also adjust ix86_check_avx_upper_stores and ix86_avx_u128_mode_needed to either inline the old ix86_check_avx_upper_register or replace FOR_EACH_SUBRTX with

[PATCH v1 2/2] RISC-V: Add testcases for form 4 of unsigned vector .SAT_ADD IMM

2024-08-29 Thread pan2 . li
From: Pan Li This patch would like to add test cases for the unsigned vector .SAT_ADD when one of the operand is IMM. Form 4: #define DEF_VEC_SAT_U_ADD_IMM_FMT_4(T, IMM) \ T __attribute__((noinline)) \ vec_sat_u_ad

[PATCH v1 1/2] RISC-V: Add testcases for form 3 of unsigned vector .SAT_ADD IMM

2024-08-29 Thread pan2 . li
From: Pan Li This patch would like to add test cases for the unsigned vector .SAT_ADD when one of the operand is IMM. Form 3: #define DEF_VEC_SAT_U_ADD_IMM_FMT_3(T, IMM) \ T __attribute__((noinline)) \ vec_sat_u_add_imm##IMM

Re: [PATCH 3/3] c++/coro: prevent ICV_STATEMENT diagnostics in temp promotion [PR116502]

2024-08-29 Thread Arsen Arsenović
Jason Merrill writes: > On 8/28/24 3:59 PM, Arsen Arsenović wrote: >> Hm, maybe-unused-1.C should be moved into the previous patch. Could do >> before pushing. > > Let's combine these three into a single patch, they're all small and closely > related. Sure, that's fine by me. >> @@ -3147,7 +31

[PATCH] middle-end: also optimized `popcount(a) <= 1` [PR90693]

2024-08-29 Thread Andrew Pinski
This expands on optimizing `popcount(a) == 1` to also handle `popcount(a) <= 1`. `<= 1` can be expanded as `(a & -a) == 0` like what is done for `== 1` if we know that a was nonzero. We have to do the optimization in 2 places due to if we have an optab entry for popcount or not. Built and tested f

[PATCH 1/2] expand: Small speed up expansion of __builtin_prefetch

2024-08-29 Thread Andrew Pinski
This is a small speed up of the expansion of __builtin_prefetch. Basically for the optional arguments, no reason to call expand_normal on a constant integer that we know the value, just replace it with GEN_INT/const0_rtx instead. Bootstrapped and tested on x86_64-linux. gcc/ChangeLog: *

[PATCH 2/2] middle-end: Remove integer_three_node [PR116537]

2024-08-29 Thread Andrew Pinski
After the small expansion patch for __builtin_prefetch, the only use of integer_three_node is inside tree-ssa-loop-prefetch.cc so let's remove it as the loop prefetch pass is not enabled these days by default and having a tree node around just for that pass is a little wasteful. Integer constants a

[pushed 3/4] pretty-print: reimplement pp_format with a new struct pp_token

2024-08-29 Thread David Malcolm
The following patch rewrites the internals of pp_format. A pretty_printer's output_buffer maintains a stack of chunk_info instances, each one responsible for handling a call to pp_format, where having a stack allows us to support re-entrant calls to pp_format on the same pretty_printer. Previousl

[pushed 4/4] SARIF output: implement embedded URLs in messages (§3.11.6; PR other/116419)

2024-08-29 Thread David Malcolm
GCC diagnostic messages can contain URLs, such as to our documentation when we suggest an option name to correct a misspelling. SARIF message strings can contain embedded URLs in the plain text messages (see SARIF v2.1.0 §3.11.6), but previously we were simply dropping any URLs from the diagnostic

[pushed 1/4] Use std::unique_ptr for optinfo_item

2024-08-29 Thread David Malcolm
As preliminary work towards an overhaul of how optinfo_items interact with dump_pretty_printer, replace uses of optinfo_item * with std::unique_ptr to make ownership clearer. No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Successfully built stage1 cc

[pushed 2/4] pretty-print: move class chunk_info into its own header

2024-08-29 Thread David Malcolm
No functional change intended. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r15-3310-g68a0ca66972a06. gcc/cp/ChangeLog: * error.cc: Include "pretty-print-format-impl.h". gcc/ChangeLog: * dumpfile.cc: Include "pretty-print-format-impl.h".

Re: [PATCH v5] Target-independent store forwarding avoidance.

2024-08-29 Thread Jeff Law
On 8/29/24 12:16 PM, Richard Sandiford wrote: Most passes were written while the codebase was still C. I think newer passes have generally been written in the way I described. Where possible, it'd be better for new code to avoid using globals to communicate information between functions, to

[PATCH] Fortran: default-initialization of derived-type function results [PR98454]

2024-08-29 Thread Harald Anlauf
Dear all, the attached, rather simple patch adds the missing default-initialization of non-pointer, non-allocatable derived-type function results. Regtested ok on x86_64-pc-linux-gnu, but needed two adjustments in the testsuite. One of them is easily explained by the fix, but the other one to gf

[PATCH] c++: mutable temps in rodata [PR116369]

2024-08-29 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14/13? -- >8 -- Here we wrongly mark the reference temporary for g TREE_READONLY, so it's put in .rodata and so we can't modify its subobject even when the subobject is marked mutable. This is so since r9-869. r14-1785 fixed a similar pr

Re: [PATCH, pushed] Fortran: fix ICE with use with rename of namelist member [PR116530]

2024-08-29 Thread Harald Anlauf
Hi Steve, Am 29.08.24 um 21:53 schrieb Steve Kargl: Thanks for the patch. If you have not already opened a new PR for the other issue with C8107, I'll open one later today. It's likely that we need to check the namelist-group-name for USE association in match.cc:gfc_match_namelist. Hmmm, it s

Re: [PATCH, pushed] Fortran: fix ICE with use with rename of namelist member [PR116530]

2024-08-29 Thread Steve Kargl
Thanks for the patch. If you have not already opened a new PR for the other issue with C8107, I'll open one later today. It's likely that we need to check the namelist-group-name for USE association in match.cc:gfc_match_namelist. Hmmm, it seems we already catch the error, but accept it as an ex

[PATCH, pushed] Fortran: fix ICE with use with rename of namelist member [PR116530]

2024-08-29 Thread Harald Anlauf
Dear all, the attached simple & obvious patch fixes a NULL pointer dereference when USEing with rename a namelist member and reading/writing the namelist. Patch was OK'ed in the PR by Steve and is pushed to mainline as: r15-3308-g6bfeba12c86b4d0dae27d99b484f64774dd49398 As this is a 14/15 regre

Re: [committed] hppa: Fix handling of unscaled index addresses on HP-UX

2024-08-29 Thread Jeff Law
On 8/29/24 10:13 AM, John David Anglin wrote: Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix handling of unscaled index addresses on HP-UX The PA-RISC architecture uses the top two bits of memory pointers to select space registers. The spac

[PATCH v2] c++, coroutines: Rework the ramp codegen.

2024-08-29 Thread Iain Sandoe
Hi Jason, >>- char *buf = xasprintf ("_Coro_unnamed_parm_%d", no_name_parm++); >>+ char *buf = xasprintf ("anon%d", parm_num); >Why the reduction in verbosity here? I was getting ahead of myself; not intended in this patch. Fixed. >>+ p = pushdecl_outermost_localscope (p); >>+ add

Re: [PATCH v5] Target-independent store forwarding avoidance.

2024-08-29 Thread Richard Sandiford
Manolis Tsamis writes: > On Fri, Aug 16, 2024 at 5:33 PM Richard Sandiford > wrote: >> Manolis Tsamis writes: >> > +} >> > + >> > + virtual unsigned int execute (function *) override; >> > +}; // class pass_rtl_avoid_store_forwarding >> > + >> > +static unsigned int stats_sf_detected = 0; >

[patch] Fortran: Add OpenMP 'interop' directive parsing support

2024-08-29 Thread Tobias Burnus
This patch adds Fortran parsing support for OpenMP's 'interop' directive (which stops with a 'sorry' in trans-openmp.cc as the middle end support is still missing). Tested on x86-64-gnu-linux. Comments, suggestions, remarks? * * * Background: 'interop' makes it easier to call, e.g., a CUDA-

Re: [PATCH] c++, coroutines: Rework the ramp codegen.

2024-08-29 Thread Jason Merrill
On 8/29/24 11:21 AM, Iain Sandoe wrote: This will help with the patches to follow for revising the frame layout when we have an entry with excess alignment. Tested on x86_64 darwin/linux powerpc64le linux, OK for trunk? thanks Iain --- 8< --- Now that we have separated the codegen of the ramp,

Re: [PING] [PATCH V3 09/10] c6x: Adjust dot-product backend patterns

2024-08-29 Thread Richard Sandiford
Victor Do Nascimento writes: > Hello, > > Gentle reminder for this simple renaming patch :) OK, thanks. Richard > Thanks, > Victor > > On 8/15/24 09:44, Victor Do Nascimento wrote: >> Following the migration of the dot_prod optab from a direct to a >> conversion-type optab, ensure all back-end

Re: [PING] [PATCH V3 06/10] arc: Adjust dot-product backend patterns

2024-08-29 Thread Richard Sandiford
Victor Do Nascimento writes: > Hello, > > Gentle reminder for this simple renaming patch :) OK, thanks. Richard > Thanks, > Victor > > On 8/15/24 09:44, Victor Do Nascimento wrote: >> Following the migration of the dot_prod optab from a direct to a >> conversion-type optab, ensure all back-end

[PATCH] c++: ICE with -Wtautological-compare in template [PR116534]

2024-08-29 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/14? -- >8 -- Pre r14-4793, we'd call warn_tautological_cmp -> operand_equal_p with operands wrapped in NON_DEPENDENT_EXPR, which works, since o_e_p bails for codes it doesn't know. But now we pass operands not encapsulated in NON_DEPENDE

Re: [PATCH] c++, coroutines: Make and use a frame access helper.

2024-08-29 Thread Jason Merrill
On 8/29/24 11:21 AM, Iain Sandoe wrote: In the review of earlier patches it was suggested that we might make use of finish_class_access_expr instead of doing a lookup for the member and then a build_class_access_expr call. finish_class_access_expr does a lot more work than we need and ends up ca

[committed] hppa: Fix handling of unscaled index addresses on HP-UX

2024-08-29 Thread John David Anglin
Tested on hppa-unknown-linux-gnu and hppa64-hp-hpux11.11. Committed to trunk. Dave --- hppa: Fix handling of unscaled index addresses on HP-UX The PA-RISC architecture uses the top two bits of memory pointers to select space registers. The space register ID is ored with the pointer offset to co

Re: [PATCH 3/3] c++/coro: prevent ICV_STATEMENT diagnostics in temp promotion [PR116502]

2024-08-29 Thread Jason Merrill
On 8/28/24 3:59 PM, Arsen Arsenović wrote: Hm, maybe-unused-1.C should be moved into the previous patch. Could do before pushing. Let's combine these three into a single patch, they're all small and closely related. @@ -3147,7 +3147,13 @@ maybe_promote_temps (tree *stmt, void *d)

[PATCH] testsuite: Rename scanltranstree.exp -> scanltrans.exp

2024-08-29 Thread Alex Coplan
Hi, Since r15-3254-g3f51f0dc88ec21c1ec79df694200f10ef85915f4 added scan-ltrans-rtl* variants to scanltranstree.exp, it no longer makes sense to have "tree" in the name. This renames the file accordingly and updates users. Tested on aarch64-linux-gnu, OK for trunk? Thanks, Alex libatomic/Change

[PATCH] c++, coroutines: Fix awaiter var creation [PR116506].

2024-08-29 Thread Iain Sandoe
Tested on x86_64-darwin/linux, powerpc64le linux, OK for trunk? thanks, Iain --- >8 --- Awaiters always need to have a coroutine state frame copy since they persist across potential supensions. It simplifies the later analysis considerably to assign these early which we do when building co_await

[PATCH] c++, coroutines: Rework the ramp codegen.

2024-08-29 Thread Iain Sandoe
This will help with the patches to follow for revising the frame layout when we have an entry with excess alignment. Tested on x86_64 darwin/linux powerpc64le linux, OK for trunk? thanks Iain --- 8< --- Now that we have separated the codegen of the ramp, actor and destroy functions, we no longer

[PATCH] c++, coroutines: Make and use a frame access helper.

2024-08-29 Thread Iain Sandoe
Tested on x86_64 darwin/linux and powerpc64le linux, OK for trunk? thanks, Iain --- 8< --- In the review of earlier patches it was suggested that we might make use of finish_class_access_expr instead of doing a lookup for the member and then a build_class_access_expr call. finish_class_access_ex

Re: [PATCH v1] Provide new GCC builtin __builtin_get_counted_by [PR116016]

2024-08-29 Thread Qing Zhao
Hi, Thanks for the information. Yes, providing a unary operator similar as __counted_by(PTR) as suggested by multiple people previously is a cleaner approach. Then the programmer will use the following: __builtin_choose_expr( __builtin_has_attribute (__p->FAM, "counted_by”)

Re: [PATCH v5] Target-independent store forwarding avoidance.

2024-08-29 Thread Manolis Tsamis
Hi Richard, Thanks a lot for the extensive review and useful suggestions (and sorry for the late reply). I have implemented most of these for a next version, so let me address your individual comments below: On Fri, Aug 16, 2024 at 5:33 PM Richard Sandiford wrote: > > Manolis Tsamis writes: > >

[PATCH 4/4] RISC-V: Re-implement SLP single-lane rediscovery for SLP

2024-08-29 Thread Richard Biener
This re-implements scrapping of SLP in case load/store-lanes is possible to be used as re-discovering the SLP instance with forced single-lane splits so SLP load/store-lanes scheme can be used. This is now done after SLP discovery and SLP pattern recog are complete to not disturb the latter but pe

[PATCH 3/4] Do not cancel SLP because of load/store-lanes from loop analysis

2024-08-29 Thread Richard Biener
The following removes the code cancelling SLP if we can use load/store-lanes from the main loop vector analysis code. * tree-vect-loop.cc (vect_analyze_loop_2): Do not cancel SLP when store-lanes can be used. --- gcc/tree-vect-loop.cc | 76 -

[PATCH 2/4] load and store-lanes with SLP

2024-08-29 Thread Richard Biener
The following is a prototype for how to represent load/store-lanes within SLP. I've for now settled with having a single load node with multiple permute nodes acting as selection, one for each loaded lane and a single store node fed from all stored lanes. For for (int i = 0; i < 1024; ++i)

[PATCH 1/4] lower SLP load permutation to interleaving

2024-08-29 Thread Richard Biener
The following emulates classical interleaving for SLP load permutes that we are unlikely handling natively. This is to handle cases where interleaving (or load/store-lanes) is the optimal choice for vectorizing even when we are doing that within SLP. An example would be void foo (int * __restric

[COMMITTED 13/17] ada: Print Insertion_Sloc in dmsg

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ * erroutc.adb (dmsg): Print Insertion_Sloc. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/erroutc.adb | 5 + 1 file changed, 5 insertions(+) diff --git a/gcc/ada/erroutc.adb b/gcc/ada/erroutc.adb index 4e0a9f26e0d..db1c0923e90 100644

[COMMITTED 11/17] ada: Restructure continuation message for pretty printing

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus Continuation messages should have the same location as the main message. If the goal is to point to a different location then Error_Msg_Sloc should be used to change the location of the continuation message. gcc/ada/ * par-ch4.adb (P_Name): Use Error_Msg_Sloc for the

[COMMITTED 08/17] ada: Parse the attributes of continuation messages correctly

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus Currently unless pretty printing is enabled we avoid parsing the message strings for continuation messages. This leads to inconsistent state for the Error_Msg_Object-s that are being created. gcc/ada/ * erroutc.adb (Prescan_Message): Avoid not parsing all of the

[COMMITTED 16/17] ada: Fix internal error on concatenation of discriminant-dependent component

2024-08-29 Thread Marc Poulhiès
From: Eric Botcazou This only occurs with optimization enabled, but the expanded code is always wrong because it reuses the formal parameter of an initialization procedure associated with a discriminant (a discriminal in GNAT parlance) outside of the initialization procedure. gcc/ada/ *

[COMMITTED 17/17] ada: Fix assertion failure on private limited with clause

2024-08-29 Thread Marc Poulhiès
From: Eric Botcazou This checks that the name is of an entity before accessing its Entity field. gcc/ada/ * sem_ch8.adb (Has_Private_With): Add test on Is_Entity_Name. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_ch8.adb | 1 + 1 file changed, 1 insertion(+) d

[COMMITTED 07/17] ada: Use consistent type continuations messages

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus Avoid cases where the main message is an error and the continuation is a warning. gcc/ada/ * freeze.adb: Remove warning insertion characters from a continuation message. * sem_util.adb: Remove warning insertion characters from a continuation me

[COMMITTED 10/17] ada: Improve Inspection_Point warning

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus Ensure that the primary and sub message point to the same location in order to assure that the submessages get pretty printed in the correct order. gcc/ada/ * exp_prag.adb (Expand_Pragma_Inspection_Point): Improve sub diagnostic generation. Tested on x86_64-p

[COMMITTED 14/17] ada: Fix missing finalization for call to function returning limited view

2024-08-29 Thread Marc Poulhiès
From: Eric Botcazou The call is legal because it is made from the body, which has visibility on the nonlimited view, so this changes the code in Expand_Call_Helper to look at the Etype of the call node instead of the Etype of the function. gcc/ada/ * exp_ch6.adb (Expand_Call_Helper): In

[COMMITTED 15/17] ada: Missing legality check when type completed

2024-08-29 Thread Marc Poulhiès
From: Steve Baird Refine previous fix to better handle tagged cases. gcc/ada/ * sem_ch6.adb (Check_Discriminant_Conformance): Immediately after calling Is_Immutably_Limited_Type, perform an additional test that one might reasonably imagine would instead have been part of

[COMMITTED 06/17] ada: Extract line fitting algorithm

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus Separate the line fitting algorithm from the general line printing algorithm. gcc/ada/ * erroutc.ads: Add new method Output_Text_Within * erroutc.adb: Move the line fitting code to a new method called Output_Text_Within Tested on x86_64-pc-linux-gnu,

[COMMITTED 02/17] ada: First controlling parameter aspect

2024-08-29 Thread Marc Poulhiès
From: Javier Miranda gcc/ada/ * usage.adb (Usage): Document switch -gnatw_j * doc/gnat_rm/gnat_language_extensions.rst: Add documentation. * gnat_rm.texi: Regenerate. Tested on x86_64-pc-linux-gnu, committed on master. --- .../doc/gnat_rm/gnat_language_extensions.rst

[COMMITTED 12/17] ada: Use the same warning character in continuation messages

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus For consitency sake the main and continuation messages should use the same warning characters. gcc/ada/ * exp_aggr.adb (Expand_Range_Component): Remove extra warning character. Use same conditional warning char. * freeze.adb (Warn_Overlay): Use named w

[COMMITTED 04/17] ada: Display actual line length in line length check

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus gcc/ada/ * styleg.adb (Check_Line_Max_Length): Add the actual line length to the diagnostic message. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/styleg.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/ada/sty

[COMMITTED 09/17] ada: Avoid creating continuation messages without an intended parent

2024-08-29 Thread Marc Poulhiès
From: Viljar Indus The messages modified in this patch do not have a clear intended parent. This causes a lot of issues when grouping continuation messages together with their parent. This can be confusing as it is not obvious what was the parent message that caused this problem or in worst case

[COMMITTED 05/17] ada: Ensure validity checks for private scalar types

2024-08-29 Thread Marc Poulhiès
From: Piotr Trojanek To check validity of data values, we must strip privacy from their types. gcc/ada/ * checks.adb (Expr_Known_Valid): Use Validated_View, which strips type derivation and privacy. * exp_ch3.adb (Simple_Init_Private_Type): Kill checks inside unc

[COMMITTED 01/17] ada: Update documentation for conditional when constructs

2024-08-29 Thread Marc Poulhiès
From: Justin Squirek This patch moves the documentation for conditional when constructs out of the curated set (e.g. into -gnatX0). gcc/ada/ * doc/gnat_rm/gnat_language_extensions.rst: Move conditional when constructs out of the curated set. * gnat_rm.texi: Regenerate.

[COMMITTED 03/17] ada: Proper handling for iterator associations in array aggregates

2024-08-29 Thread Marc Poulhiès
From: Gary Dismukes The compiler was flagging type-mismatch errors on iterated component associations in array aggregates of form "for C in ", improperly requiring the type of the iterator to be the array index type. The parser can't distinguish whether the association is one involving an actual

[PATCH 2/2] RISC-V: load and store-lanes with SLP

2024-08-29 Thread Richard Biener
The following is a prototype for how to represent load/store-lanes within SLP. I've for now settled with having a single load node with multiple permute nodes acting as selection, one for each loaded lane and a single store node fed from all stored lanes. For for (int i = 0; i < 1024; ++i)

[PATCH 1/2] lower SLP load permutation to interleaving

2024-08-29 Thread Richard Biener
The following emulates classical interleaving for SLP load permutes that we are unlikely handling natively. This is to handle cases where interleaving (or load/store-lanes) is the optimal choice for vectorizing even when we are doing that within SLP. An example would be void foo (int * __restric

Re: [PATCH v2 2/5] testsuite: Add scan-ltrans-rtl* for use in dg-final [PR116140]

2024-08-29 Thread Alex Coplan
On 28/08/2024 18:34, Andrew Pinski wrote: > On Wed, Aug 28, 2024 at 4:05 AM Alex Coplan wrote: > > > > On 28/08/2024 11:53, Richard Sandiford wrote: > > > Alex Coplan writes: > > > > Hi, > > > > > > > > This is a v2 of: > > > > https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659966.html > >

Re: [ping^2,patch,avr,v2] PR115830: Make better use of SREG

2024-08-29 Thread Georg-Johann Lay
Am 29.08.24 um 12:18 schrieb Denis Chertykov: чт, 29 авг. 2024 г. в 12:42, Georg-Johann Lay : Ping #2 for the patch to make better use of SREG, and some code clean-ups for trunk. No new regressions. #0 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659422.html #1 https://gcc.gnu.org

[committed] testsuite: Fix up refactored scanltranstree.exp functions [PR116522]

2024-08-29 Thread Alex Coplan
When adding RTL variants of the scan-ltrans-tree* functions in: r15-3254-g3f51f0dc88ec21c1ec79df694200f10ef85915f4 I messed up the name of the underlying scan function to invoke. The code currently attempts to invoke functions named scan{,-not,-dem,-dem-not} but should instead be invoking scan-dum

Re: [PATCH v6 1/2] aarch64: Add AdvSIMD faminmax intrinsics

2024-08-29 Thread Richard Sandiford
Kyrylo Tkachov writes: > Hi Saurabh, > >> On 29 Aug 2024, at 09:51, saurabh@arm.com wrote: >> >> External email: Use caution opening links or attachments >> >> >> The AArch64 FEAT_FAMINMAX extension is optional from Armv9.2-a and >> mandatory from Armv9.5-a. It introduces instructions for c

Re: [ping^2,patch,avr,v2] PR115830: Make better use of SREG

2024-08-29 Thread Denis Chertykov
чт, 29 авг. 2024 г. в 12:42, Georg-Johann Lay : > > Ping #2 for the patch to make better use of SREG, and some > code clean-ups for trunk. No new regressions. > > #0 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659422.html > #1 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660743.

Re: [patch,avr] Move pass related code to avr-passes.cc

2024-08-29 Thread Denis Chertykov
чт, 29 авг. 2024 г. в 12:22, Georg-Johann Lay : > This patch adds a new C++ module avr-passes.cc for the avr-specific > passes. > > There are currently 5 avr-specific passes, and since avr.cc has > gotten fat, this patch moves the respective classes and support > functions to avr-passes.cc. > > Co

Re: [PATCH] libstdc++: Add missing feature-test macro in various headers

2024-08-29 Thread Jonathan Wakely
On Thu, 29 Aug 2024 at 09:12, Dhruv Chawla wrote: > > On 28/08/24 15:40, Jonathan Wakely wrote: > > External email: Use caution opening links or attachments > > > > > > On Wed, 28 Aug 2024 at 06:47, Dhruv Chawla wrote: > >> > >> version.syn#2 requires to define > >> __cpp_lib_allocator_traits_is

Re: [PATCH] Allow subregs around constant displacements [PR116516]

2024-08-29 Thread Richard Biener
On Thu, Aug 29, 2024 at 8:51 AM Richard Sandiford wrote: > > This patch fixes a regression introduced by g:708ee71808ea61758e73. > x86_64 allows addresses of the form: > > (zero_extend:DI (subreg:SI (symbol_ref:DI "foo") 0)) > > Before the previous patch, a lax SUBREG check meant that we would >

Re: [PATCH] expand: Allow widdening optab when expanding popcount==1 [PR116508]

2024-08-29 Thread Richard Biener
On Thu, Aug 29, 2024 at 3:37 AM Andrew Pinski wrote: > > After adding popcount{qi,hi}2 to the aarch64 backend, I noticed that > the expansion for popcount==1 was no longer trying to do the trick > of handling popcount==1 as `(arg ^ (arg - 1)) > arg - 1`. The problem > is the expansion was using OP

Re: [PATCH v6 1/2] aarch64: Add AdvSIMD faminmax intrinsics

2024-08-29 Thread Kyrylo Tkachov
Hi Saurabh, > On 29 Aug 2024, at 09:51, saurabh@arm.com wrote: > > External email: Use caution opening links or attachments > > > The AArch64 FEAT_FAMINMAX extension is optional from Armv9.2-a and > mandatory from Armv9.5-a. It introduces instructions for computing the > floating point abso

Re: [PATCH] Rename gimple_asm_input_p to gimple_asm_basic_p

2024-08-29 Thread Richard Biener
On Wed, Aug 28, 2024 at 4:50 PM Richard Sandiford wrote: > > Following on from the earlier tree rename, this patch renames > gimple_asm_input_p to gimple_asm_basic_p, and similarly for > related names. > > Tested on aarch64-linux-gnu. OK to install? OK. Richard. > Richard > > > gcc/ >

Re: [PATCH] Rename ASM_INPUT_P to ASM_BASIC_P

2024-08-29 Thread Richard Biener
On Wed, Aug 28, 2024 at 4:47 PM Richard Sandiford wrote: > > ASM_INPUT_P is so named because it causes the eventual rtl insn > pattern to be a top-level ASM_INPUT rather than an ASM_OPERANDS. > However, this name has caused confusion, partly due to earlier > documentation. The name also sounds re

Re: [PATCH] RISC-V: Fix subreg of VLS modes larger than a vector [PR116086].

2024-08-29 Thread Richard Biener
On Wed, Aug 28, 2024 at 4:39 PM Robin Dapp wrote: > > > On Wed, Aug 28, 2024 at 3:21 PM Robin Dapp wrote: > > > > > > > Hmm - but how can you call this ambiguous? VLEN and LMUL is a runtime > > > > property(?), so unknown to the compiler(?) - as you do below the only > > > > way to code generate

Re: [PATCH] [x86] Check avx upper register for parallel.

2024-08-29 Thread Uros Bizjak
On Thu, Aug 29, 2024 at 9:33 AM liuhongt wrote: > > For function arguments/return, when it's BLK mode, it's put in a > parallel with an expr_list, and the expr_list contains the real mode > and registers. > Current ix86_check_avx_upper_register only checked for SSE_REG_P, and > failed to handle th

[ping^2,patch,avr,v2] PR115830: Make better use of SREG

2024-08-29 Thread Georg-Johann Lay
Ping #2 for the patch to make better use of SREG, and some code clean-ups for trunk. No new regressions. #0 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/659422.html #1 https://gcc.gnu.org/pipermail/gcc-patches/2024-August/660743.html Johann -- AVR: target/115830 - Make better use of

[PATCH v2 1/2] RISC-V: Add testcases for unsigned scalar quad and oct .SAT_TRUNC form 2

2024-08-29 Thread pan2 . li
From: Pan Li This patch would like to add test cases for the unsigned scalar quad and oct .SAT_TRUNC form 2. Aka: Form 2: #define DEF_SAT_U_TRUC_FMT_2(NT, WT) \ NT __attribute__((noinline)) \ sat_u_truc_##WT##_to_##NT##_fmt_2 (WT x) \ {

[PATCH v2 2/2] RISC-V: Add testcases for unsigned scalar quad and oct .SAT_TRUNC form 3

2024-08-29 Thread pan2 . li
From: Pan Li This patch would like to add test cases for the unsigned scalar quad and oct .SAT_TRUNC form 3. Aka: Form 3: #define DEF_SAT_U_TRUC_FMT_3(NT, WT) \ NT __attribute__((noinline)) \ sat_u_truc_##WT##_to_##NT##_fmt_3 (WT x) \ {

[PATCH] libstdc++: Add missing feature-test macro in various headers

2024-08-29 Thread Dhruv Chawla
On 28/08/24 15:40, Jonathan Wakely wrote: External email: Use caution opening links or attachments On Wed, 28 Aug 2024 at 06:47, Dhruv Chawla wrote: version.syn#2 requires to define __cpp_lib_allocator_traits_is_always_equal. The attached patch therefore defines the __glibcxx_want_allocato

Re: [PATCH] Make some smallest_int_mode_for_size calls cope with failure

2024-08-29 Thread Richard Biener
On Wed, Aug 28, 2024 at 4:35 PM Richard Sandiford wrote: > > smallest_int_mode_for_size now returns an optional mode rather > than aborting on failure. This patch adjusts a couple of callers > so that they fail gracefully when no mode exists. > > There should be no behavioural change, since anyth

[PATCH v6 2/2] aarch64: Add codegen support for AdvSIMD faminmax

2024-08-29 Thread saurabh.jha
The AArch64 FEAT_FAMINMAX extension is optional from Armv9.2-a and mandatory from Armv9.5-a. It introduces instructions for computing the floating point absolute maximum and minimum of the two vectors element-wise. This patch adds code generation support for famax and famin in terms of existing R

[PATCH v6 1/2] aarch64: Add AdvSIMD faminmax intrinsics

2024-08-29 Thread saurabh.jha
The AArch64 FEAT_FAMINMAX extension is optional from Armv9.2-a and mandatory from Armv9.5-a. It introduces instructions for computing the floating point absolute maximum and minimum of the two vectors element-wise. This patch introduces AdvSIMD faminmax intrinsics. The intrinsics of this extensio

[PATCH v6 0/2] aarch64: Add support for AdvSIMD faminmax

2024-08-29 Thread saurabh.jha
From: Saurabh Jha This patch series is a respin of https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661672.html. The new version addresses comment about using AARCH64_PRAGMA_BUILTIN_START and AARCH64_PRAGMA_BUILTIN_END in aarch64_builtins enum. Apart from the function expand_pragma_builtin

[PATCH] [x86] Check avx upper register for parallel.

2024-08-29 Thread liuhongt
For function arguments/return, when it's BLK mode, it's put in a parallel with an expr_list, and the expr_list contains the real mode and registers. Current ix86_check_avx_upper_register only checked for SSE_REG_P, and failed to handle that. The patch extend the handle to each subrtx. Bootstrapped

Re: [PATCH v2] match: Fix A || B not optimized to true when !B implies A [PR114326]

2024-08-29 Thread Konstantinos Eleftheriou
Thanks for the feedback. Indeed, the first pattern should apply to non-constants too and some comments were misleading. I have sent a new version ( https://gcc.gnu.org/pipermail/gcc-patches/2024-August/661754.html). On Thu, Aug 22, 2024 at 3:56 PM Richard Biener wrote: > On Fri, Aug 16, 2024 at

[PATCH v3] match: Fix A || B not optimized to true when !B implies A [PR114326]

2024-08-29 Thread konstantinos . eleftheriou
From: kelefth In expressions like (a != b || ((a ^ b) & c) == d) and (a != b || (a ^ b) == c), (a ^ b) is folded to false. In the equivalent expressions (((a ^ b) & c) == d || a != b) and ((a ^ b) == c || a != b) this is not happening. This patch adds the following simplifications in match.pd: (