[PATCH] Fix ICE in rtl check due to CONST_WIDE_INT in CONST_VECTOR_DUPLICATE_P

2024-06-10 Thread liuhongt
In theory, const_wide_int can also be handle with extra check for each components of the HOST_WIDE_INT array, and the check is need for both shift and bit_and operands. I assume the optimization opportnunity is rare, so the patch just add extra check to make sure GET_MODE_INNER (mode) can fix

Re: [PATCH] AVX-512: Pacify -Wshift-overflow=2. [PR115409]

2024-06-10 Thread Hongtao Liu
On Mon, Jun 10, 2024 at 2:37 PM Collin Funk wrote: > > A shift of 31 on a signed int is undefined behavior. Since unsigned > int is 32-bits wide this change fixes it and silences the warning. Ok. > > gcc/ChangeLog: > > PR target/115409 > * config/i386/avx512fp16intrin.h

[committed] [RISC-V] Drop dead test

2024-06-10 Thread Jeff Law
This test is no longer useful. It doesn't test what it was originally intended to test and there's really no way to recover it sanely. We agreed in the patchwork meeting last week that if we want to test Zfa that we'll write a new test for that. Similarly if we want to do deeper testing of

Re: [PATCH v3 0/3] RISC-V: Add basic Zaamo and Zalrsc support

2024-06-10 Thread Jeff Law
On 6/10/24 3:46 PM, Patrick O'Neill wrote: The A extension has been split into two parts: Zaamo and Zalrsc. This patch adds basic support by making the A extension imply Zaamo and Zalrsc. Zaamo/Zalrsc spec: https://github.com/riscv/riscv-zaamo-zalrsc/tags Ratification:

Re: [PATCH v3 0/3] RISC-V: Add basic Zaamo and Zalrsc support

2024-06-10 Thread Jeff Law
On 6/10/24 6:15 PM, Andrea Parri wrote: On Mon, Jun 10, 2024 at 02:46:54PM -0700, Patrick O'Neill wrote: The A extension has been split into two parts: Zaamo and Zalrsc. This patch adds basic support by making the A extension imply Zaamo and Zalrsc. Zaamo/Zalrsc spec:

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

2024-06-10 Thread Jason Merrill
On 6/10/24 03:13, Julian Waters wrote: 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? Sure, we're still early in GCC 15 development, no time pressure. On Tue, Jun 4, 2024 at 1:04 AM Jason

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

2024-06-10 Thread Jason Merrill
On 6/10/24 11:13, Marek Polacek wrote: 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

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

2024-06-10 Thread Li, Pan2
Got it, thanks. Let me prepare the patch after test. Pan -Original Message- From: Jeff Law Sent: Tuesday, June 11, 2024 9:42 AM To: Li, Pan2 ; Sam James Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@gmail.com; richard.guent...@gmail.com Subject: Re: [PATCH v1]

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

2024-06-10 Thread Jeff Law
On 6/10/24 7:28 PM, Li, Pan2 wrote: Hi Sam, This testcases ICEs for me on x86-64 too (without your patch) with just -O2. Can you move it out of the riscv suite? (I suspect the other fails on x86-64 too). Sure thing, but do you have any suggestion about where should I put these 2 cases?

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

2024-06-10 Thread Li, Pan2
Hi Sam, > This testcases ICEs for me on x86-64 too (without your patch) with just -O2. > Can you move it out of the riscv suite? (I suspect the other fails on x86-64 > too). Sure thing, but do you have any suggestion about where should I put these 2 cases? There are sorts of sub-directories

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

2024-06-10 Thread Li, Pan2
Thank a lot, Jeff. Pan -Original Message- From: Jeff Law Sent: Tuesday, June 11, 2024 4:15 AM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; richard.guent...@gmail.com Subject: Re: [PATCH v1] Widening-Mul: Fix one ICE of gcall insertion for PHI

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

2024-06-10 Thread Hongtao Liu
On Mon, Jun 10, 2024 at 3:20 PM Roger Sayle wrote: > > > 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

Re: [PATCH v3 0/3] RISC-V: Add basic Zaamo and Zalrsc support

2024-06-10 Thread Andrea Parri
On Mon, Jun 10, 2024 at 02:46:54PM -0700, Patrick O'Neill wrote: > The A extension has been split into two parts: Zaamo and Zalrsc. > This patch adds basic support by making the A extension imply Zaamo and > Zalrsc. > > Zaamo/Zalrsc spec: https://github.com/riscv/riscv-zaamo-zalrsc/tags >

