[PATCH] RISC-V: Fix PR108279

2023-04-21 Thread juzhe . zhong
From: Juzhe-Zhong PR 108270 Fix issue: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108270. Consider the following testcase: void f (void * restrict in, void * restrict out, int l, int n, int m) { for (int i = 0; i < l; i++){ for (int j = 0; j < m; j++){ for (int k = 0; k

Re: [PATCH] RISC-V: Fix PR108279

2023-04-12 Thread Jeff Law via Gcc-patches
On 3/27/23 00:59, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong PR 108270 Fix bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108270. Consider the following testcase: void f (void * restrict in, void * restrict out, int l, int n, int m) { for (int i = 0; i < l; i++){

Re: [PATCH] RISC-V: Fix PR108279

2023-04-12 Thread Jeff Law via Gcc-patches
On 4/5/23 07:53, juzhe.zh...@rivai.ai wrote: >> So fusion in this context is really about identifying cases where two configuration settings are equivalent and you "fuse" them together. Presumably this is only going to be possible when the vector insns are just doing data movement rather

Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread Jeff Law via Gcc-patches
On 4/11/23 17:09, juzhe.zh...@rivai.ai wrote: I don't want to seperate VSETVL PASS into 2 seperate PASS. I want make everything cleaner. Well, two pass vsetvl might actually be cleaner. But as I've noted before, now is not the time to debate the vsetvl implementation detail. We've got much

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread juzhe.zhong
juzhe.zhong CC: gcc-patches; kito.cheng; palmer Subject: Re: [PATCH] RISC-V: Fix PR108279 On 4/11/23 02:55, Richard Biener wrote: > > Just to throw in a comment here - I think you should present LCM > with something it can identify as the same for compatible vsetvl and >

Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread Jeff Law via Gcc-patches
On 4/11/23 02:55, Richard Biener wrote: Just to throw in a comment here - I think you should present LCM with something it can identify as the same for compatible vsetvl and then it should just work? OTOH if "compatible" is not transitive that's not possible (but then I can't quickly make

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread juzhe.zh...@rivai.ai
1 19:19 To: juzhe.zh...@rivai.ai CC: jeffreyalaw; gcc-patches; kito.cheng; palmer Subject: Re: Re: [PATCH] RISC-V: Fix PR108279 On Tue, Apr 11, 2023 at 11:19 AM juzhe.zh...@rivai.ai wrote: > > No, we can only pass "available" to LCM. > Passing "compatible" to LCM can not w

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread Richard Biener via Gcc-patches
ot;vadd" and "vle32", > so LCM will hoist "vsetvl e8,mf8,TU" outside the LOOP > and remove all vsetvls inside the loop. > > > juzhe.zh...@rivai.ai > > > From: Richard Biener > Date: 2023-04-11 16:55 > To: juzhe.zh

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread juzhe.zh...@rivai.ai
for both "vadd" and "vle32", so LCM will hoist "vsetvl e8,mf8,TU" outside the LOOP and remove all vsetvls inside the loop. juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-04-11 16:55 To: juzhe.zhong CC: Jeff Law; gcc-patches; kito.cheng; palmer Subject: Re:

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-11 Thread Richard Biener via Gcc-patches
thing (local demand?), whatever it is, make it > >> clearer in the comment. > > Sorry for bad comments in the codes. Currently, I am working on the first > patch > of auto-vectorization. After I sent the first patch of auto-vectorization for > you to > review. I would

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-05 Thread juzhe.zhong
ly, I am working on the first patch of auto-vectorization. After I sent the first patch of auto-vectorization for you to review. I would like to re-check all the comments and code style of VSETVL PASS. And refine them. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-04-05 21:05 To: juzhe.zhong;

Re: [PATCH] RISC-V: Fix PR108279

2023-04-05 Thread Jeff Law via Gcc-patches
On 4/2/23 16:40, juzhe.zh...@rivai.ai wrote: This point is seletected not because LCM but by Phase 3 (VL/VTYPE demand info backward fusion and propogation) which is I introduced into VSETVL PASS to enhance LCM && improve vsetvl instruction performance. So fusion in this context is really

Re: Re: [PATCH] RISC-V: Fix PR108279

2023-04-02 Thread juzhe.zhong
sue when I start to implement VSETVL PASS. I leaved it to be fixed after I finished all target GCC 13 features. And Kito postpone this patch to be merged after GCC 14 is open. juzhe.zh...@rivai.ai From: Jeff Law Date: 2023-04-03 03:41 To: juzhe.zhong; gcc-patches CC: kito.cheng; palmer Subject: R

Re: [PATCH] RISC-V: Fix PR108279

2023-04-02 Thread Jeff Law via Gcc-patches
On 3/27/23 00:59, juzhe.zh...@rivai.ai wrote: From: Juzhe-Zhong PR 108270 Fix bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108270. Consider the following testcase: void f (void * restrict in, void * restrict out, int l, int n, int m) { for (int i = 0; i < l; i++){

[PATCH] RISC-V: Fix PR108279

2023-03-27 Thread juzhe . zhong
From: Juzhe-Zhong PR 108270 Fix bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108270. Consider the following testcase: void f (void * restrict in, void * restrict out, int l, int n, int m) { for (int i = 0; i < l; i++){ for (int j = 0; j < m; j++){ for (int k = 0; k <