Re: [PATCH 2/2] [x86] Adjust rtx_cost for MEM to enable more simplication

2024-05-20 Thread Uros Bizjak
On Tue, May 21, 2024 at 7:13 AM liuhongt wrote: > > For CONST_VECTOR_DUPLICATE_P in constant_pool, it is just broadcast or > variants in ix86_vector_duplicate_simode_const. > Adjust the cost to COSTS_N_INSNS (2) + speed which should be a little > bit larger than broadcast. > > Bootstrapped and reg

Re: [PATCH] i386: Disable ix86_expand_vecop_qihi2 when !TARGET_AVX512BW

2024-05-20 Thread Uros Bizjak
On Tue, May 21, 2024 at 8:16 AM Haochen Jiang wrote: > > Hi all, > > Since vpermq is really slow, we should avoid using it when it is > the only instruction could be used for ix86_expand_vecop_qihi2. > > Bootstrapped and regtested on x86_64-pc-linux-gnu. Ok for trunk? > > Thx, > Haochen > > gcc/Ch

Re: [PATCH] i386: Disable ix86_expand_vecop_qihi2 when !TARGET_AVX512BW

2024-05-20 Thread Hongtao Liu
On Tue, May 21, 2024 at 2:16 PM Haochen Jiang wrote: > > Hi all, > > Since vpermq is really slow, we should avoid using it when it is > the only instruction could be used for ix86_expand_vecop_qihi2. > > Bootstrapped and regtested on x86_64-pc-linux-gnu. Ok for trunk? Please add a testcase for it.

[PATCH] i386: Disable ix86_expand_vecop_qihi2 when !TARGET_AVX512BW

2024-05-20 Thread Haochen Jiang
Hi all, Since vpermq is really slow, we should avoid using it when it is the only instruction could be used for ix86_expand_vecop_qihi2. Bootstrapped and regtested on x86_64-pc-linux-gnu. Ok for trunk? Thx, Haochen gcc/ChangeLog: PR target/115069 * config/i386/i386-expand.cc (i

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-20 Thread Richard Biener
On Tue, May 21, 2024 at 4:35 AM Hongtao Liu wrote: > > On Wed, May 15, 2024 at 5:24 PM Richard Biener > wrote: > > > > On Wed, May 15, 2024 at 4:15 AM Hongtao Liu wrote: > > > > > > On Mon, May 13, 2024 at 3:40 PM Richard Biener > > > wrote: > > > > > > > > On Mon, May 13, 2024 at 4:29 AM liuho

Re: [PATCH] match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154]

2024-05-20 Thread Richard Biener
On Tue, May 21, 2024 at 12:02 AM Andrew Pinski wrote: > > The problem here is the pattern added in r13-1162-g9991d84d2a8435 > assumes that it is well defined to multiply zero_one_valuep by the truncated > converted integer constant. It is well defined for all types except for > signed 1bit types.

Re: [committed] PATCH for Re: Stepping down as maintainer for ARC and Epiphany

2024-05-20 Thread Richard Biener
On Mon, May 20, 2024 at 4:45 PM Gerald Pfeifer wrote: > > On Wed, 5 Jul 2023, Joern Rennecke wrote: > > I haven't worked with these targets in years and can't really do > > sensible maintenance or reviews of patches for them. I am currently > > working on optimizations for other ports like RISC-V.

Re: [PATCH] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-20 Thread Richard Biener
On Mon, May 20, 2024 at 11:37 PM Andrew Pinski (QUIC) wrote: > > > -Original Message- > > From: Richard Biener > > Sent: Sunday, May 19, 2024 11:55 AM > > To: Andrew Pinski (QUIC) > > Cc: gcc-patches@gcc.gnu.org > > Subject: Re: [PATCH] PHIOPT: Don't transform minmax if > > middle bb con

[PATCH] x86: Fix Logical Shift Issue in expand_vec_perm_psrlw_psllw_por [PR115146]

2024-05-20 Thread Levy Hsu
Replaced arithmetic shifts with logical shifts in expand_vec_perm_psrlw_psllw_por to avoid sign bit extension issues. Also corrected gen_vlshrv8hi3 to gen_lshrv8hi3 and gen_vashlv8hi3 to gen_ashlv8hi3. Bootstrapped and tested on x86_64-linux-gnu, OK for trunk? Co-authored-by: H.J. Lu gcc/Chan

Re: [C PATCH, v2] Fix for redeclared enumerator initialized with different type [PR115109]

2024-05-20 Thread Martin Uecker
Am Montag, dem 20.05.2024 um 21:30 + schrieb Joseph Myers: > On Sun, 19 May 2024, Martin Uecker wrote: > > > c23 specifies that the type of a redeclared enumerator is the one of the > > previous declaration. Convert initializers with different type > > accordingly > > and add -Wo

[PATCH 2/2] [x86] Adjust rtx_cost for MEM to enable more simplication

2024-05-20 Thread liuhongt
For CONST_VECTOR_DUPLICATE_P in constant_pool, it is just broadcast or variants in ix86_vector_duplicate_simode_const. Adjust the cost to COSTS_N_INSNS (2) + speed which should be a little bit larger than broadcast. Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok for trunk? gcc/Chang

