Re: [PATCH] RISC-V: Implement vector "average" autovec pattern.

2023-08-15 Thread Robin Dapp via Gcc-patches
> Plz put your testcases into: > > # widening operation only test on LMUL < 8 > set AUTOVEC_TEST_OPTS [list \ >   {-ftree-vectorize -O3 --param riscv-autovec-lmul=m1} \ >   {-ftree-vectorize -O3 --param riscv-autovec-lmul=m2} \ >   {-ftree-vectorize -O3 --param riscv-autovec-lmul=m4} \ >   {-ftree

Re: Re: [PATCH] RISC-V: Implement vector "average" autovec pattern.

2023-08-02 Thread 钟居哲
ot; } You could either simpilfy put them into "widen" directory or create a new directly. Anyway, make sure you have fully tested it with LMUL = 1/2/4. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-08-03 02:49 To: 钟居哲; gcc-patches; palmer; kito.cheng; Jeff Law CC: rdapp.gcc Subject: Re:

Re: Re: [PATCH] RISC-V: Implement vector "average" autovec pattern.

2023-08-02 Thread 钟居哲
I just checked LLVM: https://godbolt.org/z/nMa6qnEeT This patch generally is reasonable so LGTM. juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-08-03 02:49 To: 钟居哲; gcc-patches; palmer; kito.cheng; Jeff Law CC: rdapp.gcc Subject: Re: [PATCH] RISC-V: Implement vector "average&quo

Re: [PATCH] RISC-V: Implement vector "average" autovec pattern.

2023-08-02 Thread Robin Dapp via Gcc-patches
> 1. How do you model round to +Inf (avg_floor) and round to -Inf (avg_ceil) ? That's just specified by the +1 or the lack of it in the original pattern. Actually the IFN is just a detour because we would create perfect code if not for the fallback. But as there is currently now way to check for

Re: [PATCH] RISC-V: Implement vector "average" autovec pattern.

2023-08-02 Thread 钟居哲
I am concerning: 1. How do you model round to +Inf (avg_floor) and round to -Inf (avg_ceil) ? 2. Is it possible we could use vaadd[u] to model avg ? juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-08-01 22:31 To: gcc-patches; palmer; Kito Cheng; juzhe.zh...@rivai.ai; jeffreyalaw CC: rdapp.gc