Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-20 Thread Kito Cheng via Gcc-patches
Hi Robin: Share with you more context that I've discussed with Ju-Zhe, and look for comments from you :) There is 3 different auto vectorization flavor: - VLA - VLS fixed-vlmax (Name TBD) - (Traditional) VLS I think I don't need to explain too much on VLA. So let we focus on second and third: V

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-20 Thread juzhe.zh...@rivai.ai
Ahhh. These compile options are not finalized. I just ask kito provide me some compile option that I can specify LMUL && auto-vectorization mode && vector-length (scalable or fixed-length) in order to have chances test auto-vectorizaiton fully for example: fully testing LMUL = 1/2/4/8 auto-vecto

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-20 Thread juzhe.zh...@rivai.ai
4-20 17:31 To: juzhe.zh...@rivai.ai CC: Robin Dapp; gcc-patches; palmer; jeffreyalaw Subject: Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV On Thu, Apr 20, 2023 at 5:07 PM juzhe.zh...@rivai.ai wrote: > > >> With --param=riscv-autovec-preference=fixed-vlmax

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-20 Thread Kito Cheng via Gcc-patches
On Thu, Apr 20, 2023 at 5:07 PM juzhe.zh...@rivai.ai wrote: > > >> With --param=riscv-autovec-preference=fixed-vlmax, however, the output is > >> reasonable. BTW please use --param instead of -param in the description to > >> avoid confusion. > >>Now the patches don't explicitly note that they on

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-20 Thread juzhe.zh...@rivai.ai
Hi, kito. Can you give more comments for us in case of compile options? I think I should fix this patch after we have done all discussions of compile option of choosing vector-length && LMUL && auto-vectorization mode (VLA/VLS). I just received Richard Sandiford comments of "WHILE_LEN" pattern. O

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-20 Thread juzhe.zh...@rivai.ai
>> With --param=riscv-autovec-preference=fixed-vlmax, however, the output is >> reasonable. BTW please use --param instead of -param in the description to >> avoid confusion. >>Now the patches don't explicitly note that they only work for certain marchs, >>configurations or so but they certainly s

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-19 Thread Kito Cheng via Gcc-patches
On Thu, Apr 20, 2023 at 10:56 AM juzhe.zh...@rivai.ai wrote: > > >> The comment above might not sync with your implementation? > Address comment. > > >> Actually, you've allowed TARGET_MIN_VLEN < 128 && riscv_autovec_lmul < > >> RVV_M2 > Not sure I am on the same page with you. I return word_mode

Re: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV

2023-04-19 Thread juzhe.zh...@rivai.ai
>> The comment above might not sync with your implementation? Address comment. >> Actually, you've allowed TARGET_MIN_VLEN < 128 && riscv_autovec_lmul < RVV_M2 Not sure I am on the same page with you. I return word_mode for this situation, the auto-vectorization will be disabled. I have testcase