[PATCH 1/2] Simplify (AND (ASHIFTRT A imm) mask) to (LSHIFTRT A imm) for vector mode.

2024-05-20 Thread liuhongt
When mask is (1 << (prec - imm) - 1) which is used to clear upper bits of A, then it can be simplified to LSHIFTRT. i.e Simplify (and:v8hi (ashifrt:v8hi A 8) (const_vector 0xff x8)) to (lshifrt:v8hi A 8) Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. Ok of trunk? gcc/ChangeLog:

Re: [PING^4][PATCH] rs6000: load high and low part of 128bit vector independently [PR110040]

2024-05-20 Thread jeevitha
Ping! please review. Thanks & Regards Jeevitha On 17/04/24 2:46 pm, jeevitha wrote: > Ping! > > please review. > > Thanks & Regards > Jeevitha > > On 26/03/24 10:23 am, jeevitha wrote: >> Ping! >> >> please review. >> >> Thanks & Regards >> Jeevitha >> >> >> On 26/02/24 11:13 am, jeevitha wr

Re: [PING^2][PATCH v2] rs6000: Fix issue in specifying PTImode as an attribute [PR106895]

2024-05-20 Thread jeevitha
Ping! please review. Thanks & Regards Jeevitha On 17/04/24 2:44 pm, jeevitha wrote: > Ping! > > I've incorporated all the suggested changes. Please review. > > Thanks & Regards > Jeevitha > > On 21/03/24 6:21 pm, jeevitha wrote: >> Hi All, >> >> The following patch has been bootstrapped and

Re: [PATCH v3 2/2] RISC-V: avoid LUI based const mat in alloca epilogue expansion

2024-05-20 Thread Jeff Law
On 5/20/24 5:32 PM, Vineet Gupta wrote: This is testsuite clean however there's a dwarf quirk which I want to run by the experts. The test that was tripping CI has following fragment: Before patch| After Patch --

RE: [PATCH 0/4]AArch64: support conditional early clobbers on certain operations.

2024-05-20 Thread Tamar Christina
> -Original Message- > From: Richard Sandiford > Sent: Wednesday, May 15, 2024 10:31 PM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org; nd > ; Richard Earnshaw ; Marcus > Shawcroft ; ktkac...@gcc.gnu.org > Subject: Re: [PATCH 0/4]AArch64: support conditional early cl

RE: [PATCH v3] Match: Extract ternary_integer_types_match_p helper func [NFC]

2024-05-20 Thread Tamar Christina
> -Original Message- > From: pan2...@intel.com > Sent: Tuesday, May 21, 2024 2:13 AM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > ; richard.guent...@gmail.com; Pan Li > > Subject: [PATCH v3] Match: Extract ternary_integer_types_match

[PATCH v2] [testsuite] xfail pr79004 on longdouble64; drop long_double_64bit (was: ppc: testsuite: pr79004 needs -mlong-double-128)

2024-05-20 Thread Alexandre Oliva
On May 8, 2024, "Kewen.Lin" wrote: >>> How about the generic one "longdouble64"? I did a grep and found it has one >>> use, I'd expect it can work here. :) >> >> ... since this and longdouble128 exist, maybe we can fix it and leave >> them all alone, despite the interface oddity. >> > ... per

[PATCH-3] Value Range: Add range op for builtin isnormal

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds the range op for builtin isnormal. It also adds two help function in frange to detect range of normal floating-point and range of subnormal or zero. Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no regressions. Is it OK for the trunk? Thanks Gui Haochen

[PATCH-2v3] Value Range: Add range op for builtin isfinite

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds the range op for builtin isfinite. Compared to previous version, the main change is to set varying if nothing is known about the range. https://gcc.gnu.org/pipermail/gcc-patches/2024-May/650857.html Bootstrapped and tested on x86 and powerpc64-linux BE and LE with no reg

[PATCH-1v2] Value Range: Add range op for builtin isinf

2024-05-20 Thread HAO CHEN GUI
Hi, The builtin isinf is not folded at front end if the corresponding optab exists. It causes the range evaluation failed on the targets which has optab_isinf. For instance, range-sincos.c will fail on the targets which has optab_isinf as it calls builtin_isinf. This patch fixed the problem by

[PATCH] [testsuite] cope with rtems implicit -ftls-model=local-exec

2024-05-20 Thread Alexandre Oliva
gcc/config/rtems.h's OS_CC1_SPEC changes the -ftls-model default to local-exec, which breaks some tests that compile with PIC and thus expect dynamic TLS access models. I assume the default overriding even with PIC is intended, so I'm adjusting the testcases. For those in gcc.dg/tls, I adjusted

Re: [PATCH] Don't reduce estimated unrolled size for innermost loop.

2024-05-20 Thread Hongtao Liu
On Wed, May 15, 2024 at 5:24 PM Richard Biener wrote: > > On Wed, May 15, 2024 at 4:15 AM Hongtao Liu wrote: > > > > On Mon, May 13, 2024 at 3:40 PM Richard Biener > > wrote: > > > > > > On Mon, May 13, 2024 at 4:29 AM liuhongt wrote: > > > > > > > > As testcase in the PR, O3 cunrolli may preve

