Re: [PATCH V2] RISC-V: Fine tune vmadc/vmsbc RA constraint

2023-04-25 Thread Kito Cheng via Gcc-patches
Committed On Wed, Apr 26, 2023 at 12:48 PM wrote: > > From: Ju-Zhe Zhong > > gcc/ChangeLog: > > * config/riscv/vector.md: Refine vmadc/vmsbc RA constraint. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/base/narrow_constraint-13.c: New test. > *

ping: [PATCH V2] rs6000: Add new patterns rlwinm with mask

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi, I would like to ping this for comments. https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611821.html In this patch, "subreg:DI (x:SI)" is used. I' thinking that this may be a concern, while it maybe acceptable for current code. BR, Jeff (Jiufu) Jiufu Guo writes: > Hi, > > Compare

ping: [PATCH] rs6000: Enable const_anchor for 'addi'

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi, I'm thinking that we may enable this patch for stage1, so ping it. https://gcc.gnu.org/pipermail/gcc-patches/2022-October/603530.html BR, Jeff (Jiufu) Jiufu Guo writes: > Hi, > > There is a functionality as const_anchor in cse.cc. This const_anchor > supports to generate new constants

[PATCH V2] RISC-V: Fine tune vmadc/vmsbc RA constraint

2023-04-25 Thread juzhe . zhong
From: Ju-Zhe Zhong gcc/ChangeLog: * config/riscv/vector.md: Refine vmadc/vmsbc RA constraint. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/base/narrow_constraint-13.c: New test. * gcc.target/riscv/rvv/base/narrow_constraint-14.c: New test. *

Re: Re: [PATCH] RISC-V: Fix redundant vmv1r.v instruction in vmsge.vx codegen

2023-04-25 Thread Kito Cheng via Gcc-patches
Committed to trunk On Mon, Apr 24, 2023 at 11:09 AM juzhe.zh...@rivai.ai wrote: > > I can push codes yet. Can you push them for me? > > > > juzhe.zh...@rivai.ai > > From: Jeff Law > Date: 2023-04-22 04:42 > To: juzhe.zhong; gcc-patches > CC: kito.cheng; palmer > Subject: Re: [PATCH] RISC-V: Fix

Re: Re: [PATCH] RISC-V: Fine tune gather load RA constraint

2023-04-25 Thread Kito Cheng via Gcc-patches
Committed to trunk On Mon, Apr 24, 2023 at 11:06 AM juzhe.zh...@rivai.ai wrote: > > Adding earlyclobber is to make dest operand do not overlap with source > operand. > For example: > for gather load, vluxei.v v8,(a5),v8 is illegal according to RVV ISA. > GCC is using same way as LLVM which is

