Re: [PATCH] c-family: Introduce the -Winvalid-noreturn flag from clang with extra tuneability

2024-06-10 Thread Julian Waters
Hi Jason, Thanks for the reply. I'm a little bit overwhelmed with university at the moment, would it be ok if I delay implementing this a little bit? best regards, Julian On Tue, Jun 4, 2024 at 1:04 AM Jason Merrill wrote: > > On 6/1/24 11:31, Julian Waters wrote: > > Hi Jason, > > > > Thanks f

Re: [Patch, fortran] PR59104

2024-06-10 Thread Andre Vehreschild
Hi Paul, while looking at your patch I see calls to gfc_add_init_cleanup (..., back), while the function signature is gfc_add_init_cleanup (..., bool front). This slightly confuses me. I would at least expect to see gfc_add_init_cleanup(..., !back) calls. Just to get the semantics right. Then I w

[x86 PATCH] PR target/115397: AVX512 ternlog vs. -m32 -fPIC constant pool.

2024-06-10 Thread Roger Sayle
This patch fixes PR target/115397, a recent regression caused by my ternlog patch that results in an ICE (building numpy) with -m32 -fPIC. The problem is that ix86_broadcast_from_constant, which calls get_pool_constant, doesn't handle the UNSPEC_GOTOFF that's created by calling validize_mem when u

[PATCH] vect: Merge loop mask and cond_op mask in fold-left, reduction.

2024-06-10 Thread Robin Dapp
Hi, currently we discard the cond-op mask when the loop is fully masked which causes wrong code in gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c when compiled with -O3 -march=cascadelake --param vect-partial-vector-usage=2. This patch ANDs both masks instead. Bootstrapped and regtested on

Re: [PATCH] aarch64: Improve popcount for bytes [PR113042]

2024-06-10 Thread Kyrylo Tkachov
Hi Andrew -Original Message- From: Andrew Pinski mailto:quic_apin...@quicinc.com>> Date: Monday, 10 June 2024 at 06:05 To: "gcc-patches@gcc.gnu.org " mailto:gcc-patches@gcc.gnu.org>> Cc: Andrew Pinski mailto:quic_apin...@quicinc.com>> Subject: [PATCH] aarc

Re: [Patch, PR Fortran/90072] Polymorphic Dispatch to Polymophic Return Type Memory Leak

2024-06-10 Thread Andre Vehreschild
Hi Tobias, I know about PRIF and was involved in the design of Caffeine. Unfortunately did this intersect with the funding proposal and we did not want to overload the proposal more. At the moment adding module support to dist. mem. coarrays means OpenCoarrays patching, yes. In the unlikely event,

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Robin Dapp
> But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0? > > target = (a == b) ? x : y > target = (a != b) ? y : x > > Are equivalent, even for IEEE IIRC. Yes, that should be fine. My concern was not that we do a canonicalization but that we might not do it for some of the vecto

[PATCH] internal-fn: Force to reg if operand doesn't match.

2024-06-10 Thread Robin Dapp
Hi, despite looking good on cfarm185 and Linaro's pre-commit CI gcc-15-638-g7ca35f2e430 now appears to have caused several regressions on arm-eabi cortex-m55 as found by Linaro's CI: https://linaro.atlassian.net/browse/GNU-1252 I'm assuming this target is not tested as regularly and thus the fai

Re: [PATCH] vect: Merge loop mask and cond_op mask in fold-left, reduction.

2024-06-10 Thread Robin Dapp
Just realized I missed the PR115382 tag in the patch... Regards Robin

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

2024-06-10 Thread Manolis Tsamis
On Sat, Jun 8, 2024 at 1:31 AM Jeff Law wrote: > > > > On 6/6/24 4:10 AM, Manolis Tsamis wrote: > > This pass detects cases of expensive store forwarding and tries to avoid > > them > > by reordering the stores and using suitable bit insertion sequences. > > For example it can transform this: > >

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

2024-06-10 Thread Manolis Tsamis
On Sun, Jun 9, 2024 at 5:29 PM Jeff Law wrote: > > > > On 6/7/24 4:31 PM, Jeff Law wrote: > > > > > I've actually added it to my tester just to see if there's any fallout. > > It'll take a week to churn through the long running targets that > > bootstrap in QEMU, but the crosses should have data M

[Committed] IBM Z: Fix ICE in expand_perm_as_replicate

2024-06-10 Thread Andreas Krebbel
The current implementation assumes to always be invoked with register operands. For memory operands we even have an instruction though (vlrep). With the patch we try this first and only if it fails force the input into a register and continue. vec_splats generation fails for single element 128bit

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Richard Sandiford
Ajit Agarwal writes: > + > + rtx set = single_set (insn); > + if (set == NULL_RTX) > + return false; > + > + rtx op0 = SET_SRC (set); > + rtx_code code = GET_CODE (op0); > + > + // This ch