[PATCH v3] Match: Extract ternary_integer_types_match_p helper func [NFC]

2024-05-20 Thread pan2 . li
From: Pan Li There are sorts of match pattern for SAT related cases, there will be some duplicated code to check the dest, op_0, op_1 are same tree types. Aka ternary tree type matches. Thus, extract one helper function to do this and avoid match code duplication. The below test suites are pas

[PATCH v3 2/2] RISC-V: avoid LUI based const mat in alloca epilogue expansion

2024-05-20 Thread Vineet Gupta
This is testsuite clean however there's a dwarf quirk which I want to run by the experts. The test that was tripping CI has following fragment: Before patch| After Patch -- li t0,-4096| addi sp,s0,-

[PATCH v3 1/2] RISC-V: avoid LUI based const mat in prologue/epilogue expansion [PR/105733]

2024-05-20 Thread Vineet Gupta
Changes since v2: - Broke out the hunk corresponding to alloca in epilogue expansion in a seperate patch. --- If the constant used for stack offset can be expressed as sum of two S12 values, the constant need not be materialized (in a reg) and instead the two S12 bits can be added to instruc

Re: [PATCH] modula2: Fully respect DESTDIR in texi rule

2024-05-20 Thread Gaius Mulley
Sam James writes: > This was originally reported in Gentoo at https://bugs.gentoo.org/930014. > > 2024-05-20 Sam James > gcc/m2/ > * Make-lang.in (m2.install-info): Pass --destdir for dir index. > --- > gcc/m2/Make-lang.in | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > dif

[PATCH] modula2: Fully respect DESTDIR in texi rule

2024-05-20 Thread Sam James
This was originally reported in Gentoo at https://bugs.gentoo.org/930014. 2024-05-20 Sam James gcc/m2/ * Make-lang.in (m2.install-info): Pass --destdir for dir index. --- gcc/m2/Make-lang.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/m2/Make-lang.in b/gcc/m2

3rd Ping [PATCH v9 0/5] New attribute "counted_by" to annotate bounds for C99 FAM(PR108896)