Ping^^ [PATCH 0/4] rs6000: build constant via li/lis;rldicX

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi, I would like to ping these patches. [0/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611286.html [1/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611287.html [2/4] https://gcc.gnu.org/pipermail/gcc-patches/2023-February/611288.html [3/4]

Re: Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread juzhe.zh...@rivai.ai
Thanks Richard so much. >> I don't think that's guaranteed by the proposed definition of WHILE_LEN. >> The first int64_t WHILE_LEN could come up short, and return something >> less than VF/2. I am so sorry that the comments of vect_set_loop_controls_by_while_len is totally misleading and

[PATCH V3] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread juzhe . zhong
From: Juzhe-Zhong This patch address all comments from Richard && Bernhard. Fix all codes following their comments: 1. Remove ifn-specific handling of WHILE_LEN, so there is no change in internal-fn.cc in this patch. 2. Add comments for changing interface of "create_iv" function. 3.

RE: [PATCH v3] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal

2023-04-25 Thread Li, Pan2 via Gcc-patches
Thanks a lot, kito, will pay more attention for the changelogs. Pan From: Kito Cheng Sent: Wednesday, April 26, 2023 11:30 AM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang Subject: Re: [PATCH v3] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal Committed,

Re: [PATCH v3] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal

2023-04-25 Thread Kito Cheng via Gcc-patches
Committed, thanks! On Tue, Apr 25, 2023 at 10:29 PM wrote: > From: Pan Li > > In most architecture the precision_size of vbool*_t types are caculated > like as the multiple of the type size. For example: > precision_size = type_size * 8 (aka, bit count per bytes). > > Unfortunately, some

Ping^^^ [PATCH V4 2/2] rs6000: use li;x?oris to build constant

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi, I would like to have a gentle ping for this. https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608292.html BR, Jeff (Jiufu) Jiufu Guo via Gcc-patches writes: > Hi, > > Gentle ping: > https://gcc.gnu.org/pipermail/gcc-patches/2022-December/608292.html > > BR, > Jeff (Jiufu) > > >

Re: [PATCH 1/3 V2] RISC-V: Add auto-vectorization compile option for RVV

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/19/23 10:42, juzhe.zh...@rivai.ai wrote: From: Ju-Zhe Zhong This patch is adding 2 compile option for RVV auto-vectorization. 1. -param=riscv-autovec-preference= This option is to specify the auto-vectorization approach for RVV. Currently, we only support scalable and

Re: [PATCH 1/3] RISC-V: Add auto-vectorization compile option for RVV

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/20/23 05:08, Richard Biener wrote: On Wed, Apr 19, 2023 at 6:38 PM wrote: From: Ju-Zhe Zhong This patch is adding 2 compile option for RVV auto-vectorization. 1. -param=riscv-autovec-preference= This option is to specify the auto-vectorization approach for RVV. Currently, we

ping: [PATCH V2] rs6000: Enhance lowpart/highpart DI->SF by mtvsrws/mtvsrd

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi I would like to ping this patch for stage1: https://gcc.gnu.org/pipermail/gcc-patches/2023-February/612168.html BR, Jeff (Jiufu) Jiufu Guo writes: > Hi, > > Compare with previous version: > https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609654.html > This patch does not use UNSPEC

Re: [PATCH] rs6000: mark tieable between INT and FLOAT

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi, I would ping this patch for stage1: https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609504.html BR, Jeff (Jiufu) Jiufu Guo via Gcc-patches writes: > Hi, > > Gently Ping: > https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609504.html > > BR, > Jeff (Jiufu) > > > Jiufu Guo

Re: [PATCH v4 00/10] RISC-V: Add autovec support

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 09:26, Palmer Dabbelt wrote: On Mon, 17 Apr 2023 11:36:51 PDT (-0700), colli...@rivosinc.com wrote: This series of patches adds foundational support for RISC-V auto-vectorization support. These patches are based on the current upstream rvv vector intrinsic support and is not a

Re: [PATCH v4 01/10] RISC-V: Add new predicates and function prototypes

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/18/23 18:54, Kito Cheng via Gcc-patches wrote: Could you please move the new function declarations and new code to +Enum +Name(riscv_vector_lmul) Type(enum riscv_vector_lmul_enum) +The possible vectorization factor: + +EnumValue +Enum(riscv_vector_lmul) String(1) Value(RVV_LMUL1) +

Re: [PATCH V3] rs6000: Load high and low part of 64bit constant independently

2023-04-25 Thread Jiufu Guo via Gcc-patches
Hi, I would ping this patch for stage1. https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609373.html BR, Jeff (Jiufu) Jiufu Guo via Gcc-patches writes: > Hi, > > I would like to ping this patch: > https://gcc.gnu.org/pipermail/gcc-patches/2023-January/609373.html > > BR, > Jeff (Jiufu)

Re: RISC-V: avoid splitting small constants in bcrli_nottwobits patterns

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/20/23 14:11, Jivan Hakobyan via Gcc-patches wrote: and_nottwobits.patch RISC-V: avoid splitting small constant in *bclri_nottwobits and *bclridisi_nottwobit patterns gcc/ * config/riscv/bitmanip.md Updated predicats of bclri_nottwobits and

Re: [PATCH] PR tree-optimization/109417 - Check if dependency is valid before using in may_recompute_p.

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/24/23 07:51, Andrew MacLeod wrote: Its not a real cache..  its merely a statement shortcut in dependency analysis to avoid re-parsing statements every time we look at them for dependency analysis It is not suppose to be used for anything other than dependency checking.   ie, if an

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 01:21, Richard Biener wrote: On Tue, Apr 25, 2023 at 1:05 AM Jeff Law wrote On 4/24/23 02:06, Richard Biener via Gcc-patches wrote: On Fri, Apr 21, 2023 at 11:01 PM Philipp Tomsich wrote: Any guidance on the next steps for this patch? I think we want to perform this

Re: [RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 03:53, Kito Cheng wrote: I am not sure if we should accept this on gcc trunk without binutils support? Let's get the binutils bits in first. I don't mind owning that review. It just hasn't been a priority due to the gcc-13 freeze. jeff

Re: [PATCH v7] RISCV: Inline subword atomic ops

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 09:20, Patrick O'Neill wrote: On 4/24/23 22:52, Jeff Law wrote: On 4/18/23 15:41, Patrick O'Neill wrote: RISC-V has no support for subword atomic operations; code currently generates libatomic library calls. This patch changes the default behavior to inline subword atomic

Re: [xstormy16 PATCH] Add support for byte and word swapping instructions.

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 14:20, Roger Sayle wrote: This patch adds support for xstormy16's swpb (swap bytes) and swpw (swap words) instructions. The most obvious application of these to implement the __builtin_bswap16 and __builtin_bswap32 intrinsics. Currently, __builtin_bswap16 is implemented as: foo:

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Li, Pan2 via Gcc-patches
Aligned with Ju-Zhe, will take the option 2 for the VMS{Compare} optimization. Pan From: Li, Pan2 Sent: Tuesday, April 25, 2023 10:11 PM To: Kito Cheng Cc: Kito Cheng ; Jeff Law ; juzhe.zh...@rivai.ai; gcc-patches ; Wang, Yanzhang Subject: RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1)

[PATCH] Add myself to write after approval

2023-04-25 Thread juzhe . zhong
From: Ju-Zhe Zhong ChangeLog: * MAINTAINERS: Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4fbfa01c111..b91f49dec96 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -715,6 +715,7 @@ Shujing Zhao

Re: [Committed] riscv: relax splitter restrictions for creating pseudos

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 14:20, Vineet Gupta wrote: Just a note, there are some regressions in this table.  For example xz input #2.  So to be fair when making comparisons it's probably worth noting the regressions as well as improvements. Fair point, but in my defense I dropped anything under 0.1 %

[xstormy16 PATCH] Add support for byte and word swapping instructions.

2023-04-25 Thread Roger Sayle
This patch adds support for xstormy16's swpb (swap bytes) and swpw (swap words) instructions. The most obvious application of these to implement the __builtin_bswap16 and __builtin_bswap32 intrinsics. Currently, __builtin_bswap16 is implemented as: foo:mov r7,r2 shl r7,#8

Re: [Committed] riscv: relax splitter restrictions for creating pseudos

2023-04-25 Thread Vineet Gupta
On 4/25/23 13:03, Jeff Law wrote: On 4/25/23 11:25, Vineet Gupta wrote: On 4/18/23 11:36, Jeff Law via Gcc-patches wrote: On 4/18/23 08:36, Vineet Gupta wrote: [partial addressing of PR/109279] RISCV splitters have restrictions to not create pesudos due to a combine limitatation.

Re: [Committed] riscv: relax splitter restrictions for creating pseudos

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 11:25, Vineet Gupta wrote: On 4/18/23 11:36, Jeff Law via Gcc-patches wrote: On 4/18/23 08:36, Vineet Gupta wrote: [partial addressing of PR/109279] RISCV splitters have restrictions to not create pesudos due to a combine limitatation. And despite this being a

Re: [pushed] c++: constant, array, lambda, template [PR108975]

2023-04-25 Thread Jason Merrill via Gcc-patches
On 4/25/23 10:55, Patrick Palka wrote: On Sat, 18 Mar 2023, Patrick Palka wrote: On Fri, 17 Mar 2023, Jason Merrill via Gcc-patches wrote: Tested x86_64-pc-linux-gnu, applying to trunk. -- 8< -- When a lambda refers to a constant local variable in the enclosing scope, we tentatively

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On 25 April 2023 18:58:10 CEST, Richard Sandiford via Gcc-patches wrote: >juzhe.zh...@rivai.ai writes: >> diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc >> index 6e81dc05e0e..5f44def90d3 100644 >> diff --git a/gcc/tree-ssa-loop-manip.cc b/gcc/tree-ssa-loop-manip.cc >> index

[Committed] riscv: relax splitter restrictions for creating pseudos

2023-04-25 Thread Vineet Gupta
On 4/18/23 11:36, Jeff Law via Gcc-patches wrote: On 4/18/23 08:36, Vineet Gupta wrote: [partial addressing of PR/109279] RISCV splitters have restrictions to not create pesudos due to a combine limitatation. And despite this being a split-during-combine limitation, all split passes take

Re: [PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread Richard Sandiford via Gcc-patches
juzhe.zh...@rivai.ai writes: > diff --git a/gcc/internal-fn.cc b/gcc/internal-fn.cc > index 6e81dc05e0e..5f44def90d3 100644 > --- a/gcc/internal-fn.cc > +++ b/gcc/internal-fn.cc > @@ -127,6 +127,7 @@ init_internal_fns () > #define cond_binary_direct { 1, 1, true } > #define cond_ternary_direct {

Re: [PATCH] gcc/m2: Drop references to $(P)

2023-04-25 Thread Arsen Arsenović via Gcc-patches
Richard Biener writes: > If it doesn't show any issues after a while on trunk it's OK for 13.2 I > think. Thanks, I'll re-propose it later then. Have a lovely day! -- Arsen Arsenović signature.asc Description: PGP signature

Re: Unloop no longer looping loops in loop-ch

2023-04-25 Thread Jan Hubicka via Gcc-patches
> On 25 April 2023 17:12:50 CEST, Jan Hubicka via Gcc-patches > wrote: > > + fprintf (stderr, "Bingo\n"); > > You forgot to remove that.. > Do we prune Bingo in the testsuite? ;-) Ah, thanks :) I was curious how much I win with unlooping. Updated patch is attached... *

Re: Unloop no longer looping loops in loop-ch

2023-04-25 Thread Bernhard Reutner-Fischer via Gcc-patches
On 25 April 2023 17:12:50 CEST, Jan Hubicka via Gcc-patches wrote: + fprintf (stderr, "Bingo\n"); You forgot to remove that.. Do we prune Bingo in the testsuite? ;-)

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 25, 2023 at 05:35:36PM +0200, Eric Botcazou wrote: > > Haven't looked into detail, but just saving compilation time shouldn't be > > the only factor when deciding about debug info stuff, another and perhaps > > even more important would be whether it affects the emitted debug info. >

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
> Haven't looked into detail, but just saving compilation time shouldn't be > the only factor when deciding about debug info stuff, another and perhaps > even more important would be whether it affects the emitted debug info. At least it doesn't change the guality results. -- Eric Botcazou

