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 (old_r

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 v1,0(a0

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 shouldn

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

2023-05-30 Thread Richard Biener via Gcc-patches
t; 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 > Su

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 >> https://gcc.gnu.org/pipermail/gcc

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 > >> https://gcc.gnu.org/pipermail/gcc-patches

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

2023-05-31 Thread Kewen.Lin via Gcc-patches
zer itself like with > your patch.  I'm going to wait for Richards input though since 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 u

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: >> >> https://gcc.gnu.org/pipermail/gcc-patches/2023-May/620101.html

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

2023-05-30 Thread juzhe.zh...@rivai.ai
as this 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 Rich

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

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

2023-05-30 Thread 钟居哲
g 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

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

2023-05-30 Thread 钟居哲
5-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 inside the > loop. This is unacceptable. For example?if number of

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

2023-05-30 Thread 钟居哲
not a big deal for RVV. 2. This patch can solve power's issue. Thanks. 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

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

2023-05-30 Thread 钟居哲
VV side, it can 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 num

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

2023-05-30 Thread 钟居哲
086.html 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 od

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

2023-05-30 Thread juzhe.zh...@rivai.ai
ter well reviewed) or we 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: t

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

2023-05-30 Thread Richard Biener via Gcc-patches
ation to iteration (but we know a lower 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 fl

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

2023-05-30 Thread juzhe.zh...@rivai.ai
a/show_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 Su

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

2023-05-31 Thread juzhe.zh...@rivai.ai
chard 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: >> https://gcc.gnu.org/pipermail/gcc-p

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

2023-05-31 Thread juzhe.zh...@rivai.ai
we can 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

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 SELECT

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

2023-05-31 Thread Richard Biener via Gcc-patches
i > > From: Richard Sandiford > Date: 2023-05-31 15:28 > 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: > &g

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

2023-05-31 Thread juzhe.zh...@rivai.ai
uzhe.zhong\@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: 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 钟居哲
and do my 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, 3