Re: [_Hashtable] Optimize destructor

2024-06-10 Thread Jonathan Wakely
On Mon, 10 Jun 2024 at 05:38, François Dumont wrote: > > Hi > > libstdc++: [_Hashtable] Optimize destructor > > Hashtable destructor do not need to call clear() method that in addition to > destroying all nodes also reset all buckets to nullptr. > > libstdc++-v3/ChangeLog: > > * include/bits/

Re: [_Hashtable] Optimize destructor

2024-06-10 Thread Jonathan Wakely
On Mon, 10 Jun 2024 at 09:52, Jonathan Wakely wrote: > > On Mon, 10 Jun 2024 at 05:38, François Dumont wrote: > > > > Hi > > > > libstdc++: [_Hashtable] Optimize destructor > > > > Hashtable destructor do not need to call clear() method that in addition to > > destroying all nodes also reset all

[COMMITTED 01/30] ada: Refactor checks for Refined_Global in generic instances

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_prag.adb (Check_In_Out_States, Check_Input_States, Check_Output_States, Check_Proof_In_States, Check_Refined_Global_List, Report_Extra_Constituents, Report_Missing_Items): Remove multiple

[COMMITTED 02/30] ada: Refactor checks for Refined_Depends in generic instances

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_prag.adb (Check_Dependency_Clause, Check_Output_States, Report_Extra_Clauses): Remove multiple checks for being inside an instance. (Analyze_Refined_Depends_In_Decl_Part): Add single check

[COMMITTED 06/30] ada: Refactor common code for dynamic and static class-wide preconditions

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * exp_ch6.adb (Install_Class_Preconditions_Check): Refactor common code for checking if precondition fails, since the difference is only in raising an exception or calling the Raise_Assert_Failu

[COMMITTED 11/30] ada: Adjust comments and doc about the new use of restriction No_Streams

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Extend code comment; move recently added documentation from pragma No_Tagged_Streams to restriction No_Streams. gcc/ada/ * doc/gnat_rm/implementation_defined_pragmas.rst (No_Tagged_Streams): Move documentation. * doc/gnat_rm/standard_and_implementati

[COMMITTED 07/30] ada: Add switch to disable expansion of assertions in CodePeer mode

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek A new debug switch -gnatd_k is added, which has only effect in CodePeer mode. When enabled, assertion expressions are no longer expanded (which is the default in the CodePeer mode); instead, their expansion needs to be explicitly enabled by pragma Assertion_Policy. gcc/ada/

[COMMITTED 03/30] ada: Remove unnecessary guard against empty list

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_prag.adb (Report_Extra_Clauses): Remove redundant check for empty list, because First works also for No_List. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_prag.adb | 15 ++---

[COMMITTED 05/30] ada: Cleanup building of error messages for class-wide contracts

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * exp_ch6.adb (Build_Dynamic_Check_Helper_Call): Remove unused iteration over formal parameters. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/exp_ch6.adb | 3 +-- 1 file changed, 1 inserti

[COMMITTED 16/30] ada: Fix usage of SetThreadAffinityMask

2024-06-10 Thread Marc Poulhiès
From: Ronan Desplanques This patches fixes the signature of the binding to SetThreadAffinityMask in the run-time library. It also fixes the error checking after calls to SetThreadAffinityMask. The previous code behaved as if SetThreadAffinityMask returned 1 on success, but it in fact returns a po

[COMMITTED 10/30] ada: Skip processing of NUL character for attribute Type_Key

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; behavior is unaffected. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Use fully qualified name without a NUL, so that it doesn't need to be skipped afterwards. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 8 +

[COMMITTED 18/30] ada: Tune code related to potentially unevaluated expressions

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_util.adb (Immediate_Context_Implies_Is_Potentially_Unevaluated): Use collective subtypes in membership tests. (Is_Known_On_Entry): Require all alternatives in a case statement to r

[COMMITTED 04/30] ada: Fix handling of aspects CPU and Interrupt_Priority

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek When resolving aspect expression, aspects CPU and Interrupt_Priority should be handled like the aspect Priority; in particular, all these expressions can reference discriminants of the annotated task type. gcc/ada/ * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations

[COMMITTED 09/30] ada: Simplify check for type without stream operations

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek Recursive routine Type_Without_Stream_Operation was checking restriction No_Default_Stream_Attributes at every call, which was confusing and inefficient. This routine is only called from the places: Check_Stream_Attribute, which already checks if this restriction is active,

[COMMITTED 30/30] ada: Add support for No_Implicit_Conditionals to nonbinary modular types

2024-06-10 Thread Marc Poulhiès
From: Eric Botcazou The expansion of additive operations for nonbinary modular types implemented in the front-end and its counterpart in code generators may create branches, which is not allowed when restriction No_Implicit_Conditionals is in effect. This changes it to use an explicit Mod operat

