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

2023-04-20 Thread Kito Cheng via Gcc-patches
/2/4/8 auto-vectorization (You can see the codes in rvv.exp). > Then, he let me add --param options. > > I can change compile option as you suggested. > > Thanks. > > > juzhe.zh...@rivai.ai > > From: Robin Dapp > Date: 2023-04-20 17:42 > To: juzhe.zh...@rivai.ai;

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

2023-04-20 Thread juzhe.zh...@rivai.ai
ct: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV > Can you give more comments about Robin's opinion that he want to change into > "fixed" vs "varying" or "fixed vector size" vs "dynamic vector size" ? It's not necessary

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

2023-04-20 Thread Robin Dapp via Gcc-patches
> Can you give more comments about Robin's opinion that he want to change into > "fixed" vs "varying" or "fixed vector size" vs "dynamic vector size" ? It's not necessary to decide on this now as --params are not supposed to be stable and can be changed quickly. I was just curious if this had alr

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
2023-04-20 16:58 To: Kito Cheng; juzhe.zhong CC: gcc-patches; palmer; jeffreyalaw Subject: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV > $ riscv64-unknown-linux-gnu-gcc > --param=riscv-autovec-preference=fixed-vlmax > gcc/testsuite/gcc.target/riscv/rvv/base/spill-10.c

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

2023-04-20 Thread juzhe.zh...@rivai.ai
-vector-bits-, However, it was objected by LLVM community. https://github.com/riscv-non-isa/riscv-toolchain-conventions/issues/33 I think in case of compile options, Kito may give more comments since he is the RISC-V ABI and convention maintainer. I develop this patch following his order.

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

2023-04-20 Thread Robin Dapp via Gcc-patches
> $ riscv64-unknown-linux-gnu-gcc > --param=riscv-autovec-preference=fixed-vlmax > gcc/testsuite/gcc.target/riscv/rvv/base/spill-10.c -O2 -march=rv64gcv > -S > ../riscv-gnu-toolchain-trunk/riscv-gcc/gcc/testsuite/gcc.target/riscv/rvv/base/spill-10.c: > In function 'stach_check_alloca_1': > ../riscv

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
ckend but yes, I agree with you we drop this option at the first time. juzhe.zh...@rivai.ai From: Kito Cheng Date: 2023-04-20 10:26 To: juzhe.zhong CC: gcc-patches; palmer; jeffreyalaw Subject: Re: [PATCH 2/3 V2] RISC-V: Enable basic auto-vectorization for RVV > +/* Return the vectorization machi

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

2023-04-19 Thread Kito Cheng via Gcc-patches
> +/* Return the vectorization machine mode for RVV according to LMUL. */ > +machine_mode > +preferred_simd_mode (scalar_mode mode) > +{ > + /* We only enable auto-vectorization when TARGET_MIN_VLEN >= 128 > + which is -march=rv64gcv. Since GCC loop vectorizer report ICE > + when we enabl