RE: [PATCH] RISC-V: Use merge approach to optimize vector permutation

2023-06-14 Thread Li, Pan2 via Gcc-patches
@gcc.gnu.org Cc: kito.ch...@gmail.com; kito.ch...@sifive.com; pal...@dabbelt.com; pal...@rivosinc.com Subject: Re: [PATCH] RISC-V: Use merge approach to optimize vector permutation On 6/14/23 09:00, Robin Dapp wrote: > Hi Juzhe, > > the general method seems sane and useful (it's not very co

Re: [PATCH] RISC-V: Use merge approach to optimize vector permutation

2023-06-14 Thread Jeff Law via Gcc-patches
On 6/14/23 09:00, Robin Dapp wrote: Hi Juzhe, the general method seems sane and useful (it's not very complicated). I was just distracted by Selector = { 0, 17, 2, 19, 4, 21, 6, 23, 8, 9, 10, 27, 12, 29, 14, 31 }, the common expression: { 0, nunits + 1, 1, nunits + 2, 2, nunits + 3, ...

Re: [PATCH] RISC-V: Use merge approach to optimize vector permutation

2023-06-14 Thread Robin Dapp via Gcc-patches
Hi Juzhe, the general method seems sane and useful (it's not very complicated). I was just distracted by > Selector = { 0, 17, 2, 19, 4, 21, 6, 23, 8, 9, 10, 27, 12, 29, 14, 31 }, the > common expression: > { 0, nunits + 1, 1, nunits + 2, 2, nunits + 3, ... } > > For this selector, we can use

[PATCH] RISC-V: Use merge approach to optimize vector permutation

2023-06-13 Thread juzhe . zhong
From: Juzhe-Zhong This patch is to optimize the permuation case that is suiteable use merge approach. Consider this following case: typedef int8_t vnx16qi __attribute__((vector_size (16))); #define MASK_16 0, 17, 2, 19, 4, 21, 6, 23, 8, 25, 10, 27, 12, 29, 14, 31 void __attribute__