[COMMITTED 19/30] ada: Fix references to Ada RM in comments

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek We seem to have a convention of using "RM" in the GNAT comments, not "Ada RM". Also, the paragraph references by convention should appear in parentheses, e.g. "8.3(12.3/2)", not "8.3 12.3/2". gcc/ada/ * einfo.ads, exp_attr.adb, exp_ch4.adb, exp_ch7.adb, lib-

[COMMITTED 08/30] ada: Enable inlining for subprograms with multiple return statements

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek With the support for forward GOTO statements in the GNATprove backend, we can now inline subprograms with multiple return statements in the frontend. Also, fix inconsistent source locations in the inlined code, which were now triggering assertion violations in the code for G

[COMMITTED 15/30] ada: Fix usage of SetThreadIdealProcessor

2024-06-10 Thread Marc Poulhiès
From: Ronan Desplanques This patches fixes the way the run-time library checks the return value of SetThreadIdealProcessor. gcc/ada/ * libgnarl/s-taprop__mingw.adb (Set_Task_Affinity): Fix usage of SetThreadIdealProcessor. Tested on x86_64-pc-linux-gnu, committed on master. --

[COMMITTED 17/30] ada: Remove streaming facilities from generics for formal containers

2024-06-10 Thread Marc Poulhiès
From: Yannick Moy The dependency on Ada.Streams is problematic for light runtimes. As these streaming facilities are in fact not used in formal containers, remove the corresponding dead code. gcc/ada/ * libgnat/a-chtgfo.adb (Generic_Read, Generic_Write): Remove. * libgnat/a-chtg

[COMMITTED 13/30] ada: Fix incorrect lower bound presumption in gnatlink

2024-06-10 Thread Marc Poulhiès
From: Ronan Desplanques This patch fixes a subprogram in gnatlink that incorrectly assumed that the strings it is passed as arguments all have a lower bound of 1. gcc/ada/ * gnatlink.adb (Check_File_Name): Fix incorrect assumption. Tested on x86_64-pc-linux-gnu, committed on master. -

[COMMITTED 27/30] ada: Minor code adjustment to "not Present" test

2024-06-10 Thread Marc Poulhiès
From: Gary Dismukes This is just changing a "not Present (...)" test to "No (...)" to address a CB complaint from gnatcheck. gcc/ada/ * sem_aggr.adb (Resolve_Iterated_Association): Change "not Present" to "No" in test of Add_Named_Subp. Tested on x86_64-pc-linux-gnu, committed

[COMMITTED 22/30] ada: Crash checking accessibility level on private type

