Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread 钟居哲
downstream regression (Regression is very big and include so many benchmarks). Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-31 18:53 To: juzhe.zh...@rivai.ai CC: richard.sandiford; gcc-patches; linkw Subject: Re: Re: [PATCH] VECT: Change flow of decrement IV On Wed, 31 May 2023

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Richard Biener via Gcc-patches
On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: > Thanks Richard. > Seems that this patch's approach is ok to trunk? > Maybe the only thing we should do is to wait Kewen's testing feedback, am I > right ? Can you repost the patch with Kevens fix and state how you tested it? Thanks, Richard.

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread juzhe.zh...@rivai.ai
\@rivai.ai; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV Richard Biener via Gcc-patches writes: > On Wed, 31 May 2023, Richard Sandiford wrote: > >> Richard Biener writes: >> > On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: >> > >>

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Richard Sandiford via Gcc-patches
Richard Biener via Gcc-patches writes: > On Wed, 31 May 2023, Richard Sandiford wrote: > >> Richard Biener writes: >> > On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: >> > >> >> Hi?all. I have posted my several investigations: >> >>

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Richard Biener via Gcc-patches
To: Richard Biener > CC: juzhe.zhong\@rivai.ai; gcc-patches; linkw > Subject: Re: [PATCH] VECT: Change flow of decrement IV > Richard Biener writes: > > On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: > > > >> Hi?all. I have posted my several investigations: > &

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread juzhe.zh...@rivai.ai
Oh, it's correct fix. Thanks for catching this. juzhe.zh...@rivai.ai From: Kewen.Lin Date: 2023-05-31 15:38 To: juzhe.zh...@rivai.ai CC: richard.sandiford; gcc-patches; rguenther Subject: Re: [PATCH] VECT: Change flow of decrement IV > Hi, Richi. > >>> Note with SEL

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread juzhe.zh...@rivai.ai
an make this patch merged and record the enhancement of SCEV in bugzilla to see we can improve that in the future. Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-31 15:38 To: Richard Sandiford CC: juzhe.zh...@rivai.ai; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change fl

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Kewen.Lin via Gcc-patches
e he > seems to disagree. >   > Note with SELECT_VL all bets will be off since as I understand the > value it gives can vary from iteration to iteration (but we know > a lower and maybe an upper bound?) >   > Thanks, > Richard. >   >

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Richard Biener via Gcc-patches
On Wed, 31 May 2023, Richard Sandiford wrote: > Richard Biener writes: > > On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: > > > >> Hi?all. I have posted my several investigations: > >> https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620101.html > >>

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread juzhe.zh...@rivai.ai
: juzhe.zhong\@rivai.ai; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV Richard Biener writes: > On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: > >> Hi?all. I have posted my several investigations: >> https://gcc.gnu.org/pipermail/gcc-patches/2023-May

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Richard Sandiford via Gcc-patches
Richard Biener writes: > On Wed, 31 May 2023, juzhe.zh...@rivai.ai wrote: > >> Hi?all. I have posted my several investigations: >> https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620101.html >> https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620105.html >>

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread juzhe.zh...@rivai.ai
w_bug.cgi?id=109971, Kewen is happy with this patch, turns out this patch can fix power's issue. So, Let's wait for Richard's comments. Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-31 14:41 To: juzhe.zh...@rivai.ai CC: richard.sandiford; gcc-patches; linkw Subject: Re: Re: [PATC

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-31 Thread Richard Biener via Gcc-patches
and maybe an upper bound?) Thanks, Richard. > Thanks. > > > juzhe.zh...@rivai.ai > > From: ??? > Date: 2023-05-30 23:05 > To: rguenther > CC: richard.sandiford; gcc-patches; linkw > Subject: Re: Re: [PATCH] VECT: Change flow of decrement IV > More information

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread juzhe.zh...@rivai.ai
should extend SCEV/IVOPTS ? Thanks. juzhe.zh...@rivai.ai From: 钟居哲 Date: 2023-05-30 23:05 To: rguenther CC: richard.sandiford; gcc-patches; linkw Subject: Re: Re: [PATCH] VECT: Change flow of decrement IV More information of power's testcase: Before this patch: test_npeel_int16_t: lui a4,%hi(

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread 钟居哲
tml or not? Or you have another plan ? Thanks. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-31 00:40 To: 钟居哲 CC: richard.sandiford; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV Am 30.05.2023 um 14:38 schrieb 钟居哲 :  >> That's odd,

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread 钟居哲
unroll now. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-30 20:33 To: juzhe.zhong CC: Richard Sandiford; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV On Tue, 30 May 2023, juzhe.zhong wrote: > This patch will generate the number of rgroup ?

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread 钟居哲
juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-30 20:33 To: juzhe.zhong CC: Richard Sandiford; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV On Tue, 30 May 2023, juzhe.zhong wrote: > This patch will generate the number of rgroup ?mov? instructions insid

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread 钟居哲
g CC: Richard Sandiford; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV On Tue, 30 May 2023, juzhe.zhong wrote: > This patch will generate the number of rgroup ?mov? instructions inside the > loop. This is unacceptable. For example?if number of rgroups=3? will be 3 more

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread 钟居哲
instruction in preheader and 1 more mv instruction inside the loop. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-05-30 20:33 To: juzhe.zhong CC: Richard Sandiford; gcc-patches; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV On Tue, 30 May 2023, juzhe.zhong wrote: > This patc

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread Richard Biener via Gcc-patches
> to fix it. That's odd, you only need to adjust the IV which is used in the exit test, not all the others. > Replied Message > From > Richard Sandiford > Date > 05/30/2023 19:41 > To > juzhe.zh...@rivai.ai > Cc > gcc-patches, > rguenther, > linkw > Subject

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread Richard Sandiford via Gcc-patches
"juzhe.zhong" writes: > Maybe we can include rgroup number into select vl pattern?So that, I always > use select vl pattern. In my backend, if it is single rgroup,we gen vsetvl, > otherwise we gen min. That just seems to be a way of hiding an “is the target RVV?” test though. IMO targets

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Before this patch: > foo: > ble a2,zero,.L5 > csrr a3,vlenb > srli a4,a3,2 > .L3: > minu a5,a2,a4 > vsetvli zero,a5,e32,m1,ta,ma > vle32.v v2,0(a1) > vle32.v v1,0(a0) > vsetvli t1,zero,e32,m1,ta,ma > vadd.vv v1,v1,v2 > vsetvli zero,a5,e32,m1,ta,ma > vse32.v

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread juzhe.zh...@rivai.ai
by SELET_VL). juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-05-30 19:31 To: juzhe.zhong CC: gcc-patches; rguenther; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV juzhe.zh...@rivai.ai writes: > From: Ju-Zhe Zhong > > Follow Richi's suggestion, I change curr

Re: Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread juzhe.zh...@rivai.ai
his flow is better to power (SCEV)。 juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-05-30 19:31 To: juzhe.zhong CC: gcc-patches; rguenther; linkw Subject: Re: [PATCH] VECT: Change flow of decrement IV juzhe.zh...@rivai.ai writes: > From: Ju-Zhe Zhong > > Follow Richi's s

Re: [PATCH] VECT: Change flow of decrement IV

2023-05-30 Thread Richard Sandiford via Gcc-patches
juzhe.zh...@rivai.ai writes: > From: Ju-Zhe Zhong > > Follow Richi's suggestion, I change current decrement IV flow from: > > do { >remain -= MIN (vf, remain); > } while (remain != 0); > > into: > > do { >old_remain = remain; >len = MIN (vf, remain); >remain -= vf; > } while