Re: [PATCH v4 00/10] RISC-V: Add autovec support

2023-04-25 Thread Palmer Dabbelt
On Mon, 17 Apr 2023 11:36:51 PDT (-0700), colli...@rivosinc.com wrote: > This series of patches adds foundational support for RISC-V > auto-vectorization support. These patches are based on the current upstream > rvv vector intrinsic support and is not a new implementation. Most of the >

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 25, 2023 at 05:10:50PM +0200, Richard Biener via Gcc-patches wrote: > On Tue, Apr 25, 2023 at 11:34 AM Eric Botcazou via Gcc-patches > wrote: > > > > Hi, > > > > insert_debug_temp_for_var_def has some strange code whereby it creates debug > > temporaries for SINGLE_RHS (RHS for

Re: [PATCH v7] RISCV: Inline subword atomic ops

2023-04-25 Thread Patrick O'Neill
On 4/24/23 22:52, Jeff Law wrote: On 4/18/23 15:41, Patrick O'Neill wrote: RISC-V has no support for subword atomic operations; code currently generates libatomic library calls. This patch changes the default behavior to inline subword atomic calls (using the same logic as the existing

Unloop no longer looping loops in loop-ch

2023-04-25 Thread Jan Hubicka via Gcc-patches
Hi, I noticed this after adding sanity check that the upper bound on number of iterations never drop to -1. It seems to be relatively common case (happening few hundred times in testsuite and also during bootstrap) that loop-ch duplicates enough so the loop itself no longer loops. This is later

[PATCH] More last_stmt removal

2023-04-25 Thread Richard Biener via Gcc-patches
This adjusts more users of last_stmt where it is clear that debug stmt skipping is unnecessary. In most cases this also allowed significant code simplification. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. gcc/c/ * gimple-parser.cc

Re: [PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Richard Biener via Gcc-patches
On Tue, Apr 25, 2023 at 11:34 AM Eric Botcazou via Gcc-patches wrote: > > Hi, > > insert_debug_temp_for_var_def has some strange code whereby it creates debug > temporaries for SINGLE_RHS (RHS for gimple_assign_single_p) but not for other > RHS in the same situation. It indeed looks odd

Ping: [PATCH] testsuite/C++: suppress filename canonicalization in module tests

2023-04-25 Thread Jan Beulich via Gcc-patches
On 28.06.2022 16:06, Jan Beulich wrote: > The pathname underneath gcm.cache/ is determined from the effective name > used for the main input file of a particular module. When modules are > built, no canonicalization occurs for the main input file. Hence the > module file wouldn't be found if a

[PATCH v2] testsuite/C++: cope with IPv6 being unavailable

2023-04-25 Thread Jan Beulich via Gcc-patches
When IPv6 is disabled in the kernel, the error message coming back from Cody::OpenInet6() is different from the sole so far expected one. --- v2: Re-base. --- a/gcc/testsuite/g++.dg/modules/bad-mapper-3.C +++ b/gcc/testsuite/g++.dg/modules/bad-mapper-3.C @@ -1,6 +1,6 @@ // {

Re: [pushed] c++: constant, array, lambda, template [PR108975]

2023-04-25 Thread Patrick Palka via Gcc-patches
On Sat, 18 Mar 2023, Patrick Palka wrote: > On Fri, 17 Mar 2023, Jason Merrill via Gcc-patches wrote: > > > Tested x86_64-pc-linux-gnu, applying to trunk. > > > > -- 8< -- > > > > When a lambda refers to a constant local variable in the enclosing scope, we > > tentatively capture it, but if we

[PATCH] testsuite: adjust NOP expectations for RISC-V

2023-04-25 Thread Jan Beulich via Gcc-patches
RISC-V will emit ".option nopic" when -fno-pie is in effect, which matches the generic pattern. Just like done for Alpha, special-case RISC-V. --- A couple more targets look to be affected as well, simply because their "no-operation" insn doesn't match the expectation. With the apparently

[committed] Re: [patch] 'omp scan' struct block seq update for OpenMP 5.x

2023-04-25 Thread Tobias Burnus
Now committed to GCC 14 with a git-log typo fixed and appending a tailing 'e' to dg-error for "... claus" to look nicer. See https://gcc.gnu.org/r14-224-g1c101fcfaac8f609d618f83b124bd50aea012132 - or attached patch. Tobias On 06.04.23 20:56, Tobias Burnus wrote: That's scheduled for GCC 13

RE: Re: [PATCH v2] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal.

2023-04-25 Thread Li, Pan2 via Gcc-patches
Thanks for patient, update the PATCH v3 as below link. https://gcc.gnu.org/pipermail/gcc-patches/2023-April/616686.html Pan -Original Message- From: Li, Pan2 Sent: Tuesday, April 25, 2023 10:10 PM To: Kito Cheng Cc: kito.ch...@sifive.com; gcc-patches ; Wang, Yanzhang ;

[PATCH v3] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal

2023-04-25 Thread Pan Li via Gcc-patches
From: Pan Li In most architecture the precision_size of vbool*_t types are caculated like as the multiple of the type size. For example: precision_size = type_size * 8 (aka, bit count per bytes). Unfortunately, some architecture like RISC-V will adjust the precision_size for the vbool*_t in

RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-25 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Tuesday, April 25, 2023 2:14 PM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org; > nd ; j...@ventanamicro.com > Subject: RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks > > On Tue, 25 Apr 2023, Tamar

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Li, Pan2 via Gcc-patches
I see. If there is no question from Juzhe, I will try to implement it follow the option 2. Pan From: Kito Cheng Sent: Tuesday, April 25, 2023 9:57 PM To: Li, Pan2 Cc: Kito Cheng ; Jeff Law ; juzhe.zh...@rivai.ai; gcc-patches ; Wang, Yanzhang Subject: Re: Re: [PATCH] RISC-V: Allow

[committed] testsuite: Fix up ext-floating2.C on powerpc64-linux

2023-04-25 Thread Jakub Jelinek via Gcc-patches
Hi! Another testcase that is failing on powerpc64-linux. The test expects a diagnostics when float64 && float128 or in another spot when float32 && float128. Now, float128 effective target is satisfied on powerpc64-linux, despite __CPP_FLOAT128_T__ not being defined, because one needs to add

RE: Re: [PATCH v2] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal.

2023-04-25 Thread Li, Pan2 via Gcc-patches
Oh, I see. This PATCH month drafted ago and missed that part. Sorry for inconvenient and will update it ASAP. Pan -Original Message- From: Kito Cheng Sent: Tuesday, April 25, 2023 10:05 PM To: Li, Pan2 Cc: kito.ch...@sifive.com; gcc-patches ; Wang, Yanzhang ; juzhe.zh...@rivai.ai

Re: Re: [PATCH v2] RISC-V: Bugfix for RVV vbool*_t vn_reference_equal.

2023-04-25 Thread Kito Cheng via Gcc-patches
Plz write description for every item in changelog, otherwise the gcc git hook will reject this patch. remote: *** The following commit was rejected by your hooks.commit-extra-checker script (status: 1) remote: *** commit: 2777f46a58af65be380a2f44bf5cdf93e2d11886 remote: *** ChangeLog format

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Kito Cheng via Gcc-patches
I would strongly prefer 2 since I believe this won't be the last optimization we did for this kind of thing, and I don't want to see we need to fix or worry about vsetvli stuff every time if possible. And the current pattern design is more reasonable to me - only defining those fields is really

Re: [Committed] Correct zeroextendqihi2 insn length regression on xstormy16.

2023-04-25 Thread Jeff Law via Gcc-patches
On 4/25/23 05:10, Roger Sayle wrote: My recent tweak to the zeroextendqihi2 pattern on xstormy16 incorrectly handled the case where the operand was a MEM. MEM operands use a longer encoding than REG operands, and the incorrect instruction length resulted in assembler errors (as reported by

[PATCH][committed] aarch64: PR target/PR99195 Annotate more simple integer binary patterns with vcz subst rules

2023-04-25 Thread Kyrylo Tkachov via Gcc-patches
Hi all, This patch adds more straightforward annotations to some more integer binary ops to eliminate redundant fmovs around 64-bit SIMD results. Bootstrapped and tested on aarch64-none-linux. Pushing to trunk. Thanks, Kyrill gcc/ChangeLog: PR target/PR99195 *

RE: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Li, Pan2 via Gcc-patches
Thanks Kito. Actually I fixed the below ICE with all riscv tests passed, but hold the PATCH v3 as may conflict with one of Juzhe's PATCH. Thus, there will be 2 options for the shortcut optimization. 1. Adjust existing define and let the underlying pass to perform the optimization. 2. Add new

[PATCH][committed] aarch64: Implement V2DI,V4SI division optabs for TARGET_SVE

2023-04-25 Thread Kyrylo Tkachov via Gcc-patches
Hi all, Similar to the mulv2di case, we can use SVE instruction to implement the V4SI and V2DI optabs for signed and unsigned integer division. This allows us to generate much cleaner code for the testcase than the current: food: fmovx1, d1 fmovx0, d0 umovx2,

[PATCH] VECT: Add decrement IV iteration loop control by variable amount support

2023-04-25 Thread juzhe . zhong
From: Juzhe-Zhong Hi, this is the most important patch for RVV auto-vectorization support. It supports WHILE_LEN pattern to not only decrement Loop control IV counter, but also adjust data reference address pointer by WHILE_LEN. 1. Single control loop (vec_num == 1 && ncopies == 1): int

Re: [PATCH] tree-optimization/109609 - correctly interpret arg size in fnspec

2023-04-25 Thread Jan Hubicka via Gcc-patches
> By majority vote and a hint from the API name which is > arg_max_access_size_given_by_arg_p this interprets a memory access > size specified as given as other argument such as for strncpy > in the testcase which has "1cO313" as specifying the _maximum_ > size read/written rather than the exact

Re: [RFC] RISC-V: Support risc-v bfloat16 This patch support bfloat16 in riscv like x86_64 and arm.

2023-04-25 Thread Kito Cheng via Gcc-patches
Hi ShiHua: Thanks for your contribution to the zfbfmin extension :) General comments: - Add zfbfmin to riscv_ext_version_table - Add test case to verify the -march is accepted. - Add testcase to test argument passing. - Add testcase for operations. - Add testcase for compares. > +(define_insn

RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-25 Thread Richard Biener via Gcc-patches
On Tue, 25 Apr 2023, Tamar Christina wrote: > > -Original Message- > > From: Richard Biener > > Sent: Tuesday, April 18, 2023 11:48 AM > > To: Tamar Christina > > Cc: gcc-patches@gcc.gnu.org; nd ; rguent...@suse.de; > > j...@ventanamicro.com > > Subject: Re: [PATCH 2/3]middle-end

[PATCH] tree-optimization/109609 - correctly interpret arg size in fnspec

2023-04-25 Thread Richard Biener via Gcc-patches
By majority vote and a hint from the API name which is arg_max_access_size_given_by_arg_p this interprets a memory access size specified as given as other argument such as for strncpy in the testcase which has "1cO313" as specifying the _maximum_ size read/written rather than the exact size.

Re: Re: [PATCH] RISC-V: Allow VMS{Compare} (V1, V1) shortcut optimization

2023-04-25 Thread Kito Cheng via Gcc-patches
Second thought on this, we should just add define_split rather than define_insn_and_split, otherwise we might hit the same issue again, and I expect the split pattern will only used in combine pass. On Sat, Apr 22, 2023 at 1:34 PM Li, Pan2 via Gcc-patches wrote: > > Hi Kito > > Thanks for the

[committed] testsuite: Fix up ext-floating15.C tests on powerpc64-linux [PR109278]

2023-04-25 Thread Jakub Jelinek via Gcc-patches
Hi! I've noticed this test FAILs on powerpc64-linux, with FAIL: g++.dg/cpp23/ext-floating15.C -std=gnu++98 (test for excess errors) Excess errors: /home/jakub/gcc/gcc/testsuite/g++.dg/cpp23/ext-floating15.C:8:5: error: '_Float128' is not supported on this target

RE: [PATCH 2/3]middle-end match.pd: simplify debug dump checks

2023-04-25 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Richard Biener > Sent: Tuesday, April 18, 2023 11:48 AM > To: Tamar Christina > Cc: gcc-patches@gcc.gnu.org; nd ; rguent...@suse.de; > j...@ventanamicro.com > Subject: Re: [PATCH 2/3]middle-end match.pd: simplify debug dump checks > > On Tue, Apr 18, 2023 at

Re: [ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2023-04-25 Thread Richard Biener via Gcc-patches
On Mon, 24 Apr 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Thu, Apr 20, 2023 at 3:24?PM Andre Vieira (lists) via Gcc-patches > > wrote: > >> > >> Rebased all three patches and made some small changes to the second one: > >> - removed sub and abd optabs from

Re: [PATCH] powerpc: Fix up *branch_anddi3_dot for -m32 -mpowerpc64 [PR109566]

2023-04-25 Thread Segher Boessenkool
Hi! On Mon, Apr 24, 2023 at 05:54:02PM +0200, Jakub Jelinek wrote: > The problem is that the *branch_anddi3_dot define_insn_and_split > relies on the *rotldi3_mask_dot define_insn_and_split being recognized > during splitting. The rs6000_is_valid_rotate_dot_mask function checks whether > the

[Committed] Correct zeroextendqihi2 insn length regression on xstormy16.

2023-04-25 Thread Roger Sayle
My recent tweak to the zeroextendqihi2 pattern on xstormy16 incorrectly handled the case where the operand was a MEM. MEM operands use a longer encoding than REG operands, and the incorrect instruction length resulted in assembler errors (as reported by Jeff Law). This patch restores the

Re: [PATCH] gcov: add info about "calls" to JSON output format

2023-04-25 Thread Martin Liška
On 4/14/23 14:34, Jan Hubicka wrote: >> On 4/11/23 11:23, Richard Biener wrote: >>> On Thu, Apr 6, 2023 at 3:58 PM Martin Liška wrote: Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed after stage1 opens? >>> >>> Did we release a

Re: [aarch64] Code-gen for vector initialization involving constants

2023-04-25 Thread Richard Sandiford via Gcc-patches
Prathamesh Kulkarni writes: > Hi Richard, > While digging thru aarch64_expand_vector_init, I noticed it gives > priority to loading a constant first: > /* Initialise a vector which is part-variable. We want to first try > to build those lanes which are constant in the most efficient way we

Re: [PATCH 6/7] MATCH: Factor out code that for min max detection with constants

2023-04-25 Thread Mikael Morin
Hello, diff --git a/gcc/fold-const.cc b/gcc/fold-const.cc index 3b397ae2941..b8add24f874 100644 --- a/gcc/fold-const.cc +++ b/gcc/fold-const.cc @@ -150,6 +150,49 @@ static tree fold_convert_const (enum tree_code, tree, tree); static tree fold_view_convert_expr (tree, tree); static tree

Re: [RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-04-25 Thread Kito Cheng via Gcc-patches
I am ok if binutils patch get merged into trunk Philipp Tomsich 於 2023年4月25日 週二 18:15 寫道: > The binutils support is lingering on-list since Jan 2022: >https://sourceware.org/pipermail/binutils/2022-January/119388.html > > If we get an OK on that one, we will rebase, retest, and merge it. >

Re: [RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-04-25 Thread Philipp Tomsich
The binutils support is lingering on-list since Jan 2022: https://sourceware.org/pipermail/binutils/2022-January/119388.html If we get an OK on that one, we will rebase, retest, and merge it. Thanks, Philipp. On Tue, 25 Apr 2023 at 11:53, Kito Cheng wrote: > I am not sure if we should

[PATCH 4/5] RISC-V: Add Zcmp extension supports.

2023-04-25 Thread Fei Gao
hi Jiawei Please ignore my previous reply. I accidently sent the email before I finished it. Sorry for that! I downloaded the series of patches from you and found in some cases it fails to generate zcmp push and pop insns. TC: char my_getchar(); int test_s0() {         int a =

RE: [PATCH] aarch64: Add the cost model for Neoverse N1

2023-04-25 Thread Tamar Christina via Gcc-patches
Thanks Evandro, That one works. I’ll run the new cost model and sched modules through a number of workloads and come back with the results. Cheers, Tamar From: Evandro Menezes Sent: Monday, April 24, 2023 11:52 PM To: Evandro Menezes Cc: Tamar Christina ; evandro+gcc-patc...@gcc.gnu.org;

Re: [ping][vect-patterns] Refactor widen_plus/widen_minus as internal_fns

2023-04-25 Thread Andre Vieira (lists) via Gcc-patches
On 24/04/2023 12:57, Richard Biener wrote: On Thu, Apr 20, 2023 at 3:24 PM Andre Vieira (lists) via Gcc-patches wrote: Rebased all three patches and made some small changes to the second one: - removed sub and abd optabs from commutative_optab_p, I suspect this was a copy paste mistake, -

Re: [RFC PATCH v1 09/10] RISC-V: Recognize xventanacondops extension

2023-04-25 Thread Kito Cheng via Gcc-patches
I am not sure if we should accept this on gcc trunk without binutils support? On Sat, Apr 22, 2023 at 3:58 AM Jeff Law via Gcc-patches wrote: > > > > On 2/10/23 15:41, Philipp Tomsich wrote: > > This adds the xventanacondops extension to the option parsing and as a > > default for the

Re: [PATCH] rtl-optimization/109585 - alias analysis typo

2023-04-25 Thread Jan Hubicka via Gcc-patches
> When r10-514-gc6b84edb6110dd2b4fb improved access path analysis > it introduced a typo that triggers when there's an access to a > trailing array in the first access path leading to false > disambiguation. > > Bootstrapped and tested on x86_64-unknown-linux-gnu. > > Honza, does this look OK?

[PATCH 4/5] RISC-V: Add Zcmp extension supports.

2023-04-25 Thread Fei Gao
hi Jiawei I downloaded the series of patches from you and found in some cases it fails to generate zcmp push and pop insns. test.c char my_getchar(); int test_s0() {         int a = my_getchar();         int b = my_getchar();         return a+b; } On Thu Apr 6 06:21:17 GMT 2023  Jiawei

[PATCH] MAINTAINERS: add myself to write after approval

2023-04-25 Thread Victor L. Do Nascimento via Gcc-patches
ChangeLog: * MAINTAINERS (Write After Approval): Add myself. --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index b76e1a131d9..4fbfa01c111 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -392,6 +392,7 @@ Bud Davis

[PATCH] Avoid creating useless debug temporaries

2023-04-25 Thread Eric Botcazou via Gcc-patches
Hi, insert_debug_temp_for_var_def has some strange code whereby it creates debug temporaries for SINGLE_RHS (RHS for gimple_assign_single_p) but not for other RHS in the same situation. Removing it saves 25% of compilation time at -g -O for a pathological testcase I have.

Re: [PATCH] LoongArch: Enable shrink wrapping

2023-04-25 Thread Guo Jie
/* snip */   diff --git a/gcc/testsuite/gcc.target/loongarch/shrink-wrap.c b/gcc/testsuite/gcc.target/loongarch/shrink-wrap.c new file mode 100644 index 000..f2c867a2769 --- /dev/null +++ b/gcc/testsuite/gcc.target/loongarch/shrink-wrap.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* {

Re: [PATCH] Implement range-op entry for sin/cos.

2023-04-25 Thread Aldy Hernandez via Gcc-patches
On 4/21/23 22:43, Mikael Morin wrote: Hello, --- gcc/gimple-range-op.cc.jj    2023-04-21 17:09:48.250367999 +0200 +++ gcc/gimple-range-op.cc    2023-04-21 18:37:26.048325391 +0200 @@ -439,20 +436,38 @@ public:   r.set_varying (type);   return true;     } +   // Results

Re: [PATCH] Implement range-op entry for sin/cos.

2023-04-25 Thread Aldy Hernandez via Gcc-patches
On 4/21/23 18:40, Jakub Jelinek wrote: On Thu, Apr 20, 2023 at 02:59:35PM +0200, Jakub Jelinek via Gcc-patches wrote: Thanks for working on this. Though expectedly here we are running again into the discussions we had in November about math properties of the functions vs. numeric properties

[PATCH] Remove default constructor to nan_state.

2023-04-25 Thread Aldy Hernandez via Gcc-patches
[Per my comment in the sin/cos thread.] I think it's best to specify the default behavior of nan_state, since it's not obvious that nan_state() defaults to TRUE. Also, this avoids the ugly nan_state(false, false) idiom. Will commit pending tests. gcc/ChangeLog: * value-range.cc

Re: [PATCH] Implement range-op entry for sin/cos.

2023-04-25 Thread Aldy Hernandez via Gcc-patches
On 4/21/23 08:52, Jakub Jelinek wrote: On Thu, Apr 20, 2023 at 09:14:10PM -0400, Siddhesh Poyarekar wrote: On 2023-04-20 13:57, Siddhesh Poyarekar wrote: For bounds that aren't representable, one could get error bounds from libm-test-ulps data in glibc, although I reckon those won't be

[Ada] Remove obsolete configure code in gnattools

2023-04-25 Thread Eric Botcazou via Gcc-patches
It was recently pointed out that we generate symbolic links to ghost files when building the GNAT tools, as the mlib-tgt-specific-*.adb files are gone. Tested on x86-64/Linux, applied on the mainline. I'll backport this onto branches after the GCC 13.1 release is out. 2023-04-25 Eric

Re: [PATCH] powerpc: Fix up *branch_anddi3_dot for -m32 -mpowerpc64 [PR109566]

2023-04-25 Thread Jakub Jelinek via Gcc-patches
On Tue, Apr 25, 2023 at 01:33:18PM +0800, Kewen.Lin via Gcc-patches wrote: > For the associated test case, it looks it's valid to make use of rldicr. > (rolt with dot), so an alternative seems to relax the condition of > *rotldi3_mask_dot. Considering this is also targeted for 13.1, I think >

Re: [PATCH] LoongArch: Enable shrink wrapping

2023-04-25 Thread Lulu Cheng
+guojie 在 2023/4/23 下午9:19, Xi Ruoyao 写道: This commit implements the target macros for shrink wrapping of function prologues/epilogues shrink wrapping on LoongArch. Bootstrapped and regtested on loongarch64-linux-gnu. I don't have an access to SPEC CPU so I hope the reviewer can perform a

Re: [PATCH v1] [RFC] Improve folding for comparisons with zero in tree-ssa-forwprop.

2023-04-25 Thread Richard Biener via Gcc-patches
On Tue, Apr 25, 2023 at 1:05 AM Jeff Law wrote > > > > > On 4/24/23 02:06, Richard Biener via Gcc-patches wrote: > > On Fri, Apr 21, 2023 at 11:01 PM Philipp Tomsich > > wrote: > >> > >> Any guidance on the next steps for this patch? > > > > I think we want to perform this transform later, in

Re: [PATCH] Pass correct type to irange::contains_p() in ipa-cp.cc.

2023-04-25 Thread Richard Biener via Gcc-patches
On Mon, Apr 24, 2023 at 7:17 PM Aldy Hernandez wrote: > > > > On 4/24/23 14:35, Richard Biener wrote: > > On Mon, Apr 24, 2023 at 2:32 PM Aldy Hernandez wrote: > >> > >> > >> > >> On 4/24/23 14:10, Richard Biener wrote: > >>> On Mon, Apr 24, 2023 at 1:51 PM Aldy Hernandez wrote: > > >

Re: [PATCH] PR tree-optimization/109417 - Check if dependency is valid before using in may_recompute_p.

2023-04-25 Thread Richard Biener via Gcc-patches
On Mon, Apr 24, 2023 at 3:51 PM Andrew MacLeod wrote: > > > On 4/11/23 05:21, Richard Biener via Gcc-patches wrote: > > On Wed, Apr 5, 2023 at 11:53 PM Jeff Law via Gcc-patches > > wrote: > >> > >> > >> On 4/5/23 14:10, Andrew MacLeod via Gcc-patches wrote: > >>> When a statement is first

Re: [PATCH, rs6000] Splat vector small V2DI constants with ISA 2.07 instructions [PR104124]

2023-04-25 Thread Kewen.Lin via Gcc-patches
Hi Haochen, on 2022/9/21 13:13, HAO CHEN GUI wrote: > Hi, > This patch adds a new insn for vector splat with small V2DI constants on P8. > If the value of constant is in RANGE (-16, 15) and not 0 or -1, it can be > loaded > with vspltisw and vupkhsw on P8. It should be efficient than loading

[PATCH] rtl-optimization/109585 - alias analysis typo

2023-04-25 Thread Richard Biener via Gcc-patches
When r10-514-gc6b84edb6110dd2b4fb improved access path analysis it introduced a typo that triggers when there's an access to a trailing array in the first access path leading to false disambiguation. Bootstrapped and tested on x86_64-unknown-linux-gnu. Honza, does this look OK? Thanks, Richard.

  1   2   >