2024-06-10 Thread Marc Poulhiès
From: Justin Squirek This patch fixes an issue in the compiler whereby calculating a static accessibility level on a private type with an access discriminant resulted in a compile time crash when No_Dynamic_Accessibility_Checks is enabled. gcc/ada/ * accessibility.adb (Accessibility_Lev

[COMMITTED 20/30] ada: Further refine 'Super attribute

2024-06-10 Thread Marc Poulhiès
From: Justin Squirek This patch adds the restriction on 'Super such that it cannot apply to objects whose parent type is an interface. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Add check for interface parent types. Tested on x86_64-pc-linux-gnu, committed on master. --- gc

[COMMITTED 12/30] ada: Cleanup repeated code in expansion of stream attributes

2024-06-10 Thread Marc Poulhiès
From: Piotr Trojanek In expansion of various attributes, in particular for the Input/Output and Read/Write attributes, we can use constants that are already used for expansion of many other attributes. gcc/ada/ * exp_attr.adb (Expand_N_Attribute_Reference): Use constants declare

[COMMITTED 23/30] ada: Iterator filter ignored on formal loop

2024-06-10 Thread Marc Poulhiès
From: Justin Squirek This patch fixs an issue where iterator filters for formal container and formal container element loops got silently ignored and remained unexpanded. gcc/ada/ * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Add expansion of filter condition. (E

[COMMITTED 28/30] ada: Derived type with convention C must override convention C_Pass_By_Copy

2024-06-10 Thread Marc Poulhiès
From: Gary Dismukes If a type DT is derived from a record type T with convention C_Pass_By_Copy and explicitly specifies convention C (via aspect or pragma), then type DT should not be treated as a type with convention C_Pass_By_Copy. Any parameters of the derived type should be passed by referen

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Ajit Agarwal
Hello Richard: On 10/06/24 2:12 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> + >> + rtx set = single_set (insn); >> + if (set == NULL_RTX) >> +return false; >> + >> + rtx op0 = SET_SRC (set); >> + rtx_co

[COMMITTED 14/30] ada: Remove incorrect assertion in run-time

2024-06-10 Thread Marc Poulhiès
From: Ronan Desplanques There is a special case of file paths on Windows that are absolute but don't start with a drive letter: UNC paths. This patch removes an assertion in System.OS_Lib.Normalize_Pathname that failed to take this case into account. It also renames a local subprogram of Normaliz

[COMMITTED 26/30] ada: For freezing, treat an extension or delta aggregate like a regular aggregate.

2024-06-10 Thread Marc Poulhiès
From: Steve Baird Extend existing special freezing rules for regular aggregates to also apply to extension and delta aggregates. gcc/ada/ * freeze.adb (Should_Freeze_Type.Is_Dispatching_Call_Or_Aggregate): Treat an extension aggregate or a delta aggregate like a regular

[COMMITTED 21/30] ada: Unreferenced warning on abstract subprogram

2024-06-10 Thread Marc Poulhiès
From: Justin Squirek This patch modifies the unreferenced entity warning in the compiler to avoid noisily warning about unreferenced abstract subprogram. gcc/ada/ * sem_warn.adb (Warn_On_Unreferenced_Entity): Add a condition to ignore warnings on unreferenced abstract subprogram

Re: [PATCH] vect: Merge loop mask and cond_op mask in fold-left, reduction.

2024-06-10 Thread Richard Sandiford
Robin Dapp writes: > Hi, > > currently we discard the cond-op mask when the loop is fully masked > which causes wrong code in > gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c > when compiled with > -O3 -march=cascadelake --param vect-partial-vector-usage=2. > > This patch ANDs both masks ins

[COMMITTED 24/30] ada: Missing style check for extra parentheses in operators

2024-06-10 Thread Marc Poulhiès
From: Justin Squirek This patch fixes an issue in the compiler whereby wrapping an operand of a boolean operator resulted in a failure to detect whether or not they were unnecessary for the -gnatyx style checks. gcc/ada/ * ali.adb (Get_Nat): Remove unnecessary parentheses. * exp

[COMMITTED 25/30] ada: Resolve compilation issues with container aggregates in draft ACATS B tests

2024-06-10 Thread Marc Poulhiès
From: Gary Dismukes This change set addresses compilation problems encountered in the draft versions of the following ACATS B tests for container aggregates: B435001 (container aggregates with Assign_Indexed) B435002 (container aggregates with Add_Unnamed) B435003 (container aggregates with Add_

[COMMITTED 29/30] ada: Storage_Error in indirect call to function returning limited type

2024-06-10 Thread Marc Poulhiès
From: Javier Miranda At runtime the code generated by the compiler reports the exception Storage_Error in an indirect call through an access-to-subprogram variable that references a function returning a limited tagged type object. gcc/ada/ * sem_ch6.adb (Might_Need_BIP_Task_Actuals): Ad

[PATCH v2 0/6] Add DLL import/export implementation to AArch64

2024-06-10 Thread Evgeny Karpov
The patch series has been successfully verified by patchwork, after resolving the issue with the mailing client. https://patchwork.sourceware.org/project/gcc/list/?series=34865 The x86_64-w64-mingw32 build has been tested, and no regressions have been detected after applying the patch series. htt

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Richard Sandiford
Ajit Agarwal writes: > On 10/06/24 2:12 pm, Richard Sandiford wrote: >> Ajit Agarwal writes: >>> + >>> + rtx set = single_set (insn); >>> + if (set == NULL_RTX) >>> + return false; >>> + >>> + rtx op0 = SET_SRC (set); >>> +

[PATCH] tree-optimization/115395 - wrong-code with SLP reduction in epilog

2024-06-10 Thread Richard Biener
When we continue a non-SLP reduction from the main loop in the epilog with a SLP reduction we currently fail to handle an adjustment by the initial value because that's not a thing with SLP. As long as we have the possibility to mix SLP and non-SLP we have to handle it though. Bootstrapped and tes

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Ajit Agarwal
Hello Richard: On 10/06/24 2:52 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> On 10/06/24 2:12 pm, Richard Sandiford wrote: >>> Ajit Agarwal writes: + +rtx set = single_set (insn); +if (set == NULL_RTX) + return false; >>>

Re: [PATCH] vect: Merge loop mask and cond_op mask in fold-left, reduction.

2024-06-10 Thread Richard Sandiford
Richard Sandiford writes: > Robin Dapp writes: >> Hi, >> >> currently we discard the cond-op mask when the loop is fully masked >> which causes wrong code in >> gcc.dg/vect/vect-cond-reduc-in-order-2-signed-zero.c >> when compiled with >> -O3 -march=cascadelake --param vect-partial-vector-usage=2

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Richard Sandiford
Ajit Agarwal writes: > Hello Richard: > > On 10/06/24 2:52 pm, Richard Sandiford wrote: >> Ajit Agarwal writes: >>> On 10/06/24 2:12 pm, Richard Sandiford wrote: Ajit Agarwal writes: > + > + rtx set = single_set (insn); > + if (set == NULL_RTX) >>

Re: [PATCH v2 1/2] driver: Use -as/ld/objcopy as final fallback instead of native ones for cross

2024-06-10 Thread YunQiang Su
Richard Sandiford 于2024年6月6日周四 17:54写道: > > YunQiang Su writes: > > YunQiang Su 于2024年5月29日周三 10:02写道: > >> > >> Richard Sandiford 于2024年5月29日周三 05:28写道: > >> > > >> > YunQiang Su writes: > >> > > If `find_a_program` cannot find `as/ld/objcopy` and we are a cross > >> > > toolchain, > >> > >

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Ajit Agarwal
Hello Richard: On 10/06/24 3:20 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> Hello Richard: >> >> On 10/06/24 2:52 pm, Richard Sandiford wrote: >>> Ajit Agarwal writes: On 10/06/24 2:12 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> + >> +

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Ajit Agarwal
Hello Richard: On 10/06/24 3:20 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> Hello Richard: >> >> On 10/06/24 2:52 pm, Richard Sandiford wrote: >>> Ajit Agarwal writes: On 10/06/24 2:12 pm, Richard Sandiford wrote: > Ajit Agarwal writes: >> + >> +

Re: [patch, rs6000, middle-end 0/1] v1: Add implementation for different targets for pair mem fusion

2024-06-10 Thread Richard Sandiford
Ajit Agarwal writes: > On 10/06/24 3:20 pm, Richard Sandiford wrote: >> Ajit Agarwal writes: >>> On 10/06/24 2:52 pm, Richard Sandiford wrote: Ajit Agarwal writes: > On 10/06/24 2:12 pm, Richard Sandiford wrote: >> Ajit Agarwal writes: >>> + >>> + rt

Re: [PATCH v2 1/2] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline [PR115253]

2024-06-10 Thread Andre Vieira (lists)
Hi Torbjorn, Thanks for this, I have some comments below. On 07/06/2024 09:56, Torbjörn SVENSSON wrote: Properly handle zero and sign extension for Armv8-M.baseline as Cortex-M23 can have the security extension active. Currently, there is a internal compiler error on Cortex-M23 for the epilog p

Re: [PATCH] internal-fn: Force to reg if operand doesn't match.

2024-06-10 Thread Richard Biener
On Mon, Jun 10, 2024 at 9:35 AM Robin Dapp wrote: > > Hi, > > despite looking good on cfarm185 and Linaro's pre-commit CI > gcc-15-638-g7ca35f2e430 now appears to have caused several > regressions on arm-eabi cortex-m55 as found by Linaro's CI: > > https://linaro.atlassian.net/browse/GNU-1252 > >

Re: [PATCH] aarch64: Add vector floating point trunc pattern

2024-06-10 Thread Richard Sandiford
Pengxuan Zheng writes: > This patch is a follow-up of r15-1079-g230d62a2cdd16c to add vector floating > point trunc pattern for V2DF->V2SF and V4SF->V4HF conversions by renaming the > existing aarch64_float_truncate_lo_ pattern to the > standard > optab one, i.e., trunc2. This allows the vectoriz

Re: [PATCH] aarch64: Add fcsel to cmov integer and csel to float cmov [PR98477]

2024-06-10 Thread Richard Sandiford
Andrew Pinski writes: > This patch adds an alternative to the integer cmov and one to floating > point cmov so we avoid in some more moving > > PR target/98477 > > gcc/ChangeLog: > > * config/aarch64/aarch64.md (*cmov_insn[GPI]): Add 'w' > alternative. > (*cmov_insn[GPF]):

Re: [PATCH] fixincludes: bypass the math_exception fix on __cplusplus

2024-06-10 Thread Rainer Orth
Hi FX, > The fixincludes fix “math_exception” is being applied overly broadly, > including many targets which don’t need it, like darwin (and probably all > non-glibc targets). I’m not sure if it is still needed on any target, but > because I can’t be absolutely positive about that, I don’t want t

[PATCH] tree-optimization/115388 - wrong DSE in irreductible regions

2024-06-10 Thread Richard Biener
The following fixes a latent bug in DSE with regarding to variant array accesses where the code avoiding bogus DSE in loops fails to handle irreducible regions. For those we need to make sure backedges are marked and discover a header for the irreducible region to check invariantness. Bootstrappe

Re: [PATCH] Rearrange SLP nodes with duplicate statements. [PR98138]

2024-06-10 Thread Manolis Tsamis
On Wed, Jun 5, 2024 at 11:07 AM Richard Biener wrote: > > On Tue, 4 Jun 2024, Manolis Tsamis wrote: > > > This change adds a function that checks for SLP nodes with multiple > > occurrences > > of the same statement (e.g. {A, B, A, B, ...}) and tries to rearrange the > > node > > so that there a

[PATCH] libstdc++: Introduce scale factor in 30_threads/future/members/poll.cc [PR98678]

2024-06-10 Thread Rainer Orth
30_threads/future/members/poll.cc consistently FAILs on Solaris/x86 (both 32 and 64-bit): FAIL: 30_threads/future/members/poll.cc -std=gnu++17 execution test /vol/gcc/src/hg/master/local/libstdc++-v3/testsuite/30_threads/future/members/poll.cc:95: int main(): Assertion 'wait_until_sys_min < (re

Re: [PATCH] libstdc++: Introduce scale factor in 30_threads/future/members/poll.cc [PR98678]

2024-06-10 Thread Jonathan Wakely
On Mon, 10 Jun 2024 at 12:54, Rainer Orth wrote: > > 30_threads/future/members/poll.cc consistently FAILs on Solaris/x86 > (both 32 and 64-bit): > > FAIL: 30_threads/future/members/poll.cc -std=gnu++17 execution test I see this one failing under x86_64-linux under high load. So I think we might

Re: [PATCH] fixincludes: bypass the math_exception fix on __cplusplus

2024-06-10 Thread FX Coudert
> However, please note that the comment states > * This should be bypassed on __cplusplus, but some supposedly C++ > * aware headers, such as Solaris 8 and 9, don't wrap their struct > It's "such as Solaris 8 and 9", so there may well be others. I know, but that was 24 years ago, and I cou

Re: [PATCH] fixincludes: bypass the math_exception fix on __cplusplus

2024-06-10 Thread Rainer Orth
Hi FX, >> However, please note that the comment states >> * This should be bypassed on __cplusplus, but some supposedly C++ >> * aware headers, such as Solaris 8 and 9, don't wrap their struct >> It's "such as Solaris 8 and 9", so there may well be others. > > I know, but that was 24 years

Re: [PATCH v2 1/2] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline [PR115253]

2024-06-10 Thread Torbjorn SVENSSON
Hi Andre, Thanks for the review! Please see my questions below. On 2024-06-10 12:37, Andre Vieira (lists) wrote: Hi Torbjorn, Thanks for this, I have some comments below. On 07/06/2024 09:56, Torbjörn SVENSSON wrote: Properly handle zero and sign extension for Armv8-M.baseline as Cortex-M23

Re: [PATCH] internal-fn: Force to reg if operand doesn't match.

2024-06-10 Thread Richard Sandiford
Richard Biener writes: > On Mon, Jun 10, 2024 at 9:35 AM Robin Dapp wrote: >> >> Hi, >> >> despite looking good on cfarm185 and Linaro's pre-commit CI >> gcc-15-638-g7ca35f2e430 now appears to have caused several >> regressions on arm-eabi cortex-m55 as found by Linaro's CI: >> >> https://linaro.

Re: [PATCH v2 1/2] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline [PR115253]

2024-06-10 Thread Andre Vieira (lists)
Hi, So, you talk about gen_thumb1_extendhisi2, but there is also gen_thumb1_extendqisi2. Will it actually be cleaner if the block is indented one level? The comment can be added in the "if (TARGET_THUMB1)" block regardless to indicate that gen_rtx_SIGN_EXTEND can't be used. gen_rtx_SIGN_EX

Re: [PATCH] Rearrange SLP nodes with duplicate statements. [PR98138]

2024-06-10 Thread Richard Biener
On Mon, 10 Jun 2024, Manolis Tsamis wrote: > On Wed, Jun 5, 2024 at 11:07 AM Richard Biener wrote: > > > > On Tue, 4 Jun 2024, Manolis Tsamis wrote: > > > > > This change adds a function that checks for SLP nodes with multiple > > > occurrences > > > of the same statement (e.g. {A, B, A, B, ...}

[PATCH v2] vect: Merge loop mask and cond_op mask in fold-left, reduction [PR115382].

2024-06-10 Thread Robin Dapp
> Actually, as Richard mentioned in the PR, it would probably be better > to use prepare_vec_mask instead. It should work in this context too > and would avoid redundant double masking. Attached is v2 that uses prepare_vec_mask. Regtested on riscv64 and armv8.8-a+sve via qemu. Bootstrap and regt

[to-be-committed][RISC-V] Generate bclr more often for rv64

2024-06-10 Thread Jeff Law
Another of Raphael's patches to improve our ability to safely generate a Zbs instruction, bclr in this instance. In this case we have something like ~(1 << N) & C where N is variable, but C is a constant. If C has 33 or more leading zeros, then no matter what bit we clear via bclr, the result

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Jeff Law
On 6/10/24 1:33 AM, Robin Dapp wrote: But isn't canonicalization of EQ/NE safe, even for IEEE NaN and +-0.0? target = (a == b) ? x : y target = (a != b) ? y : x Are equivalent, even for IEEE IIRC. Yes, that should be fine. My concern was not that we do a canonicalization but that we might

Re: [PATCH v2] vect: Merge loop mask and cond_op mask in fold-left, reduction [PR115382].

2024-06-10 Thread Richard Sandiford
Robin Dapp writes: >> Actually, as Richard mentioned in the PR, it would probably be better >> to use prepare_vec_mask instead. It should work in this context too >> and would avoid redundant double masking. > > Attached is v2 that uses prepare_vec_mask. > > Regtested on riscv64 and armv8.8-a+sve

[PATCH v3 2/2] testsuite: Fix expand-return CMSE test for Armv8.1-M [PR115253]

2024-06-10 Thread Torbjörn SVENSSON
For Armv8.1-M, the clearing of the registers is handled differently than for Armv8-M, so update the test case accordingly. gcc/testsuite/ChangeLog: PR target/115253 * gcc.target/arm/cmse/extend-return.c: Update test case condition for Armv8.1-M. Signed-off-by: Torbjörn SV

[PATCH v3 1/2] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline [PR115253]

2024-06-10 Thread Torbjörn SVENSSON
Properly handle zero and sign extension for Armv8-M.baseline as Cortex-M23 can have the security extension active. Currently, there is an internal compiler error on Cortex-M23 for the epilog processing of sign extension. This patch addresses the following CVE-2024-0151 for Armv8-M.baseline. gcc/C

[PATCH v3 0/2] arm: Zero/Sign extends for CMSE security on Armv8-M.baseline [PR115253]

2024-06-10 Thread Torbjörn SVENSSON
Hi, Changes in v3: Droped special case for thumb1_extendqisi2 as it's only thumb1_extendhisi2 that causes problem for gen_rtx_SIGN_EXTEND. Changes in v2: Updated the patch to also fix the Cortex-M55 issue reported in PR115253 and updated the commit message to mention the PR number. Initial iss

Re: [PATCH] htdocs: correct spelling and use https in examples

2024-06-10 Thread Gerald Pfeifer
On Wed, 6 Dec 2023, Jonny Grant wrote: > ChangeLog: > > htdocs: correct spelling and use https in examples. I noticed this hasn't been applied yet, so went ahead and pushed (nearly all of) it. Just the "use https in examples" part feels orthogonal, so better a separate issue, and I'm not

Re: [PATCH] htdocs/contribute.html: correct disctinct->distinct spelling

2024-06-10 Thread Gerald Pfeifer
On Sat, 2 Dec 2023, Jonny Grant wrote: > Correct a spelling mistake this page: > https://gcc.gnu.org/contribute.html Superseded by Author: Jonathan Grant Date: Sat Jun 8 21:26:04 2024 +0200 *: Correct spelling which I just pushed. Gerald

[PATCH v1] Widening-Mul: Fix one ICE of gcall insertion for PHI match

2024-06-10 Thread pan2 . li
From: Pan Li When enabled the PHI handing for COND_EXPR, we need to insert the gcall to replace the PHI node. Unfortunately, I made a mistake that insert the gcall to before the last stmt of the bb. See below gimple, the PHI is located at no.1 but we insert the gcall (aka no.9) to the end of

RE: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Li, Pan2
Not sure if below float eq implement in sail-riscv is useful or not, but looks like some special handling for nan, as well as snan. https://github.com/riscv/sail-riscv/blob/master/c_emulator/SoftFloat-3e/source/f32_eq.c Pan -Original Message- From: Jeff Law Sent: Monday, June 10, 2024

Re: [PATCH] c++: remove Concepts TS code

2024-06-10 Thread Marek Polacek
On Mon, Jun 10, 2024 at 10:22:11AM -0400, Patrick Palka wrote: > On Fri, 7 Jun 2024, Marek Polacek wrote: > > @@ -3940,9 +3936,6 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, > > void* data) > > parameter pack (14.6.3), or the type-specifier-seq of a type-id that > > is a pack

[PUSHED] Fix pr115388.c: plain char could be unsigned by default [PR115415]

2024-06-10 Thread Andrew Pinski
This is a simple fix to the testcase as plain `char` could be unsigned by default on some targets (e.g. aarch64 and powerpc). Committed as obvious after quick test of the testcase on both aarch64 and x86_64. gcc/testsuite/ChangeLog: PR testsuite/115415 PR tree-optimization/11538

Re: [PATCH v1] Widening-Mul: Fix one ICE of gcall insertion for PHI match

2024-06-10 Thread Sam James
pan2...@intel.com writes: > From: Pan Li > > When enabled the PHI handing for COND_EXPR, we need to insert the gcall > to replace the PHI node. Unfortunately, I made a mistake that insert > the gcall to before the last stmt of the bb. See below gimple, the PHI > is located at no.1 but we ins

[PING][PATCH v2] docs: Update function multiversioning documentation

2024-06-10 Thread Andrew Carlotti
On Tue, Apr 30, 2024 at 05:10:45PM +0100, Andrew Carlotti wrote: > Add target_version attribute to Common Function Attributes and update > target and target_clones documentation. Move shared detail and examples > to the Function Multiversioning page. Add target-specific details to > target-spec

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Demin Han
Hi, I‘m on vacation rencently. I will return in a few days and summit new patch with the test. Regards, Demin 发件人: Jeff Law 发送时间: 星期一, 六月 10, 2024 9:49 下午 收件人: Robin Dapp ; Demin Han ; 钟居哲 ; gcc-patches 抄送: kito.cheng ; Li, Pan2 主题: Re: [PATCH 1/5] RISC-

Re: [PATCH v1] Widening-Mul: Fix one ICE of gcall insertion for PHI match

2024-06-10 Thread Jeff Law
On 6/10/24 8:49 AM, pan2...@intel.com wrote: From: Pan Li When enabled the PHI handing for COND_EXPR, we need to insert the gcall to replace the PHI node. Unfortunately, I made a mistake that insert the gcall to before the last stmt of the bb. See below gimple, the PHI is located at no.

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Jeff Law
On 6/10/24 10:16 AM, Demin Han wrote: Hi, I‘m on vacation rencently. I will return in a few days and summit new patch with the test. No problem. Enjoy your vacation, this can certainly wait until you return. jeff

Re: [PATCH 1/5] RISC-V: Remove float vector eqne pattern

2024-06-10 Thread Jeff Law
On 6/10/24 8:52 AM, Li, Pan2 wrote: Not sure if below float eq implement in sail-riscv is useful or not, but looks like some special handling for nan, as well as snan. https://github.com/riscv/sail-riscv/blob/master/c_emulator/SoftFloat-3e/source/f32_eq.c Yes, but it's symmetrical, which is

Re: [PATCH v2 2/3] RISC-V: Add Zalrsc and Zaamo testsuite support

2024-06-10 Thread Patrick O'Neill
On 6/7/24 16:04, Jeff Law wrote: On 6/3/24 3:53 PM, Patrick O'Neill wrote: Convert testsuite infrastructure to use Zalrsc and Zaamo rather than A. gcc/testsuite/ChangeLog: * gcc.target/riscv/amo-table-a-6-amo-add-1.c: Use Zaamo rather than A. * gcc.target/riscv/amo-table-a-6-amo-

Re: [PATCH v3 6/6] aarch64: Add DLL import/export to AArch64 target

2024-06-10 Thread Richard Sandiford
Thanks for the update. Parts 1-5 look good to me. Some minor comments below about part 6: Evgeny Karpov writes: > This patch reuses the MinGW implementation to enable DLL import/export > functionality for the aarch64-w64-mingw32 target. It also modifies > environment configurations for MinGW. >

Re: [PATCH] ifcvt: Clarify if_info.original_cost.

2024-06-10 Thread Richard Sandiford
Robin Dapp writes: >> Is there any way we can avoid using pattern_cost here? Using it means >> that we can make use of targetm.insn_cost for the jump but circumvent >> it for the condition, giving a bit of a mixed metric. >> >> (I realise there are existing calls to pattern_cost in ifcvt.cc, >>

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

2024-06-10 Thread Jeff Law
On 6/10/24 1:55 AM, Manolis Tsamis wrote: There was an older submission of a load-pair specific pass but this is a complete reimplementation and indeed significantly more general. Apart from being target independant, it addresses a number of important restrictions and can handle multiple st

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

2024-06-10 Thread Philipp Tomsich
On Mon, 10 Jun 2024 at 20:03, Jeff Law wrote: > > > > On 6/10/24 1:55 AM, Manolis Tsamis wrote: > > >> > > There was an older submission of a load-pair specific pass but this is > > a complete reimplementation and indeed significantly more general. > > Apart from being target independant, it addre

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

2024-06-10 Thread Jeff Law
On 6/10/24 12:27 PM, Philipp Tomsich wrote: This change is what I briefly hinted as "the complete solution" that we had on the drawing board when we briefly talked last November in Santa Clara. I haven't any recollection of that part of the discussion, but I was a bit frazzled as you probab

[PATCH v2] aarch64: Improve popcount for bytes [PR113042]

2024-06-10 Thread Andrew Pinski
For popcount for bytes, we don't need the reduction addition after the vector cnt instruction as we are only counting one byte's popcount. This changes the popcount extend to cover all ALLI rather than GPI. Changes since v1: * v2 - Use ALLI iterator and combine all into one pattern. Add new

[PATCH] Move array_bounds warnings into it's own pass.

2024-06-10 Thread Andrew MacLeod
The array bounds warning pass was originally attached to the VRP pass because it wanted to leverage the context sensitive ranges available there. With ranger, we can make it a pass of its own for very little cost.  This patch does that. It removes the array_bounds_checker from VRP and makes it

RE: [PATCH] aarch64: Improve popcount for bytes [PR113042]

2024-06-10 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Kyrylo Tkachov > Sent: Monday, June 10, 2024 12:26 AM > To: Andrew Pinski (QUIC) ; gcc- > patc...@gcc.gnu.org > Subject: Re: [PATCH] aarch64: Improve popcount for bytes > [PR113042] > > Hi Andrew > > -Original Message- > From: Andrew Pinski

  1   2   >