Re: Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-05 Thread juzhe.zh...@rivai.ai
t's more comprehensive than I wrote. I will send V3 patch with appending your comments. Thanks you so much! juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-06-05 18:09 To: juzhe.zhong\@rivai.ai CC: gcc-patches; rguenther Subject: Re: [PATCH V2] VECT: Add SELECT_VL support "juz

Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-05 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Hi, Richard. > >>> No, I meant that the comment I quoted seemed to be saying that solution >>> 3 wasn't possible. The comment seemed to say that we would need to do >>> solution 1. > I am so sorry that I didn't write the comments accurately. > Could you help me wi

Re: Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-05 Thread juzhe.zh...@rivai.ai
n "vsetvli "? "vsetvli zero" is the same cost as "vsetvli gpr", I think for (b), solution 2 and solution 3 should be almost the same. juzhe.zh...@rivai.ai From: Richard Sandiford Date: 2023-06-05 15:57 To: juzhe.zhong\@rivai.ai CC: gcc-patches; rguenth

Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-05 Thread Richard Sandiford via Gcc-patches
Richard Sandiford writes: > "juzhe.zh...@rivai.ai" writes: >> Hi, Richard. Thanks for the comments. >> If we use SELECT_VL to refer only to the target-independent ifn, I don't see why this last bit is true. >> Could you give me more details and information about this since I am not >>

Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-05 Thread Richard Sandiford via Gcc-patches
"juzhe.zh...@rivai.ai" writes: > Hi, Richard. Thanks for the comments. > >>> If we use SELECT_VL to refer only to the target-independent ifn, I don't >>> see why this last bit is true. > Could you give me more details and information about this since I am not sure > whether I catch up with you.

Re: Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-05 Thread juzhe.zh...@rivai.ai
flow of single-rgoup: ... length = min (vf) ... vsetvli zero. length <=== insert by VSETLVI PASS load (pointer IV) vadd. ... pointer IV = pointer IV + VF I want to optimize it into: ... length = vsetvli (Vf) ... <=== not need to insert vsetvlli. load (pointer IV) vadd. ... pointer IV =

Re: [PATCH V2] VECT: Add SELECT_VL support

2023-06-04 Thread Richard Sandiford via Gcc-patches
juzhe.zh...@rivai.ai writes: > + /* If we're using decrement IV approach in loop control, we can use output > of > + SELECT_VL to adjust IV of loop control and data reference when it > satisfies > + the following checks: > + > + (a) SELECT_VL is supported by the target. > + (b) L