2024-05-20 Thread Qing Zhao
Hi, This is the 3rd ping for the middle-end approval for this patch set. I’m hoping to commit this feature into GCC15 as early as possible to enable linux kernel to use it and have more testing. For your info, this new feature has been committed to CLANG since last October (https://github.co

Re: [PATCH v2] c++: Strengthen checks on 'main'

2024-05-20 Thread Jason Merrill
On 5/17/24 02:47, Nathaniel Shead wrote: On Tue, May 14, 2024 at 06:25:29PM -0400, Jason Merrill wrote: On 5/11/24 08:32, Nathaniel Shead wrote: I wasn't entirely sure what to do with the 'abi/main.C' testcase here; is this OK, or should I e.g. lower the linkage error to a pedwarn for the purpo

[PATCH] match: Disable `(type)zero_one_valuep*CST` for 1bit signed types [PR115154]

2024-05-20 Thread Andrew Pinski
The problem here is the pattern added in r13-1162-g9991d84d2a8435 assumes that it is well defined to multiply zero_one_valuep by the truncated converted integer constant. It is well defined for all types except for signed 1bit types. Where `a * -1` is produced which is undefined/ So disable this p

Re: [PATCH v2] c++/modules: Remember that header units have CMIs

2024-05-20 Thread Jason Merrill
On 5/17/24 02:14, Nathaniel Shead wrote: On Tue, May 14, 2024 at 06:21:48PM -0400, Jason Merrill wrote: On 5/12/24 22:58, Nathaniel Shead wrote: Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk? OK. I realised as I was looking over this again that I might have spoken too soo

Re: [x86 SSE] Improve handling of ternlog instructions in i386/sse.md (v2)

2024-05-20 Thread Alexander Monakov
Hello! I looked at ternlog a bit last year, so I'd like to offer some drive-by comments. If you want to tackle them in a follow-up patch, or leave for someone else to handle, please let me know. On Fri, 17 May 2024, Roger Sayle wrote: > This revised patch has been tested on x86_64-pc-linux-gnu

RE: [PATCH] PHIOPT: Don't transform minmax if middle bb contains a phi [PR115143]

2024-05-20 Thread Andrew Pinski (QUIC)
> -Original Message- > From: Richard Biener > Sent: Sunday, May 19, 2024 11:55 AM > To: Andrew Pinski (QUIC) > Cc: gcc-patches@gcc.gnu.org > Subject: Re: [PATCH] PHIOPT: Don't transform minmax if > middle bb contains a phi [PR115143] > > > > > Am 19.05.2024 um 01:12 schrieb Andrew Pins

Re: [C PATCH, v2] Fix for redeclared enumerator initialized with different type [PR115109]

2024-05-20 Thread Joseph Myers
On Sun, 19 May 2024, Martin Uecker wrote: > c23 specifies that the type of a redeclared enumerator is the one of the > previous declaration. Convert initializers with different type > accordingly > and add -Woverflow warning. It doesn't make sense to use -Woverflow. Either the valu

Re: [C PATCH] Fix for some variably modified types not being recognized [PR114831]

2024-05-20 Thread Joseph Myers
On Sat, 18 May 2024, Martin Uecker wrote: > We did not propagate C_TYPE_VARIABLY_MODIFIED to pointers in all > cases.   I added this directly in two places, but maybe we should > check all cases of build_pointer_type or integrate this into  > c_build_pointer_type and use this everywhere (but I do

RE: [PATCH] aarch64: Fold vget_low_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-20 Thread Pengxuan Zheng (QUIC)
> On Mon, May 20, 2024 at 2:57 AM Richard Sandiford > wrote: > > > > Pengxuan Zheng writes: > > > This patch folds vget_low_* intrinsics to BIT_FILED_REF to open up > > > more optimization opportunities for gimple optimizers. > > > > > > While we are here, we also remove the vget_low_* definition

Re: committed: Stepping down as maintainer for ARC and Epiphany

2024-05-20 Thread Gerald Pfeifer
On Fri, 7 Jul 2023, Joern Wolfgang Rennecke wrote: > Stepping down as maintainer for ARC and Epiphany > > * MAINTAINERS (CPU Port Maintainers): Remove myself as ARC end > epiphany maintainer. > (Write After Approval): Add myself. Hmm, is it possible you committed this last

Re: [PATCH] aarch64: Fold vget_low_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-20 Thread Andrew Pinski
On Mon, May 20, 2024 at 2:57 AM Richard Sandiford wrote: > > Pengxuan Zheng writes: > > This patch folds vget_low_* intrinsics to BIT_FILED_REF to open up more > > optimization opportunities for gimple optimizers. > > > > While we are here, we also remove the vget_low_* definitions from > > arm_

Re: [Patch, aarch64, middle-end] Move pair_fusion pass from aarch64 to middle-end

2024-05-20 Thread Alex Coplan
On 20/05/2024 18:44, Alex Coplan wrote: > Hi Ajit, > > On 20/05/2024 21:50, Ajit Agarwal wrote: > > Hello Alex/Richard: > > > > Move pair fusion pass from aarch64-ldp-fusion.cc to middle-end > > to support multiple targets. > > > > Common infrastructure of load store pair fusion is divided into

CFG edge visualization to path-printing bootstrap failure

2024-05-20 Thread David Edelsohn
Hi, David Unfortunately r15-636-g770657d02c986c causes a bootstrap failure on AIX when building f951 in stage2. cc1 and cc1plus link successfully. There doesn't seem to be a similar failure for powerpc64-linux BE or LE. The failure is ld: 0711-317 ERROR: Undefined symbol: _ZTV29range_label_for_

Re: [COMMITTED] Regenerate riscv.opt.urls and i386.opt.urls

2024-05-20 Thread Mark Wielaard
Hi, On Mon, 2024-05-20 at 12:37 -0400, David Malcolm wrote: > On Mon, 2024-05-20 at 16:19 +, Jiang, Haochen wrote: > > Thanks for your help! I haven't noticed this file is newly added to > > GCC. > > I suppose that is why the buildbot is reporting something the whole > > afternoon for me. > >

epilogue expansion alloca codepath (was Re: [PATCH v2 2/2] RISC-V: avoid LUI based const mat in prologue/epilogue expansion [PR/105733])

2024-05-20 Thread Vineet Gupta
On 5/14/24 08:44, Jeff Law wrote: >>> I was able to find the summary info: >>> Tests that now fail, but worked before (15 tests): libgomp: libgomp.fortran/simd7.f90   -O0  execution test libgomp: libgomp.fortran/task2.f90   -O0  execution test libgomp: libgomp.fortran/vla2.f90  

Re: [COMMITTED] Regenerate riscv.opt.urls and i386.opt.urls

2024-05-20 Thread David Malcolm
On Mon, 2024-05-20 at 16:19 +, Jiang, Haochen wrote: > Thanks for your help! I haven't noticed this file is newly added to > GCC. > I suppose that is why the buildbot is reporting something the whole > afternoon for me. > > So just for confirm, does that mean we will always need to run > gcc/r

Re: [PATCH] middle-end: Expand {u|s}dot product support in autovectorizer

2024-05-20 Thread Richard Sandiford
Richard Biener writes: > On Fri, May 17, 2024 at 11:56 AM Tamar Christina > wrote: >> >> > -Original Message- >> > From: Richard Biener >> > Sent: Friday, May 17, 2024 10:46 AM >> > To: Tamar Christina >> > Cc: Victor Do Nascimento ; gcc- >> > patc...@gcc.gnu.org; Richard Sandiford ; Ri

RE: [COMMITTED] Regenerate riscv.opt.urls and i386.opt.urls

2024-05-20 Thread Jiang, Haochen
Thanks for your help! I haven't noticed this file is newly added to GCC. I suppose that is why the buildbot is reporting something the whole afternoon for me. So just for confirm, does that mean we will always need to run gcc/regenerate-opt-urls.py after adding or removing options in GCC? My curre

Re: [PATCH 00/12] aarch64: Extend aarch64_feature_flags to 128 bits

2024-05-20 Thread Richard Sandiford
Andrew Carlotti writes: > On Fri, May 17, 2024 at 04:45:05PM +0100, Richard Sandiford wrote: >> Andrew Carlotti writes: >> > The end goal of the series is to change the definition of >> > aarch64_feature_flags >> > from a uint64_t typedef to a class with 128 bits of storage. This class >> > us

[committed] PATCH for Re: Stepping down as maintainer for ARC and Epiphany

2024-05-20 Thread Gerald Pfeifer
On Wed, 5 Jul 2023, Joern Rennecke wrote: > I haven't worked with these targets in years and can't really do > sensible maintenance or reviews of patches for them. I am currently > working on optimizations for other ports like RISC-V. I noticed MAINTAINERS was not updated, so pushed the patch be

[PATCH v3] aarch64: Fix normal returns inside functions which use eh_returns [PR114843]

2024-05-20 Thread Wilco Dijkstra
Hi Andrew, A few comments on the implementation, I think it can be simplified a lot: > +++ b/gcc/config/aarch64/aarch64.h > @@ -700,8 +700,9 @@ constexpr auto AARCH64_FL_DEFAULT_ISA_MODE = > AARCH64_FL_SM_OFF; > #define DWARF2_UNWIND_INFO 1 > > /* Use R0 through R3 to pass exception handling

Re: [Patch, aarch64] Further renaming of generic code

2024-05-20 Thread Richard Sandiford
Ajit Agarwal writes: > Hello Alex/Richard: > > Renaming of generic code is done to make target independent > and target dependent code to support multiple targets. > > Target independent code is the Generic code with pure virtual function > to interface betwwen target independent and dependent cod

[Patch, aarch64] Further renaming of generic code

2024-05-20 Thread Ajit Agarwal
Hello Alex/Richard: Renaming of generic code is done to make target independent and target dependent code to support multiple targets. Target independent code is the Generic code with pure virtual function to interface betwwen target independent and dependent code. Target dependent code is the i

Re: [PATCH] wwwdocs: contribute.html: Update consensus on patch content.

2024-05-20 Thread Nick Clifton
Hi Christophe, I have a follow-up one: I think the same applies to binutils, but I don't think any maintainer / contributor expressed an opinion, and IIUC patch policy for binutils is (lightly) documented at https://sourceware.org/binutils/wiki/HowToContribute Maybe Nick can update it? Done.

Re: [PATCH 00/12] aarch64: Extend aarch64_feature_flags to 128 bits

2024-05-20 Thread Andrew Carlotti
On Fri, May 17, 2024 at 04:45:05PM +0100, Richard Sandiford wrote: > Andrew Carlotti writes: > > The end goal of the series is to change the definition of > > aarch64_feature_flags > > from a uint64_t typedef to a class with 128 bits of storage. This class > > uses > > operator overloading to m

RE: [PATCH v1 1/2] Match: Support branch form for unsigned SAT_ADD

2024-05-20 Thread Tamar Christina
Hi Pan, > -Original Message- > From: pan2...@intel.com > Sent: Monday, May 20, 2024 12:01 PM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > ; richard.guent...@gmail.com; Pan Li > > Subject: [PATCH v1 1/2] Match: Support branch form for u

RE: [PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-20 Thread Li, Pan2
> See e.g. bitmask_inv_cst_vector_p which is also defined in tree.h/tree.cc. Aha, I tried this way first and consider that maybe it should be something like types_match. Thus, sent the v1 for this, will go bitmask_inv_cst_vector_p in v3. Pan -Original Message- From: Tamar Christina Se

[COMMITTED] Regenerate riscv.opt.urls and i386.opt.urls

2024-05-20 Thread Mark Wielaard
risc-v added an -mfence-tso option. i386 removed Xeon Phi ISA support options. But the opt.urls files weren't regenerated. Fixes: a6114c2a6911 ("RISC-V: Implement -m{,no}fence-tso") Fixes: e1a7e2c54d52 ("i386: Remove Xeon Phi ISA support") gcc/ChangeLog: * config/riscv/riscv.opt.urls: Re

RE: [PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-20 Thread Tamar Christina
> -Original Message- > From: pan2...@intel.com > Sent: Sunday, May 19, 2024 5:17 AM > To: gcc-patches@gcc.gnu.org > Cc: juzhe.zh...@rivai.ai; kito.ch...@gmail.com; Tamar Christina > ; richard.guent...@gmail.com; Pan Li > > Subject: [PATCH v1] Match: Extract integer_types_ternary_match hel

[PATCH v1 2/2] RISC-V: Add test cases for branch form unsigned SAT_ADD

2024-05-20 Thread pan2 . li
From: Pan Li After we support branch form unsigned SAT_ADD from the middle end. Add more tests case to cover the functionarlities. The below test suites are passed. * The rv64gcv fully regression test. gcc/testsuite/ChangeLog: * gcc.target/riscv/sat_arith.h: Add branch form test macro

[PATCH v1 1/2] Match: Support branch form for unsigned SAT_ADD

2024-05-20 Thread pan2 . li
From: Pan Li This patch would like to support the branch form for unsigned SAT_ADD. For example as below: uint64_t sat_add (uint64_t x, uint64_t y) { return (uint64_t) (x + y) >= x ? (x + y) : -1; } Different to the branchless version, we leverage the simplify to convert the branch version

RE: [PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-20 Thread Li, Pan2
Thanks Andrew for comments, updated in v2. Pan From: Andrew Pinski Sent: Sunday, May 19, 2024 12:25 PM To: Li, Pan2 Cc: GCC Patches ; 钟居哲 ; Kito Cheng ; Tamar Christina ; Richard Guenther Subject: Re: [PATCH v1] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC] On

[PATCH v2] Match: Extract integer_types_ternary_match helper to avoid code dup [NFC]

2024-05-20 Thread pan2 . li
From: Pan Li There are sorts of match pattern for SAT related cases, there will be some duplicated code to check the dest, op_0, op_1 are same tree types. Aka ternary tree type matches. Thus, extract one helper function to do this and avoid match code duplication. The below test suites are pas

Re: [PATCH] AArch64: Improve costing of ctz

2024-05-20 Thread Richard Sandiford
Wilco Dijkstra writes: > Improve costing of ctz - both TARGET_CSSC and vector cases were not handled > yet. > > Passes regress & bootstrap - OK for commit? > > gcc: > * config/aarch64/aarch64.cc (aarch64_rtx_costs): Improve CTZ costing. Ok, thanks. Richard > diff --git a/gcc/config/aar

Re: [PATCH] AArch64: Fix printing of 2-instruction alternatives

2024-05-20 Thread Richard Sandiford
Wilco Dijkstra writes: > Add missing '\' in 2-instruction movsi/di alternatives so that they are > printed on separate lines. > > Passes bootstrap and regress, OK for commit once stage 1 reopens? > > gcc: > * config/aarch64/aarch64.md (movsi_aarch64): Use '\;' to force > newline in

Re: [PATCH] aarch64: Fold vget_low_* intrinsics to BIT_FIELD_REF [PR102171]

2024-05-20 Thread Richard Sandiford
Pengxuan Zheng writes: > This patch folds vget_low_* intrinsics to BIT_FILED_REF to open up more > optimization opportunities for gimple optimizers. > > While we are here, we also remove the vget_low_* definitions from arm_neon.h > and > use the new intrinsics framework. > > PR target/102

[Patch, fortran] PR103312 - [11/12/13/14/15 Regression] ICE in gfc_find_component since r9-1098-g3cf89a7b992d483e

2024-05-20 Thread Paul Richard Thomas
Hi All, I don't think that this PR is really a regression although the fact that it is marked as such brought it to my attention :-) The fix turned out to be remarkably simple. It was found after going down a silly number of rabbit holes, though! The chunk in dependency.cc is probably more elabo

[PATCHv2] Optab: add isnormal_optab for __builtin_isnormal

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isnormal. The normal check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

Re: [PATCH] RISC-V: Enable vectorization for vect-early-break_124-pr114403.c

2024-05-20 Thread juzhe.zh...@rivai.ai
CC Robin who knows better than me in case of scheduling model in RISC-V juzhe.zh...@rivai.ai From: Li Xu Date: 2024-05-20 15:59 To: gcc-patches CC: kito.cheng; palmer; tamar.christina; richard.guenther; Richard.Sandiford; juzhe.zhong; zhengyu; pan2.li; xuli Subject: [PATCH] RISC-V: Enable vec

[PATCHv2] Optab: add isfinite_optab for __builtin_isfinite

2024-05-20 Thread HAO CHEN GUI
Hi, This patch adds an optab for __builtin_isfinite. The finite check can be implemented on rs6000 by a single instruction. It needs an optab to be expanded to the certain sequence of instructions. The subsequent patches will implement the expand on rs6000. Compared to previous version, the

Re: [Patch, aarch64] v7: Preparatory patch to place target independent and dependent changed code in one file

2024-05-20 Thread Richard Sandiford
Ajit Agarwal writes: > Hello Alex/Richard: > > All comments are addressed. > > Common infrastructure of load store pair fusion is divided into target > independent and target dependent changed code. > > Target independent code is the Generic code with pure virtual function > to interface between t

[PATCH] RISC-V: Enable vectorization for vect-early-break_124-pr114403.c

2024-05-20 Thread Li Xu
From: xuli Because "targetm.slow_unaligned_access" is set to true by default (aka -mtune=rocket) for RISC-V, it causes the __builtin_memcpy with 8 bytes failed to folded into int64 assignment during ccp1. So adding "-mtune=generic-ooo" to the RISC-V target can vectorize vect-early-break_124-pr11

[COMMITTED 30/30] ada: Allow 'others' in formal packages with overloaded formals

2024-05-20 Thread Marc Poulhiès
From: Bob Duff If a generic package has two or more generic formal parameters with the same defining name (which can happen only for formal subprograms), then RM-12.7(4.1/3) disallows named associations in a corresponding formal package. This is not intended to cover "others => <>". This patch a

[COMMITTED 28/30] ada: Fix internal error on nested aggregate in conditional expression

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou This plugs a loophole in the change improving code generation for nested aggregates present in conditional expressions: once the delayed expansion is chosen for the nested aggregate, the expansion of the parent aggregate cannot be left to the back-end and the test must be adju

[COMMITTED 27/30] ada: Get rid of secondary stack for indefinite record types with size clause

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou This change eliminates the use of the secondary stack for indefinite record types for which a valid (object) size clause is specified. In accordance with the RM, the compiler accepts (object) size clauses on such types only if all the components, including those of the varian

[COMMITTED 29/30] ada: Add direct workaround for limitations of RTSfind mechanism

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou This adds a direct workaround for the spurious compilation errors caused by the presence of preconditions/postconditions in the Interfaces.C unit, which trip on limitations of the RTSfind mechanism when it comes to visibility, as well as removes an indirect workaround that was

[COMMITTED 19/30] ada: Fix list of attributes defined by Ada 2012

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Recognize references to attributes Old, Overlaps_Storage and Result as language-defined in Ada 2012 and implementation-defined in earlier versions of Ada. Other attributes introduced by Ada 2012 RM are correctly categorized. This change only affects code with restriction No_

[COMMITTED 25/30] ada: Add Is_Base_Type predicate to C interface

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou This also documents what the predicate effectively does. gcc/ada/ * einfo-utils.ads (Is_Base_Type): Move to Miscellaneous Subprograms section and add description. * fe.h (Is_Base_Type): Declare. Tested on x86_64-pc-linux-gnu, committed on master. --

[COMMITTED 18/30] ada: Apply restriction No_Implementation_Attributes to source nodes only

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Restriction No_Implementation_Attributes must not be applied to nodes that come from expansion. In particular, it must not be applied to Object_Size, which is implementation-defined attribute before Ada 2022, but appears in expansion of tagged types since Ada 95. gcc/ada/

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

2024-05-20 Thread Marc Poulhiès
From: Justin Squirek This patch relaxes the restriction on 'Super such that it can apply to abstract type objects. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Remove restriction on 'Super for abstract types. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem

[COMMITTED 17/30] ada: Remove repeated condition in check for implementation attributes

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup; semantics is unaffected. gcc/ada/ * sem_attr.adb (Analyze_Attribute): Remove condition that is already checked by an enclosing IF statement. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.adb | 2 +- 1 file changed,

[COMMITTED 26/30] ada: Formal package comment corrections in sinfo.ads

2024-05-20 Thread Marc Poulhiès
From: Bob Duff Misc comment corrections and clarifications in sinfo.ads related to generic formal packages. gcc/ada/ * sinfo.ads: Misc comment corrections and clarifications. The syntax for GENERIC_ASSOCIATION and FORMAL_PACKAGE_ACTUAL_PART was wrong. Emphasize

[COMMITTED 20/30] ada: Fix list of implementation-defined attributes

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Several of the implementation-defined attributes were wrongly recognized as defined by the Ada RM. This change only affects code with restriction No_Implementation_Attributes. gcc/ada/ * sem_attr.ads (Attribute_Impl_Def): Fix list of implementation-defined

[COMMITTED 23/30] ada: Error on instantiation of generic containing legal container aggregate

2024-05-20 Thread Marc Poulhiès
From: Gary Dismukes When a container aggregate for a predefined container type (such as a Vector type) that has an iterated component association occurs within a generic unit and that generic is instantiated, the compiler reports a spurious error message "iterated component association can only a

[COMMITTED 10/30] ada: Another small cleanup about allocators and aggregates

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou This eliminates a few more oddities present in the expander for allocators and aggregates nested in allocators and other constructs: - Convert_Aggr_In_Allocator takes both the N_Allocator and the aggregate as parameters, while the sibling procedures Convert_Aggr_In_Assi

[COMMITTED 24/30] ada: Error on instantiation of generic containing legal container aggregate

2024-05-20 Thread Marc Poulhiès
From: Gary Dismukes When a container aggregate for a predefined container type (such as a Vector type) that has an iterated component association occurs within a generic unit and that generic is instantiated, the compiler reports a spurious error message "iterated component association can only a

[COMMITTED 13/30] ada: Extend expansion delaying mechanism to conditional expressions

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou When an aggregate that needs to be converted into a series of assignments is present in an expression of a parent aggregate, or in the expression of an allocator, an object declaration, or an assignment in very specific cases, its expansion is delayed until its parent itself i

[COMMITTED 12/30] ada: Resolve ACATS compilation and execution issues with container aggregates

2024-05-20 Thread Marc Poulhiès
From: Gary Dismukes This change set addresses various compilation and execution problems encountered in the draft ACATS tests for container aggregates: C435001 (container aggregates with Assign_Indexed) C435002 (container aggregates with Add_Unnamed) C435003 (container aggregates with Add_Named)

[COMMITTED 11/30] ada: Fix incorrect free with Task_Info pragma

2024-05-20 Thread Marc Poulhiès
From: Ronan Desplanques Before this patch, on Linux, the procedure System.Task_Primitives.Operations.Set_Task_Affinity called CPU_FREE on instances of cpu_set_t_ptr that it didn't own when the obsolescent Task_Info pragma was in play. This patch fixes that issue. gcc/ada/ * libgnarl/s-t

[COMMITTED 22/30] ada: Handle accessibility calculations for 'First and 'Last

2024-05-20 Thread Marc Poulhiès
From: Justin Squirek This patch fixes a crash in the compiler whereby calculating the accessibility level of of a local variable whose original expression is an 'First on an array type led to an error during compilation. gcc/ada/ * accessibility.adb (Accessibility_Level): Add cases for

[COMMITTED 14/30] ada: Tweak handling of thread ID on POSIX

2024-05-20 Thread Marc Poulhiès
From: Ronan Desplanques This patch changes the task initialization subprograms on POSIX platforms so that the thread ID of an ATCB is only set once. This has the advantage of getting rid of the Atomic aspect on the corresponding record component, and silences a Helgrind warning about a data race.

[COMMITTED 09/30] ada: Fix static 'Img for enumeration type with Discard_Names

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Fix a short-circuit folding of 'Img for enumeration type, which wrongly ignored Discard_Names and exposed enumeration literals. gcc/ada/ * sem_attr.adb (Eval_Attribute): Handle enumeration type with Discard_Names. Tested on x86_64-pc-linux-gnu, committed on

[COMMITTED 01/30] ada: Rework and augment documentation on strict aliasing

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou The documentation was originally centered around pragma No_Strict_Aliasing and pragma Universal_Aliasing was mentioned only as an afterthought. It also contained a warning about the usage of overlays implemented by means of address clauses that has been obsolete for long. gc

[COMMITTED 16/30] ada: Use discrete choice list in declaration of universal type attributes

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * sem_attr.ads (Universal_Type_Attribute): Simplify using array aggregate syntax with discrete choice list. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.ads | 62 ++

[COMMITTED 15/30] ada: Fix style in list of implementation-defined attributes

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Code cleanup. gcc/ada/ * sem_attr.ads (Attribute_Impl_Def): Fix style in comment. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/sem_attr.ads | 8 1 file changed, 8 insertions(+) diff --git a/gcc/ada/sem_attr.ads b/gcc/ada/sem_attr.ads

[COMMITTED 08/30] ada: Fix for attribute Width on enumeration types with Discard_Name

2024-05-20 Thread Marc Poulhiès
From: Piotr Trojanek Fix computation of attribute 'Width for enumeration types with Discard_Name aspect enabled. gcc/ada/ * exp_imgv.adb (Expand_Width_Attribute): Fix for 'Width that is computed at run time. * sem_attr.adb (Eval_Attribute): Fix for 'Width that is compute

[COMMITTED 05/30] ada: One more adjustment coming from aliasing considerations

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou It is needed on PowerPC platforms because of specific calling conventions. gcc/ada/ * libgnat/g-sothco.ads (In_Addr): Add aspect Universal_Aliasing. Tested on x86_64-pc-linux-gnu, committed on master. --- gcc/ada/libgnat/g-sothco.ads | 7 +-- 1 file changed, 5

[COMMITTED 07/30] ada: Use System.Address for address computation in System.Pool_Global

2024-05-20 Thread Marc Poulhiès
From: Sebastian Poeplau Some architectures don't let us convert System.Storage_Elements.Integer_Address back to a valid System.Address. Using the arithmetic operations on System.Address from System.Storage_Elements prevents the problem while leaving semantics unchanged. gcc/ada/ * libgn

[COMMITTED 06/30] ada: Reject too-strict alignment specifications.

2024-05-20 Thread Marc Poulhiès
From: Steve Baird For a discrete (or fixed-point) type T, GNAT requires that T'Object_Size shall be a multiple of T'Alignment * 8 . GNAT also requires that T'Object_Size shall be no larger than Standard'Max_Integer_Size. For a sufficiently-large alignment specification, these requirements can con

[COMMITTED 04/30] ada: Detect only conflict with synomyms of max queue length

2024-05-20 Thread Marc Poulhiès
From: Jose Ruiz Use of duplicated representation aspect is detected elsewhere so we do not try to detect them here to avoid repetition of messages. gcc/ada/ * sem_prag.adb (Analyze_Pragma): Exclude detection of duplicates because they are detected elsewhere. Tested on x86_64-pc

[COMMITTED 02/30] ada: Small cleanup in System.Finalization_Primitives unit

2024-05-20 Thread Marc Poulhiès
From: Eric Botcazou It has been made possible by recent changes. gcc/ada/ * libgnat/s-finpri.ads (Collection_Node): Move to private part. (Collection_Node_Ptr): Likewise. (Header_Alignment): Change to declaration and move completion to private part. (Head

[COMMITTED 03/30] ada: Implement representation aspect Max_Entry_Queue_Length

2024-05-20 Thread Marc Poulhiès
From: Jose Ruiz Enforce Max_Entry_Queue_Length (and its synonym Max_Entry_Queue_Depth) when applied to individual protected entries. gcc/ada/ * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Clarify comments. * sem_prag.adb (Analyze_Pragma): Check for duplicates

  1   2   >