Re: [PATCH] Remove type from vrange_storage::equal_p.

2023-05-05 Thread Aldy Hernandez via Gcc-patches
On 5/3/23 13:41, Aldy Hernandez wrote: [Andrew, since you suggested this, is this what you had in mind?]. Pushed. You can comment when you're back from vacation :). Aldy The equal_p method in vrange_storage is only used to compare ranges that are the same type. No sense passing the type

Re: [PATCH] gimple-range-op: Improve handling of sin/cos ranges

2023-05-05 Thread Aldy Hernandez via Gcc-patches
On 5/5/23 22:53, Jakub Jelinek wrote: Hi! Similarly to the earlier sqrt patch, this patch attempts to improve sin/cos ranges. As the functions are periodic, for the reverse range there is not much we can do (but I've discovered I forgot to take into account the boundary ulps for the

Re: [patch, fortran] PR109662 Namelist input with comma after name accepted

2023-05-05 Thread Steve Kargl via Gcc-patches
On Fri, May 05, 2023 at 08:41:48PM -0700, Jerry D via Fortran wrote: > The attached patch adds a check for the invalid comma and emits a runtime > error if -std=f95,f2003,f2018 are specified at compile time. > > Attached patch includes a new test case. > > Regression tested on x86_64-linux-gnu.

[PATCH V7] RISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread juzhe . zhong
From: Juzhe-Zhong gcc/ChangeLog: * config/riscv/riscv-protos.h (preferred_simd_mode): New function. * config/riscv/riscv-v.cc (autovec_use_vlmax_p): Ditto. (preferred_simd_mode): Ditto. * config/riscv/riscv.cc (riscv_get_arg_info): Handle RVV type in function

[patch, fortran] PR109662 Namelist input with comma after name accepted

2023-05-05 Thread Jerry D via Gcc-patches
The attached patch adds a check for the invalid comma and emits a runtime error if -std=f95,f2003,f2018 are specified at compile time. Attached patch includes a new test case. Regression tested on x86_64-linux-gnu. OK for mainline? Regards, Jerry Author: Jerry DeLisle Date: Fri May 5

New Croatian PO file for 'gcc' (version 13.1.0)

2023-05-05 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Croatian team of translators. The file is available at: https://translationproject.org/latest/gcc/hr.po (This file, 'gcc-13.1.0.hr.po', has

RE: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread Li, Pan2 via Gcc-patches
Picked all changes mentioned in previous to single patch as attachment. Please help to review if any mistake. Pan -Original Message- From: Li, Pan2 Sent: Saturday, May 6, 2023 10:20 AM To: Kito Cheng Cc: juzhe.zh...@rivai.ai; rguenther ; richard.sandiford ; jeffreyalaw ; gcc-patches

Re: [PATCH V2] RISC-V: Fix incorrect demand info merge in local vsetvli optimization [PR109748]

2023-05-05 Thread Kito Cheng via Gcc-patches
Thanks, committed to trunk! On Fri, May 5, 2023 at 10:13 PM wrote: > > From: Juzhe-Zhong > > This patch is fixing my recent optimization patch: > https://github.com/gcc-mirror/gcc/commit/d51f2456ee51bd59a79b4725ca0e488c25260bbf > > In that patch, the new_info = parse_insn (i) is not correct. >

RE: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread Li, Pan2 via Gcc-patches
Yes, that makes sense, will have a try and keep you posted. Pan -Original Message- From: Kito Cheng Sent: Saturday, May 6, 2023 10:19 AM To: Li, Pan2 Cc: juzhe.zh...@rivai.ai; rguenther ; richard.sandiford ; jeffreyalaw ; gcc-patches ; palmer ; jakub Subject: Re: Re: [PATCH]

Re: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread Kito Cheng via Gcc-patches
I think x86 first? The major thing we want to make sure is that this change won't affect those targets which do not really require 16 bit machine_mode too much. On Sat, May 6, 2023 at 10:12 AM Li, Pan2 via Gcc-patches wrote: > > Sure thing, I will pick them all together and trigger(will send

RE: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread Li, Pan2 via Gcc-patches
Sure thing, I will pick them all together and trigger(will send out the overall diff before start to make sure my understand is correct) the test again. BTW which target do we prefer first? X86 or RISC-V. Pan From: juzhe.zh...@rivai.ai Sent: Saturday, May 6, 2023 10:00 AM To: kito.cheng ; Li,

Re: [PATCH V6] RISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread Kito Cheng via Gcc-patches
> diff --git > a/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.c > b/gcc/testsuite/gcc.target/riscv/rvv/autovec/partial/single_rgroup-1.c > new file mode 100644 > index 000..6384888dd03 > --- /dev/null > +++

Re: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread juzhe.zh...@rivai.ai
Yeah, you should also swap mode and code in rtx_def according to Richard suggestion since it will not change the rtx_def data structure. I think the only problem is the mode in tree data structure. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-05-06 09:53 To: Li, Pan2 CC: Richard Biener;

Re: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread Kito Cheng via Gcc-patches
Hi Pan: Could you try to apply the following diff and measure again? This makes tree_type_common size unchanged. sizeof tree_type_common= 128 (mode = 8 bit) sizeof tree_type_common= 136 (mode = 16 bit) sizeof tree_type_common= 128 (mode = 8 bit w/ this diff) diff --git a/gcc/tree-core.h

[PATCH V6] RISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread juzhe . zhong
From: Juzhe-Zhong gcc/ChangeLog: * config/riscv/riscv-protos.h (preferred_simd_mode): New function. * config/riscv/riscv-v.cc (autovec_use_vlmax_p): Ditto. (preferred_simd_mode): Ditto. * config/riscv/riscv.cc (riscv_get_arg_info): Handle RVV type in function

[PATCH] ISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread juzhe . zhong
From: Juzhe-Zhong gcc/ChangeLog: * config/riscv/riscv-protos.h (preferred_simd_mode): New function. * config/riscv/riscv-v.cc (autovec_use_vlmax_p): Ditto. (preferred_simd_mode): Ditto. * config/riscv/riscv.cc (riscv_get_arg_info): Handle RVV type in function

RE: Re: [PATCH] machine_mode type size: Extend enum size from 8-bit to 16-bit

2023-05-05 Thread Li, Pan2 via Gcc-patches
Yes, totally agree the number cannot be very accurate up to a point. Update the correlated memory bytes allocated for the X86 target. Bytes allocated with O2: - Benchmark | upstream

Re: [PATCH] RISC-V: Add bext pattern for ZBS

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/4/23 11:08, Raphael Moreira Zinsly wrote: When (a & (1 << bit_no)) is tested inside an IF we can use a bit extract. gcc/ChangeLog: * config/riscv/bitmanip.md (bext): Rename one to avoid name clash. (branch_bext): New split

[committed] CRIS: peephole2 an add into two addq or subq

2023-05-05 Thread Hans-Peter Nilsson via Gcc-patches
Unfortunately, doesn't cause a performance improvement for coremark, but happens a few times in newlib, just enough to affect coremark 0.01% by size (or 4 bytes, and three cycles (__fwalk_sglue and __vfiprintf_r each two bytes). gcc: * config/cris/cris.md (splitop): Add PLUS. *

[committed] CRIS: peephole2 a move of constant followed by and of same register

2023-05-05 Thread Hans-Peter Nilsson via Gcc-patches
While moves of constants into registers are separately optimizable, a combination of a move with a subsequent "and" is slightly preferable even if the move can be generated with the same number (and timing) of insns, as moves of "just" registers are eliminated now and then in different passes,

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

2023-05-05 Thread 钟居哲
Hi, Richards. I would like to give more information about this patch so that it will make this patch easier for you to review. Currently, I saw we have 3 situations that we need to handle in case of loop control IV in auto-vectorization: 1. Single rgroup loop control (ncopies == 1 && vec_num ==

Re: [PATCH V5] Use reg mode to move sub blocks for parameters and returns

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/3/23 23:49, guojiufu wrote: Hi, On 2023-05-01 03:00, Jeff Law wrote: On 3/16/23 21:39, Jiufu Guo wrote: Hi, When assigning a parameter to a variable, or assigning a variable to return value with struct type, and the parameter/return is passed through registers. For this kind of case,

Re: [PATCH v2] Canonicalize vec_merge when mask is constant.

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/3/23 21:25, liuhongt wrote: Here's update patch with documents in md.texi. Ok for trunk? -- Use swap_communattive_operands_p for canonicalization. When both value has same operand precedence value, then first bit in the mask should select first operand. The canonicalization

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/5/23 14:46, Jakub Jelinek wrote: On Fri, May 05, 2023 at 03:37:47PM +, Tamar Christina wrote: 2023-05-05 Jakub Jelinek * Makefile.in (check_p_numbers): Rename to one_to_, move earlier with helper variables also renamed. (MATCH_SPLUT_SEQ): Use

Re: [PATCH v8] RISC-V: Add the 'zfa' extension, version 0.2.

2023-05-05 Thread Jeff Law via Gcc-patches
On 4/19/23 03:57, Jin Ma wrote: This patch adds the 'Zfa' extension for riscv, which is based on: https://github.com/riscv/riscv-isa-manual/commits/zfb https://github.com/riscv/riscv-isa-manual/commit/1f038182810727f5feca311072e630d6baac51da The binutils-gdb for 'Zfa' extension:

[committed] CRIS: peephole2 a lsrq into a lslq+lsrq pair

2023-05-05 Thread Hans-Peter Nilsson via Gcc-patches
Observed after opsplit1 with AND in libgcc floating-point functions, like the first spottings of opsplit1/AND opportunities. Two patterns are nominally needed, as the peephole2 optimizer continues from the *first replacement* insn, not from a minimum context for general matching; one that

Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Andrea Parri
On Fri, May 05, 2023 at 02:42:38PM -0700, Hans Boehm wrote: > I think A.6-tso also needs to change the last line in the table from > lr.aqrl ... sc to lr.aq ... sc.rl, otherwise I think we have problems with > a subsequent A.7-tso generated l.aq . Otherwise I agree. Indeed! Thanks for the

Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Andrew Waterman via Gcc-patches
On Fri, May 5, 2023 at 2:42 PM Hans Boehm wrote: > > I think A.6-tso also needs to change the last line in the table from lr.aqrl > ... sc to lr.aq ... sc.rl, otherwise I think we have problems with a > subsequent A.7-tso generated l.aq . Otherwise I agree. > > I certainly agree that, given the

Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Hans Boehm via Gcc-patches
I think A.6-tso also needs to change the last line in the table from lr.aqrl ... sc to lr.aq ... sc.rl, otherwise I think we have problems with a subsequent A.7-tso generated l.aq . Otherwise I agree. I certainly agree that, given the Ztso extension, there should be a standard

Re: [PATCH] libffi: fix handling of homogeneous float128 structs [PR109447]

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Thu, May 04, 2023 at 02:29:34PM -0500, Peter Bergner wrote: > I'd like to pull in Dan's upstream libffi commit into trunk to fix a > wrong code bug/testsuite failure on powerpc64le-linux with long double > defaulting to ieee128. This passed bootstrap and regtesting with no > regressions. Ok

Re: [PATCH] libffi: fix handling of homogeneous float128 structs [PR109447]

2023-05-05 Thread Peter Bergner via Gcc-patches
On 5/4/23 2:29 PM, Peter Bergner wrote: > I'd like to pull in Dan's upstream libffi commit into trunk to fix a > wrong code bug/testsuite failure on powerpc64le-linux with long double > defaulting to ieee128. This passed bootstrap and regtesting with no > regressions. Ok for trunk? > > This bug

[PATCH] gimple-range-op: Improve handling of sin/cos ranges

2023-05-05 Thread Jakub Jelinek via Gcc-patches
Hi! Similarly to the earlier sqrt patch, this patch attempts to improve sin/cos ranges. As the functions are periodic, for the reverse range there is not much we can do (but I've discovered I forgot to take into account the boundary ulps for the discovery of impossible result ranges). For

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 03:37:47PM +, Tamar Christina wrote: > > 2023-05-05 Jakub Jelinek > > > > * Makefile.in (check_p_numbers): Rename to one_to_, move > > earlier with helper variables also renamed. > > (MATCH_SPLUT_SEQ): Use $(wordlist

Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Andrea Parri
On Fri, May 05, 2023 at 12:18:12PM -0700, Palmer Dabbelt wrote: > On Fri, 05 May 2023 11:55:31 PDT (-0700), Andrea Parri wrote: > > On Fri, May 05, 2023 at 10:12:56AM -0700, Patrick O'Neill wrote: > > > The RISC-V Ztso extension currently has no effect on generated code. > > > With the additional

Re: [PATCH] Fortran: overloading of intrinsic binary operators [PR109641]

2023-05-05 Thread Harald Anlauf via Gcc-patches
Hi Mikael, On 5/5/23 13:43, Mikael Morin wrote: Hello, Le 01/05/2023 à 18:29, Harald Anlauf via Fortran a écrit : +/* Given two expressions, check that their rank is conformable, i.e. either +   both have the same rank or at least one is a scalar.  */ + +bool +gfc_op_rank_conformable

Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Palmer Dabbelt
On Fri, 05 May 2023 11:55:31 PDT (-0700), Andrea Parri wrote: On Fri, May 05, 2023 at 10:12:56AM -0700, Patrick O'Neill wrote: The RISC-V Ztso extension currently has no effect on generated code. With the additional ordering constraints guarenteed by Ztso, we can emit more optimized atomic

Re: [RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Andrea Parri
On Fri, May 05, 2023 at 10:12:56AM -0700, Patrick O'Neill wrote: > The RISC-V Ztso extension currently has no effect on generated code. > With the additional ordering constraints guarenteed by Ztso, we can emit > more optimized atomic mappings than the RVWMO mappings. > > This patch implements

Re: [PATCH] c++: list CTAD and resolve_nondeduced_context [PR106214]

2023-05-05 Thread Jason Merrill via Gcc-patches
On 5/5/23 13:36, Patrick Palka wrote: This extends the PR93107 fix, which made us do resolve_nondeduced_context on the elements of an initializer list during auto deduction, to happen for CTAD as well. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? PR

Re: [PATCH] c++: parenthesized -> resolving to static member [PR98283]

2023-05-05 Thread Jason Merrill via Gcc-patches
On 5/5/23 14:30, Patrick Palka wrote: On Fri, 5 May 2023, Patrick Palka wrote: Here we're neglecting to propagate parenthesized-ness when the member access expression (this->m) resolves to a static member (and thus finish_class_member_access_expr yields a VAR_DECL instead of a COMPONENT_REF).

Re: [PATCH] c++: parenthesized -> resolving to static member [PR98283]

2023-05-05 Thread Patrick Palka via Gcc-patches
On Fri, 5 May 2023, Patrick Palka wrote: > Here we're neglecting to propagate parenthesized-ness when the member > access expression (this->m) resolves to a static member (and thus > finish_class_member_access_expr yields a VAR_DECL instead of a > COMPONENT_REF). > > Bootstrapped and regtested

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Alexander Monakov > Sent: Friday, May 5, 2023 7:22 PM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Makefile.in: clean up match.pd-related dependencies > > > On Fri, 5 May 2023, Tamar Christina wrote: > > > >

[PATCH] c++: parenthesized -> resolving to static member [PR98283]

2023-05-05 Thread Patrick Palka via Gcc-patches
Here we're neglecting to propagate parenthesized-ness when the member access expression (this->m) resolves to a static member (and thus finish_class_member_access_expr yields a VAR_DECL instead of a COMPONENT_REF). Bootstrapped and regtested on x86_64-pc-linux-gnu, does look OK for trunk?

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Alexander Monakov via Gcc-patches
On Fri, 5 May 2023, Tamar Christina wrote: > > -Original Message- > > From: Alexander Monakov > > Sent: Friday, May 5, 2023 6:59 PM > > To: Tamar Christina > > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > > Subject: RE: [PATCH] Makefile.in: clean up match.pd-related dependencies > >

Re: [PATCH] c++: goto entering scope of obj w/ non-trivial dtor [PR103091]

2023-05-05 Thread Jason Merrill via Gcc-patches
On 5/5/23 13:36, Patrick Palka wrote: It seems DR 2256 permitted goto to cross the initialization of a trivially initialized object with a non-trivial destructor. We already supported this as an -fpermissive extension, so this patch just makes us unconditionally support this. Bootstrapped and

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Alexander Monakov > Sent: Friday, May 5, 2023 6:59 PM > To: Tamar Christina > Cc: Richard Biener ; gcc-patches@gcc.gnu.org > Subject: RE: [PATCH] Makefile.in: clean up match.pd-related dependencies > > > On Fri, 5 May 2023, Tamar Christina wrote: > > > > >

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Alexander Monakov via Gcc-patches
On Fri, 5 May 2023, Tamar Christina wrote: > > > Am 05.05.2023 um 19:03 schrieb Alexander Monakov via Gcc-patches > patc...@gcc.gnu.org>: > > > > > > Clean up confusing changes from the recent refactoring for parallel > > > match.pd build. > > > > > > gimple-match-head.o is not built. Remove

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 01:32:02PM -0400, Jason Merrill wrote: > > --- gcc/ada/gcc-interface/utils2.cc.jj 2023-01-16 23:19:05.539727388 > > +0100 > > +++ gcc/ada/gcc-interface/utils2.cc 2023-05-05 15:37:30.193990948 +0200 > > @@ -3332,6 +3332,7 @@ gnat_invariant_expr (tree expr) > > case

RE: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Tamar Christina via Gcc-patches
> > Am 05.05.2023 um 19:03 schrieb Alexander Monakov via Gcc-patches patc...@gcc.gnu.org>: > > > > Clean up confusing changes from the recent refactoring for parallel > > match.pd build. > > > > gimple-match-head.o is not built. Remove related flags adjustment. > > > > Autogenerated

[PATCH] c++: goto entering scope of obj w/ non-trivial dtor [PR103091]

2023-05-05 Thread Patrick Palka via Gcc-patches
It seems DR 2256 permitted goto to cross the initialization of a trivially initialized object with a non-trivial destructor. We already supported this as an -fpermissive extension, so this patch just makes us unconditionally support this. Bootstrapped and regtested on x86_64-pc-linux-gnu, does

[PATCH] c++: list CTAD and resolve_nondeduced_context [PR106214]

2023-05-05 Thread Patrick Palka via Gcc-patches
This extends the PR93107 fix, which made us do resolve_nondeduced_context on the elements of an initializer list during auto deduction, to happen for CTAD as well. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? PR c++/106214 PR c++/93107

Re: [PATCH] tree: Fix up save_expr [PR52339]

2023-05-05 Thread Jason Merrill via Gcc-patches
On 5/5/23 09:40, Jakub Jelinek wrote: On Fri, May 05, 2023 at 07:38:45AM -0400, Jason Merrill wrote: On 5/5/23 06:45, Jakub Jelinek wrote: + if (TREE_READONLY (t) && !TREE_SIDE_EFFECTS (t)) +{ + /* Return true for const qualified vars, but for members or array +elements

[RFC] RISC-V: Add proposed Ztso atomic mappings

2023-05-05 Thread Patrick O'Neill
The RISC-V Ztso extension currently has no effect on generated code. With the additional ordering constraints guarenteed by Ztso, we can emit more optimized atomic mappings than the RVWMO mappings. This patch implements Andrea Parri's proposed Ztso mappings ("Proposed Mapping").

Re: [PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Richard Biener via Gcc-patches
> Am 05.05.2023 um 19:03 schrieb Alexander Monakov via Gcc-patches > : > > Clean up confusing changes from the recent refactoring for > parallel match.pd build. > > gimple-match-head.o is not built. Remove related flags adjustment. > > Autogenerated gimple-match-N.o files do not depend on

Re: [PATCH v6 0/9] RISC-V: autovec: Add autovec support

2023-05-05 Thread Michael Collison
Because everyone was commenting that we needed vector load/store support (including Juzhe). Juzhe specifically pointed me to his patch for the load/store patterns in his review of my code. Would you like me to remove the patterns? On 5/5/23 12:34, Kito Cheng wrote: Errr, why you just mixed

[PATCH] Makefile.in: clean up match.pd-related dependencies

2023-05-05 Thread Alexander Monakov via Gcc-patches
Clean up confusing changes from the recent refactoring for parallel match.pd build. gimple-match-head.o is not built. Remove related flags adjustment. Autogenerated gimple-match-N.o files do not depend on gimple-match-exports.cc. {gimple,generic)-match-auto.h only depend on the prerequisites of

[PATCH] ira: Don't create copies for earlyclobbered pairs

2023-05-05 Thread Richard Sandiford via Gcc-patches
This patch follows on from g:9f635bd13fe9e85872e441b6f3618947f989909a ("the previous patch"). To start by quoting that: If an insn requires two operands to be tied, and the input operand dies in the insn, IRA acts as though there were a copy from the input to the output with the same execution

[PATCH 07/10] arm: [MVE intrinsics] rework vmovnbq vmovntq vqmovnbq vqmovntq vqmovunbq vqmovuntq

2023-05-05 Thread Christophe Lyon via Gcc-patches
Implement vmovnbq, vmovntq, vqmovnbq, vqmovntq, vqmovunbq, vqmovuntq using the new MVE builtins framework. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vmovnbq, vmovntq, vqmovnbq) (vqmovntq, vqmovunbq, vqmovuntq): New. *

[PATCH 04/10] arm: [MVE intrinsics] rework vrndq vrndaq vrndmq vrndnq vrndpq vrndxq

2023-05-05 Thread Christophe Lyon via Gcc-patches
Implement vrndq, vrndaq, vrndmq, vrndnq, vrndpq, vrndxq using the new MVE builtins framework. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (FUNCTION_ONLY_F): New. (vrndaq, vrndmq, vrndnq, vrndpq, vrndq, vrndxq): New. *

[PATCH 06/10] arm: [MVE intrinsics] factorize vmovnbq vmovntq vqmovnbq vqmovntq vqmovunbq vqmovuntq

2023-05-05 Thread Christophe Lyon via Gcc-patches
Factorize vmovnbq vmovntq vqmovnbq vqmovntq vqmovunbq vqmovuntq so that they use the same pattern. 2022-09-08 Christophe Lyon gcc/ * config/arm/iterators.md (MVE_MOVN, MVE_MOVN_M): New. (mve_insn): Add vmovnb, vmovnt, vqmovnb, vqmovnt, vqmovunb, vqmovunt.

[PATCH 08/10] arm: [MVE intrinsics] add binary_widen_n shape

2023-05-05 Thread Christophe Lyon via Gcc-patches
This patch adds the binary_widen_n shape description. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_widen_n): New. * config/arm/arm-mve-builtins-shapes.h (binary_widen_n): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 53

[PATCH 10/10] arm: [MVE intrinsics] rework vshllbq vshlltq

2023-05-05 Thread Christophe Lyon via Gcc-patches
Implement vshllbq and vshlltq using the new MVE builtins framework. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (vshllbq, vshlltq): New. * config/arm/arm-mve-builtins-base.def (vshllbq, vshlltq): New. *

[PATCH 03/10] arm: [MVE intrinsics] rework vabsq vnegq vclsq vclzq, vqabsq, vqnegq

2023-05-05 Thread Christophe Lyon via Gcc-patches
Implement vabsq, vnegq, vclsq, vclzq, vqabsq, vqnegq using the new MVE builtins framework. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-base.cc (FUNCTION_WITHOUT_N_NO_U_F): New. (vabsq, vnegq, vclsq, vclzq, vqabsq, vqnegq): New. *

[PATCH 09/10] arm: [MVE intrinsics] factorize vshllbq vshlltq

2023-05-05 Thread Christophe Lyon via Gcc-patches
Factorize vshllbq vshlltq so that they use the same pattern. 2022-09-08 Christophe Lyon gcc/ * config/arm/iterators.md (mve_insn): Add vshllb, vshllt. (VSHLLBQ_N, VSHLLTQ_N): Remove. (VSHLLxQ_N): New. (VSHLLBQ_M_N, VSHLLTQ_M_N): Remove.

[PATCH 05/10] arm: [MVE intrinsics] add binary_move_narrow and binary_move_narrow_unsigned shapes

2023-05-05 Thread Christophe Lyon via Gcc-patches
This patch adds the binary_move_narrow and binary_move_narrow_unsigned shapes descriptions. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (binary_move_narrow): New. (binary_move_narrow_unsigned): New. *

[PATCH 02/10] arm: [MVE intrinsics] factorize several unary operations

2023-05-05 Thread Christophe Lyon via Gcc-patches
Factorize vabs vcls vclz vneg vqabs vqneg vrnda vrndm vrndn vrndp vrnd vrndx so that they use the same pattern. This patch introduces the mve_mnemo iterator because some of the involved intrinsics have a different name from their mnenonic: for instance vrndq vs vrintz. 2022-09-08 Christophe

[PATCH 01/10] arm: [MVE intrinsics] add unary shape

2023-05-05 Thread Christophe Lyon via Gcc-patches
This patch adds the unary shape description. 2022-09-08 Christophe Lyon gcc/ * config/arm/arm-mve-builtins-shapes.cc (unary): New. * config/arm/arm-mve-builtins-shapes.h (unary): New. --- gcc/config/arm/arm-mve-builtins-shapes.cc | 27 +++

Re: [PATCH v6 0/9] RISC-V: autovec: Add autovec support

2023-05-05 Thread Kito Cheng via Gcc-patches
Errr, why you just mixed in JuZhe’s patch set into this patch set? Michael Collison 於 2023年5月5日 週五,23:47寫道: > 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

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

2023-05-05 Thread Sinan via Gcc-patches
> 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() > { >

[PATCH v6 6/9] RISC-V:autovec: Add autovectorization tests for add & sub

2023-05-05 Thread Michael Collison
2023-03-02 Michael Collison Vineet Gupta * gcc.target/riscv/rvv/autovec: New directory for autovectorization tests. * gcc.target/riscv/rvv/autovec/loop-add-rv32.c: New test to verify code generation of vector add on rv32. *

[PATCH v6 9/9] RISC-V:autovec: This patch supports 8 bit auto-vectorization in riscv.

2023-05-05 Thread Michael Collison
From: Kevin Lee 2023-04-14 Kevin Lee gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/loop-add-rv32.c: Support 8bit type * gcc.target/riscv/rvv/autovec/loop-add.c: Ditto * gcc.target/riscv/rvv/autovec/loop-and-rv32.c: Ditto *

[PATCH v6 7/9] RISC-V: autovec: Verify that GET_MODE_NUNITS is a multiple of 2.

2023-05-05 Thread Michael Collison
While working on autovectorizing for the RISCV port I encountered an issue where can_duplicate_and_interleave_p assumes that GET_MODE_NUNITS is a evenly divisible by two. The RISC-V target has vector modes (e.g. VNx1DImode), where GET_MODE_NUNITS is equal to one. Tested on RISCV and

[PATCH v6 8/9] RISC-V:autovec: Add autovectorization tests for binary integer

2023-05-05 Thread Michael Collison
2023-04-05 Michael Collison * gcc.target/riscv/rvv/autovec/loop-and-rv32.c: New test to verify code generation of vector "and" on rv32. * gcc.target/riscv/rvv/autovec/loop-and.c: New test to verify code generation of vector "and" on rv64. *

[PATCH v6 4/9] RISC-V:autovec: Add target vectorization hooks

2023-05-05 Thread Michael Collison
2023-04-24 Michael Collison Juzhe Zhong * config/riscv/riscv.cc (riscv_estimated_poly_value): Implement TARGET_ESTIMATED_POLY_VALUE. (riscv_preferred_simd_mode): Implement TARGET_VECTORIZE_PREFERRED_SIMD_MODE. (riscv_get_mask_mode):

[PATCH v6 3/9] RISC-V:autovec: Add auto-vectorization support functions

2023-05-05 Thread Michael Collison
2023-04-24 Michael Collison Juzhe Zhong * config/riscv/riscv-v.cc (riscv_vector_preferred_simd_mode): New function. (get_mask_policy_no_pred): Ditto. (get_tail_policy_no_pred): Ditto. (riscv_vector_mask_mode_p): Ditto.

[PATCH v6 2/9] RISC-V: autovec: Export policy functions to global scope

2023-05-05 Thread Michael Collison
2023-03-02 Michael Collison Juzhe Zhong * config/riscv/riscv-vector-builtins.cc (get_tail_policy_for_pred): Remove static declaration to to make externally visible. (get_mask_policy_for_pred): Ditto. * config/riscv/riscv-vector-builtins.h

[PATCH v6 5/9] RISC-V:autovec: Add autovectorization patterns for binary integer & len_load/store

2023-05-05 Thread Michael Collison
2023-04-25 Michael Collison Juzhe Zhong * config/riscv/riscv.md (riscv_vector_preferred_simd_mode): Include vector-iterators.md. * config/riscv/vector-auto.md: New file containing autovectorization patterns. * config/riscv/vector.md: Remove

[PATCH v6 1/9] RISC-V: autovec: Add new predicates and function prototypes

2023-05-05 Thread Michael Collison
2023-04-24 Michael Collison Juzhe Zhong * config/riscv/riscv-protos.h (riscv_vector_preferred_simd_mode): New. (riscv_vector_mask_mode_p): Ditto. (riscv_vector_get_mask_mode): Ditto. (emit_vlmax_vsetvl): Ditto.

[PATCH v6 0/9] RISC-V: autovec: Add autovec support

2023-05-05 Thread Michael Collison
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 implementation consists of adding the new vector cost model, the autovectorization

Re: [PATCH v8] RISC-V: Add the 'zfa' extension, version 0.2.

2023-05-05 Thread Christoph Müllner
On Fri, May 5, 2023 at 5:13 PM Palmer Dabbelt wrote: > > On Fri, 05 May 2023 08:04:53 PDT (-0700), christoph.muell...@vrull.eu wrote: > > What I forgot to mention: > > Zfa is frozen and in public review: > > https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/SED4ntBkabg > > Thanks, I'd

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread David Edelsohn via Gcc-patches
On Fri, May 5, 2023 at 11:38 AM Tamar Christina wrote: > > -Original Message- > > From: Jakub Jelinek > > Sent: Friday, May 5, 2023 4:33 PM > > To: Tamar Christina > > Cc: Jeff Law ; David Edelsohn >; > > GCC Patches > > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jakub Jelinek > Sent: Friday, May 5, 2023 4:33 PM > To: Tamar Christina > Cc: Jeff Law ; David Edelsohn ; > GCC Patches > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make > configurable. > > On Fri, May 05, 2023 at 03:22:11PM +, Tamar

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 03:22:11PM +, Tamar Christina wrote: > > We require GNU make, so perhaps we could use something like $(wordlist > > 1,$(NUM_MATCH_SPLITS),$(check_p_numbers)) > > instead of > > $(shell seq 1 $(NUM_MATCH_SPLITS)) > > provided we move the check_p_numbers definition

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jakub Jelinek > Sent: Friday, May 5, 2023 4:18 PM > To: Jeff Law > Cc: David Edelsohn ; Tamar Christina > ; GCC Patches > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make > configurable. > > On Fri, May 05, 2023 at 09:04:16AM -0600, Jeff

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jakub Jelinek via Gcc-patches
On Fri, May 05, 2023 at 09:04:16AM -0600, Jeff Law via Gcc-patches wrote: > On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote: > > This patch has broken GCC bootstrap on AIX. It appears to rely upon, or > > complain about, the command "seq": > > > > /nasfarm/edelsohn/install/GCC12/bin/g++

[PATCH] Move substitute_and_fold over to use simple_dce_from_worklist

2023-05-05 Thread Andrew Pinski via Gcc-patches
While looking into a different issue, I noticed that it would take until the second forwprop pass to do some forward proping and it was because the ssa name was used more than once but the second statement was "dead" and we don't remove that until much later. So this uses simple_dce_from_worklist

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/5/23 09:08, Tamar Christina wrote: -Original Message- From: Jeff Law Sent: Friday, May 5, 2023 4:04 PM To: David Edelsohn ; Tamar Christina Cc: GCC Patches Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable. On 5/5/23 08:59, David Edelsohn via

Re: [PATCH v8] RISC-V: Add the 'zfa' extension, version 0.2.

2023-05-05 Thread Palmer Dabbelt
On Fri, 05 May 2023 08:04:53 PDT (-0700), christoph.muell...@vrull.eu wrote: What I forgot to mention: Zfa is frozen and in public review: https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/SED4ntBkabg Thanks, I'd also forgot to send that out ;). I think the only blocker here on the

Re: [COMMITTED] Remove deprecated range_fold_{unary, binary}_expr uses from ipa-*.

2023-05-05 Thread Martin Jambor
Hello, On Wed, Apr 26 2023, Aldy Hernandez via Gcc-patches wrote: > gcc/ChangeLog: > > * ipa-cp.cc (ipa_vr_operation_and_type_effects): Convert to ranger API. > (ipa_value_range_from_jfunc): Same. > (propagate_vr_across_jump_function): Same. > * ipa-fnsummary.cc

RE: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Tamar Christina via Gcc-patches
> -Original Message- > From: Jeff Law > Sent: Friday, May 5, 2023 4:04 PM > To: David Edelsohn ; Tamar Christina > > Cc: GCC Patches > Subject: Re: [PATCH 5/5] match.pd: Use splits in makefile and make > configurable. > > > > On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote: > >

Re: [PATCH v8] RISC-V: Add the 'zfa' extension, version 0.2.

2023-05-05 Thread Christoph Müllner
What I forgot to mention: Zfa is frozen and in public review: https://groups.google.com/a/groups.riscv.org/g/isa-dev/c/SED4ntBkabg On Fri, May 5, 2023 at 5:03 PM Christoph Müllner wrote: > > On Wed, Apr 19, 2023 at 11:58 AM Jin Ma wrote: > > > > This patch adds the 'Zfa' extension for riscv,

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread Jeff Law via Gcc-patches
On 5/5/23 08:59, David Edelsohn via Gcc-patches wrote: This patch has broken GCC bootstrap on AIX. It appears to rely upon, or complain about, the command "seq": /nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11 -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall

Re: [PATCH v8] RISC-V: Add the 'zfa' extension, version 0.2.

2023-05-05 Thread Christoph Müllner
On Wed, Apr 19, 2023 at 11:58 AM Jin Ma wrote: > > This patch adds the 'Zfa' extension for riscv, which is based on: > https://github.com/riscv/riscv-isa-manual/commits/zfb > > https://github.com/riscv/riscv-isa-manual/commit/1f038182810727f5feca311072e630d6baac51da > > The binutils-gdb for

Re: [PATCH 5/5] match.pd: Use splits in makefile and make configurable.

2023-05-05 Thread David Edelsohn via Gcc-patches
This patch has broken GCC bootstrap on AIX. It appears to rely upon, or complain about, the command "seq": /nasfarm/edelsohn/install/GCC12/bin/g++ -std=c++11 -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format

[PATCH V5] RISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread juzhe . zhong
From: Juzhe-Zhong Address comments from Robin. gcc/ChangeLog: * config/riscv/riscv-v.cc (preferred_simd_mode): Fix comments. * config/riscv/riscv.cc (riscv_get_arg_info): Ditto. gcc/testsuite/ChangeLog: * gcc.target/riscv/rvv/autovec/fixed-vlmax-1.c: Fix function

RE: [PATCH v2] RISC-V: Legitimise the const0_rtx for RVV indexed load/store

2023-05-05 Thread Li, Pan2 via Gcc-patches
Thank you! -Original Message- From: Kito Cheng Sent: Friday, May 5, 2023 10:52 PM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re: [PATCH v2] RISC-V: Legitimise the const0_rtx for RVV indexed load/store pushed to

Re: [PATCH] RISC-V: Allow RVV VMS{Compare}(V1, V1) simplify to VMSET

2023-05-05 Thread Kito Cheng via Gcc-patches
pushed v1 to trunk On Fri, May 5, 2023 at 8:46 PM Li, Pan2 via Gcc-patches wrote: > > Ok, sounds good. Thank you! > > Pan > > -Original Message- > From: Kito Cheng > Sent: Friday, May 5, 2023 8:37 PM > To: Li, Pan2 > Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; Wang, Yanzhang >

Re: [PATCH v2] RISC-V: Legitimise the const0_rtx for RVV indexed load/store

2023-05-05 Thread Kito Cheng via Gcc-patches
pushed to trunk, thanks :) On Thu, May 4, 2023 at 5:12 PM Pan Li via Gcc-patches wrote: > > From: Pan Li > > This patch try to legitimise the const0_rtx (aka zero register) > as the base register for the RVV indexed load/store instructions > by allowing the const as the operand of the indexed

Re: [PATCH V3] RISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread Robin Dapp via Gcc-patches
Hi Juzhe, I wasn't yet able to check this locally so just some minor comment nits: > +/* Return the vectorization machine mode for RVV according to LMUL. */ > +machine_mode > +preferred_simd_mode (scalar_mode mode) > +{ > + /* We only enable auto-vectorization when TARGET_MIN_VLEN < 128 && > +

[PATCH V2] RISC-V: Fix incorrect demand info merge in local vsetvli optimization [PR109748]

2023-05-05 Thread juzhe . zhong
From: Juzhe-Zhong This patch is fixing my recent optimization patch: https://github.com/gcc-mirror/gcc/commit/d51f2456ee51bd59a79b4725ca0e488c25260bbf In that patch, the new_info = parse_insn (i) is not correct. Since consider the following case: vsetvli a5,a4, e8,m1 .. vsetvli zero,a5,

[PATCH V4] RISC-V: Enable basic RVV auto-vectorization support.

2023-05-05 Thread juzhe . zhong
From: Juzhe-Zhong This patch is depending on https://patchwork.sourceware.org/project/gcc/patch/20230504054544.203366-1-juzhe.zh...@rivai.ai/ Fix codes according to comments of Kito. gcc/ChangeLog: * config/riscv/riscv.cc (riscv_get_arg_info): Move RVV type argument handling outside.

  1   2   >