[pushed] modula2: Fix typos, grammar, and a link

2024-06-10 Thread Gerald Pfeifer
Pushed. Gerald gcc: * doc/gm2.texi (Documentation): Fix typos, grammar, and a link. --- gcc/doc/gm2.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/doc/gm2.texi b/gcc/doc/gm2.texi index 8661fcb8728..c532339fbb8 100644 --- a/gcc/doc/gm2.texi +++

[pushed] wwwdocs: news: Use https for our Wiki

2024-06-10 Thread Gerald Pfeifer
Pushed. Gerald --- htdocs/news.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/news.html b/htdocs/news.html index 5f652d90..de92bdf6 100644 --- a/htdocs/news.html +++ b/htdocs/news.html @@ -384,7 +384,7 @@ The Vtable Verification Feature is now in GCC

[PATCH v3 1/3] RISC-V: Add basic Zaamo and Zalrsc support

2024-06-10 Thread Patrick O'Neill
From: Edwin Lu There is a proposal to split the A extension into two parts: Zaamo and Zalrsc. This patch adds basic support by making the A extension imply Zaamo and Zalrsc. Proposal: https://github.com/riscv/riscv-zaamo-zalrsc/tags gcc/ChangeLog: *

[PATCH v3 0/3] RISC-V: Add basic Zaamo and Zalrsc support

2024-06-10 Thread Patrick O'Neill
The A extension has been split into two parts: Zaamo and Zalrsc. This patch adds basic support by making the A extension imply Zaamo and Zalrsc. Zaamo/Zalrsc spec: https://github.com/riscv/riscv-zaamo-zalrsc/tags Ratification: https://jira.riscv.org/browse/RVS-1995 v2: Rebased and updated some

[PATCH v3 3/3] RISC-V: Add Zalrsc amo-op patterns

2024-06-10 Thread Patrick O'Neill
All amo patterns can be represented with lrsc sequences. Add these patterns as a fallback when Zaamo is not enabled. gcc/ChangeLog: * config/riscv/sync.md (atomic_): New expand pattern. (amo_atomic_): Rename amo pattern. (atomic_fetch_): New lrsc sequence pattern.

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

2024-06-10 Thread Patrick O'Neill
Convert testsuite infrastructure to use Zalrsc and Zaamo rather than A. gcc/ChangeLog: * doc/sourcebuild.texi: Add docs for atomic extension testsuite infra. gcc/testsuite/ChangeLog: * gcc.target/riscv/amo-table-a-6-amo-add-1.c: Use Zaamo rather than A. *

[to-be-committed] [RISC-V] Improve (1 << N) | C for rv64

2024-06-10 Thread Jeff Law
Another improvement for generating Zbs instructions. In this case we're looking at stuff like (1 << N) | C where N varies and C is a single bit constant. In this pattern the (1 << N) happens in SImode, but is zero extended out to DImode before the bit manipulation. The fact that we're

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

2024-06-10 Thread Andrew MacLeod
pushed as 74ee12ff68243bb177fb8653474dff80c3792139 fyi, the 2 testcases depending on the VRP flag were: c-c++-common/Warray-bounds-2.c   (-warray-bounds  -fno-tree-vrp :-P) and g++.dg/warn/string1.C   (-O1 -Wall) Andrew On 6/10/24 16:12, Jeff Law wrote: On 6/10/24 1:24 PM, Andrew MacLeod

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

2024-06-10 Thread Andrew MacLeod
On 6/10/24 16:12, Jeff Law wrote: Does anyone have any issues with any of this? No, in fact, quite the opposite.  I think we very much want the warning out of VRP into its own little pass that we can put wherever it makes sense in the pipeline rather than having it be tied to VRP. I'd

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: 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

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

2024-06-10 Thread Jeff Law
On 6/10/24 1:24 PM, Andrew MacLeod wrote: 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

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

[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

[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

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

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

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

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 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 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. *

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

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 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

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]

[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 >

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

[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

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

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,

[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

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

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

[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

[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.

[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

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

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

[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

[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

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,

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.

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: >> >>

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] 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

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

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

[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: [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

[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.

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

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] 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

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 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

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: >>> + >>> +

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 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 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] 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

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;

[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

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 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.

[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):

[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

[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. *

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

[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

[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

[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

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); >> +

[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

[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.

[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

[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. ---

[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

[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 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. *

[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

[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,

[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

[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 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

[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

  1   2   >