Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-08-02 Thread juzhe.zh...@rivai.ai
: richard.sandiford; gcc-patches Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* On Wed, 2 Aug 2023, juzhe.zh...@rivai.ai wrote: > Thanks Richard so much. > > Forgive me asking question again :) > > Is this following code correct for you ? Well, I w

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-08-02 Thread juzhe.zh...@rivai.ai
CC: richard.sandiford; gcc-patches Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* On Wed, 2 Aug 2023, juzhe.zh...@rivai.ai wrote: > Thanks Richard so much. > > Forgive me asking question again :) > > Is this following code correct for you ? Well,

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-08-02 Thread Richard Biener via Gcc-patches
else if (reduc_idx >= 0) > + gcc_unreachable (); > +} > > Thanks. > > > juzhe.zh...@rivai.ai > > From: Richard Biener > Date: 2023-08-02 15:49 > To: ??? > CC: richard.sandiford; gcc-patches > Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorizat

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-08-02 Thread juzhe.zh...@rivai.ai
s += 2; + } + else if (reduc_idx >= 0) + gcc_unreachable (); +} Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-08-02 15:49 To: 钟居哲 CC: richard.sandiford; gcc-patches Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* On Mon, 31 Jul 2023,

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-08-02 Thread Richard Biener via Gcc-patches
t; > with -ffast-math (probably rightfully so). I then get .FMAs > vectorized and .COND_FMA folded. > > > The thing I wonder is that whether this condtion: > > > > if (mask_opno >= 0 && reduc_idx >= 0) > > > > or similar as len > > if (len_op

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread 钟居哲
t; or similar as len > if (len_opno >= 0 && reduc_idx >= 0) > > Whether they are redundant in vectorizable_call ? > > > juzhe.zh...@rivai.ai > > From: Richard Biener > Date: 2023-07-31 21:33 > To: juzhe.zh...@rivai.ai > CC: richard.sandiford; gcc-patch

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Biener via Gcc-patches
> juzhe.zh...@rivai.ai > > From: Richard Biener > Date: 2023-07-31 21:33 > To: juzhe.zh...@rivai.ai > CC: richard.sandiford; gcc-patches > Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* > On Mon, 31 Jul 2023, juzhe.zh...@rivai.ai wrote: > >

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread 钟居哲
Whether they are redundant in vectorizable_call ? juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-07-31 21:33 To: juzhe.zh...@rivai.ai CC: richard.sandiford; gcc-patches Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* On Mon, 31 Jul 2023, juzhe.zh...@rivai.ai wrote: > Hi,

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Biener via Gcc-patches
> To: juzhe.zh...@rivai.ai > CC: richard.sandiford; gcc-patches > Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* > On Mon, 31 Jul 2023, juzhe.zh...@rivai.ai wrote: > > > Ok . Thanks Richard. > > > > Could you give me a case that

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread juzhe.zh...@rivai.ai
ate: 2023-07-31 20:00 To: juzhe.zh...@rivai.ai CC: richard.sandiford; gcc-patches Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* On Mon, 31 Jul 2023, juzhe.zh...@rivai.ai wrote: > Ok . Thanks Richard. > > Could you give me a case that SVE can vectorize

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Biener via Gcc-patches
iled. I think you need to use fma from math.h together with -ffast-math to get fma. Richard. > Thanks. > > > juzhe.zh...@rivai.ai > > From: Richard Sandiford > Date: 2023-07-31 18:19 > To: Juzhe-Zhong > CC: gcc-patches; rguenther > Subject: Re: [PATCH V2] VECT: S

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread juzhe.zh...@rivai.ai
18:19 To: Juzhe-Zhong CC: gcc-patches; rguenther Subject: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* Juzhe-Zhong writes: > Hi, Richard and Richi. > > Base on the suggestions from Richard: > https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625396.html > > Th

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread juzhe.zh...@rivai.ai
Richard Biener Date: 2023-07-31 18:45 To: juzhe.zh...@rivai.ai CC: gcc-patches; richard.sandiford Subject: Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_* On Mon, 31 Jul 2023, juzhe.zh...@rivai.ai wrote: > Hi, Richard. Thanks a lot for the comment > > >> In your

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Biener via Gcc-patches
at the moment > > I also want to vectorize FMA into COND_LEN_FMA even reduc_idx < 0. > Could I relax this condition for COND_LEN_* since it will improve RVV codegen > a lot. reduc_idx < 0 means this stmt isn't part of a reduction. So yes, you can vectorize FMA as COND_LEN_FMA with dumm

Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Sandiford via Gcc-patches
Juzhe-Zhong writes: > Hi, Richard and Richi. > > Base on the suggestions from Richard: > https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625396.html > > This patch choose (1) approach that Richard provided, meaning: > > RVV implements cond_* optabs as expanders. RVV therefore supports > both

Re: Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread juzhe.zh...@rivai.ai
ly need to add 2 arguments. But when vectorizing FMA into COND_LEN_FMA, we need to add 4 arguments (mask,else,len,bias). >>as said, >>no idea why we special case reduc_idx >= 0 at the moment I also want to vectorize FMA into COND_LEN_FMA even reduc_idx < 0. Could I relax th

Re: [PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-31 Thread Richard Biener via Gcc-patches
On Fri, 28 Jul 2023, Juzhe-Zhong wrote: > Hi, Richard and Richi. > > Base on the suggestions from Richard: > https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625396.html > > This patch choose (1) approach that Richard provided, meaning: > > RVV implements cond_* optabs as expanders. RVV

[PATCH V2] VECT: Support CALL vectorization for COND_LEN_*

2023-07-28 Thread Juzhe-Zhong
Hi, Richard and Richi. Base on the suggestions from Richard: https://gcc.gnu.org/pipermail/gcc-patches/2023-July/625396.html This patch choose (1) approach that Richard provided, meaning: RVV implements cond_* optabs as expanders. RVV therefore supports both IFN_COND_ADD and IFN_COND_LEN_ADD.