RE: [PATCH] RISC-V: Eliminate the magic number in riscv-v.cc

2023-05-28 Thread Li, Pan2 via Gcc-patches
Thanks Kito, will commit this after the vec_init repeated sequence patch. Pan -Original Message- From: Kito Cheng Sent: Monday, May 29, 2023 10:20 AM To: Li, Pan2 Cc: Robin Dapp ; gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@sifive.com; Wang, Yanzhang Subject: Re:

[committed 2/2] RISC-V: Add RVV FMA auto-vectorization support

2023-05-28 Thread Pan Li via Gcc-patches
From: Juzhe-Zhong This patch support FMA auto-vectorization pattern. Let's RA decide vmacc or vmadd. Signed-off-by: Juzhe-Zhong gcc/ChangeLog: * config/riscv/autovec.md (fma4): New pattern. (*fma): Ditto. * config/riscv/riscv-protos.h (enum insn_type): New enum.

[committed 1/2] RISC-V: Fix ternary instruction attribute bug

2023-05-28 Thread Pan Li via Gcc-patches
From: Juzhe-Zhong Fix bug of vector.md which generate incorrect information to VSETVL PASS when testing FMA auto vectorization ternop-3.c. Signed-off-by: Juzhe-Zhong gcc/ChangeLog: * config/riscv/vector.md: Fix vimuladd instruction bug. --- gcc/config/riscv/vector.md | 2 +- 1 file

RE: [PATCH] RISC-V: Remove redundant printf of abs-run.c

2023-05-28 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Gcc-patches On Behalf Of Kito Cheng via Gcc-patches Sent: Monday, May 29, 2023 11:43 AM To: 钟居哲 Cc: GCC Patches ; Kito Cheng ; Palmer Dabbelt ; Palmer Dabbelt ; Jeff Law ; Robin Dapp Subject: Re: [PATCH] RISC-V: Remove redundant

RE: Re: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support

2023-05-28 Thread Li, Pan2 via Gcc-patches
Committed with 2 patches, thanks Kito. Pan From: juzhe.zh...@rivai.ai Sent: Monday, May 29, 2023 11:19 AM To: kito.cheng Cc: gcc-patches ; Kito.cheng ; palmer ; Robin Dapp ; jeffreyalaw ; Li, Pan2 Subject: Re: Re: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support This is existing

[PATCH V2] RISC-V: Add floating-point to integer conversion RVV auto-vectorization support

2023-05-28 Thread juzhe . zhong
From: Juzhe-Zhong Even though we can't support floating-point operations which are depending on FRM yet, (for example vfadd support is blocked) since the RVV intrinsic doc is not updated and we can't support mode switching for this. We can support floating-point to integer conversion now since

Re: [PATCH] RISC-V: Fix VSETVL PASS ICE on SLP auto-vectorization

2023-05-28 Thread Kito Cheng via Gcc-patches
Ok, and just make sure this only appear for trunk, right? juzhe.zh...@rivai.ai 於 2023年5月29日 週一,12:19寫道: > This patch is fixing VSETVL PASS bug. Ok for trunk ? > > > > juzhe.zh...@rivai.ai > > From: juzhe.zhong > Date: 2023-05-26 11:01 > To: gcc-patches > CC: kito.cheng; kito.cheng; palmer;

Re: [PATCH] RISC-V: Fix VSETVL PASS ICE on SLP auto-vectorization

2023-05-28 Thread juzhe.zh...@rivai.ai
This patch is fixing VSETVL PASS bug. Ok for trunk ? juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-05-26 11:01 To: gcc-patches CC: kito.cheng; kito.cheng; palmer; palmer; jeffreyalaw; rdapp.gcc; pan2.li; Juzhe-Zhong Subject: [PATCH] RISC-V: Fix VSETVL PASS ICE on SLP auto-vectorization

[RFC] light expander sra for parameters and returns

2023-05-28 Thread Jiufu Guo via Gcc-patches
Hi, Previously, I was investigating some struct parameters and returns related PRs 69143/65421/108073. Investigating the issues case by case, and drafting patches for each of them one by one. This would help us to enhance code incrementally. While, this way, patches would interact with each

[PATCH] RISC-V: Add floating-point to integer conversion RVV auto-vectorization support

2023-05-28 Thread juzhe . zhong
From: Juzhe-Zhong Even though we can't support floating-point operations which are depending on FRM yet, (for example vfadd support is blocked) since the RVV intrinsic doc is not updated and we can't support mode switching for this. We can support floating-point to integer conversion now since

Re: [PATCH] RISC-V: Add the option "-mdisable-multilib-check" to avoid multilib checks breaking the compilation.

2023-05-28 Thread Jin Ma via Gcc-patches
> > > > When testing a extension, it is often necessary for a certain program > > > > not to > > > > need some kind of extension, such as the bitmanip extension, to > > > > evaluate the > > > > performance or codesize of the extension. However, the current multilib > > > > rules > > > > will

Re: [PATCH] RISC-V: Remove redundant printf of abs-run.c

2023-05-28 Thread Kito Cheng via Gcc-patches
Ok 於 2023年5月29日 週一 11:39 寫道: > From: Juzhe-Zhong > > Notice that this testcase cause unexpected fail: > FAIL: gcc.target/riscv/rvv/autovec/unop/abs-run.c (test for excess errors) > Excess errors: >

[PATCH] RISC-V: Remove redundant printf of abs-run.c

2023-05-28 Thread juzhe . zhong
From: Juzhe-Zhong Notice that this testcase cause unexpected fail: FAIL: gcc.target/riscv/rvv/autovec/unop/abs-run.c (test for excess errors) Excess errors:

Re: [PATCH V2] [vect]Enhance NARROW FLOAT_EXPR vectorization by truncating integer to lower precision.

2023-05-28 Thread Hongtao Liu via Gcc-patches
ping. On Mon, May 8, 2023 at 9:59 AM liuhongt wrote: > > > > @@ -4799,7 +4800,8 @@ vect_create_vectorized_demotion_stmts (vec_info > > > *vinfo, vec *vec_oprnds, > > >stmt_vec_info stmt_info, > > >vec _dsts, > > >

RE: [PATCH V2] RISC-V: Fix incorrect VXRM configuration in mode switching for CALL and ASM

2023-05-28 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Kito Cheng Sent: Monday, May 29, 2023 10:22 AM To: juzhe.zh...@rivai.ai Cc: gcc-patches@gcc.gnu.org; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com; jeffreya...@gmail.com; rdapp@gmail.com; Li, Pan2 Subject: Re:

Re: Re: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support

2023-05-28 Thread juzhe.zh...@rivai.ai
This is existing bug in GCC 13. I think I should split into 2 patches. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-05-29 11:17 To: juzhe.zhong CC: gcc-patches; kito.cheng; palmer; rdapp.gcc; jeffreyalaw; pan2.li Subject: Re: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support LGTM,

Re: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support

2023-05-28 Thread Kito Cheng via Gcc-patches
LGTM, but with one question. On Fri, May 26, 2023 at 7:36 PM wrote: > > From: Juzhe-Zhong > > This patch support FMA auto-vectorization pattern. > 1. Let's RA decide vmacc or vmadd. > 2. Fix bug of vector.md which generate incorrect information to VSETVL >PASS when testing ternop-3.c. Does

Re: [PATCH] RISC-V: Add the option "-mdisable-multilib-check" to avoid multilib checks breaking the compilation.

2023-05-28 Thread Kito Cheng via Gcc-patches
On Mon, May 29, 2023 at 10:53 AM Jin Ma wrote: > > > > When testing a extension, it is often necessary for a certain program not > > > to > > > need some kind of extension, such as the bitmanip extension, to evaluate > > > the > > > performance or codesize of the extension. However, the current

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

2023-05-28 Thread Jason Merrill via Gcc-patches
On 5/13/23 06:58, Eric Botcazou wrote: I think we really need Eric (as one who e.g. introduced the DECL_INVARIANT_P apparently for this kind of stuff) to have a look at that on the Ada side. I have been investigating this for a few days and it's no small change for Ada and probably for other

Re: [PATCH 1/1] [V2] [RISC-V] support cm.push cm.pop cm.popret in zcmp

2023-05-28 Thread Kito Cheng via Gcc-patches
Thanks for this patch, just few minor comment, I think this is pretty close to accept :) Could you reference JiaWei's match_parallel[1] to prevent adding bunch of *_offset_operand and stack_push_up_to_*_operand? [1]

Re: [PATCH] RISC-V: Add the option "-mdisable-multilib-check" to avoid multilib checks breaking the compilation.

2023-05-28 Thread Jin Ma via Gcc-patches
> > When testing a extension, it is often necessary for a certain program not to > > need some kind of extension, such as the bitmanip extension, to evaluate the > > performance or codesize of the extension. However, the current multilib > > rules > > will report an error when it is not a

RE: [PATCH v2] RISC-V: Add ZVFHMIN extension to the -march= option

2023-05-28 Thread Li, Pan2 via Gcc-patches
Committed, thanks Kito. Pan -Original Message- From: Kito Cheng Sent: Monday, May 29, 2023 10:40 AM 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: Add ZVFHMIN extension to the -march= option LGTM

Re: [PATCH v2] RISC-V: Add ZVFHMIN extension to the -march= option

2023-05-28 Thread Kito Cheng via Gcc-patches
LGTM On Mon, May 29, 2023 at 10:24 AM Pan Li via Gcc-patches wrote: > > From: Pan Li > > This patch would like to add new sub extension (aka ZVFHMIN) to the > -march= option. To make it simple, only the sub extension itself is > involved in this patch, and the underlying FP16 related RVV

RE: [PATCH] RISC-V: Add ZVFHMIN extension to the -march= option

2023-05-28 Thread Li, Pan2 via Gcc-patches
Thanks Kito, update the PATCH v2 for addressing comments. https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619868.html Pan -Original Message- From: Kito Cheng Sent: Monday, May 29, 2023 10:18 AM To: Li, Pan2 Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai; kito.ch...@sifive.com;

[PATCH v2] RISC-V: Add ZVFHMIN extension to the -march= option

2023-05-28 Thread Pan Li via Gcc-patches
From: Pan Li This patch would like to add new sub extension (aka ZVFHMIN) to the -march= option. To make it simple, only the sub extension itself is involved in this patch, and the underlying FP16 related RVV intrinsic API depends on the TARGET_ZVFHMIN. The Zvfhmin extension depends on the

Re: [PATCH V2] RISC-V: Fix incorrect VXRM configuration in mode switching for CALL and ASM

2023-05-28 Thread Kito Cheng via Gcc-patches
LGTM, thanks :) On Thu, May 25, 2023 at 3:00 PM wrote: > > From: Juzhe-Zhong > > Currently mode switching incorrect codegen for the following case: > void fn (void); > > void f (void * in, void *out, int32_t x, int n, int m) > { > for (int i = 0; i < n; i++) { > vint32m1_t v =

Re: [PATCH] RISC-V: Eliminate the magic number in riscv-v.cc

2023-05-28 Thread Kito Cheng via Gcc-patches
LGTM On Fri, May 26, 2023 at 2:32 PM Li, Pan2 via Gcc-patches wrote: > > Thanks Robin. > > Sorry for not mentioned that it depends on another patch > https://gcc.gnu.org/pipermail/gcc-patches/2023-May/619536.html, which is in > the reviewing queue. > > Yes, totally agree we can remove the

Re: [PATCH] RISC-V: Add ZVFHMIN extension to the -march= option

2023-05-28 Thread Kito Cheng via Gcc-patches
On Mon, May 29, 2023 at 9:32 AM Li, Pan2 via Gcc-patches wrote: > > Sorry for disturbing but please help to take this PATCH in front of the > reviewing queue as it blocks the RVV FP16 intrinsic support. Thanks a lot. > > Pan > > -Original Message- > From: Li, Pan2 > Sent: Thursday, May

RE: [PATCH] RISC-V: Add ZVFHMIN extension to the -march= option

2023-05-28 Thread Li, Pan2 via Gcc-patches
Sorry for disturbing but please help to take this PATCH in front of the reviewing queue as it blocks the RVV FP16 intrinsic support. Thanks a lot. Pan -Original Message- From: Li, Pan2 Sent: Thursday, May 25, 2023 8:46 PM To: gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai;

Ping^^ [PATCH v3] Add condition coverage profiling

2023-05-28 Thread Jørgen Kvalsvik via Gcc-patches
On 11/04/2023 15:23, Jørgen Kvalsvik wrote: > On 05/12/2022 10:40, Jørgen Kvalsvik wrote: >> This patch adds support in gcc+gcov for modified condition/decision >> coverage (MC/DC) with the -fprofile-conditions flag. MC/DC is a type of >> test/code coverage and it is particularly important in the

Re: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support

2023-05-28 Thread juzhe.zh...@rivai.ai
Ping。Ok for trunk? juzhe.zh...@rivai.ai From: juzhe.zhong Date: 2023-05-26 19:35 To: gcc-patches CC: kito.cheng; palmer; rdapp.gcc; jeffreyalaw; kito.cheng; pan2.li; Juzhe-Zhong Subject: [PATCH V2] RISC-V: Add RVV FMA auto-vectorization support From: Juzhe-Zhong This patch support FMA

Re: [PATCH] c++: mangle noexcept-expr [PR70790]

2023-05-28 Thread Jason Merrill via Gcc-patches
On 5/19/23 15:10, Patrick Palka wrote: On Fri, 19 May 2023, Patrick Palka wrote: This implements noexcept-expr mangling (and demangling) as per the Itanium ABI. Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK for trunk? PR c++/70790 gcc/cp/ChangeLog: *

[PATCH] Refactor wi::bswap as a function (instead of a method).

2023-05-28 Thread Roger Sayle
This patch implements Richard Sandiford's suggestion from https://gcc.gnu.org/pipermail/gcc-patches/2023-May/618215.html that wi::bswap (and a new wi::bitreverse) should be functions, and ideally only accessors are member functions. This patch implements the first step, moving/refactoring

Re: [PATCH V2] RISC-V: Fix zero-scratch-regs-3.c fail

2023-05-28 Thread Kito Cheng via Gcc-patches
LGTM 於 2023年5月26日 週五 08:46 寫道: > From: Juzhe-Zhong > > gcc/ChangeLog: > > * config/riscv/riscv.cc (vector_zero_call_used_regs): Add explict > VL and drop VL in ops. > > --- > gcc/config/riscv/riscv.cc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH] RISC-V: Allow all const_vec_duplicates as constants.

2023-05-28 Thread Kito Cheng via Gcc-patches
Lgtm Robin Dapp 於 2023年5月26日 週五 22:10 寫道: > Hi, > > as we can always broadcast an integer constant to a vector register > allow them in riscv_const_insns. We need as many instructions as > it takes to generate the constant and one vmv.vx. > > Regards > Robin > > gcc/ChangeLog: > > *