RE: [PATCH V2] RISC-V: Optimize a special case of VLA SLP

2023-11-23 Thread Li, Pan2
Committed, thanks Kito. Pan -Original Message- From: Kito Cheng Sent: Friday, November 24, 2023 2:30 PM To: Juzhe-Zhong Cc: gcc-patches@gcc.gnu.org; kito.ch...@gmail.com; jeffreya...@gmail.com; rdapp@gmail.com Subject: Re: [PATCH V2] RISC-V: Optimize a special case of VLA SLP

Re: [PATCH V2] RISC-V: Optimize a special case of VLA SLP

2023-11-23 Thread Kito Cheng
The optimization is relatively small, so LGTM, thanks :) On Fri, Nov 24, 2023 at 7:18 AM Juzhe-Zhong wrote: > > When working on fixing bugs of zvl1024b. I notice a special VLA SLP case > can be better optimized. > > v = vec_perm (op1, op2, { nunits - 1, nunits, nunits + 1, ... }) > > Before this

[PATCH V2] RISC-V: Optimize a special case of VLA SLP

2023-11-23 Thread Juzhe-Zhong
When working on fixing bugs of zvl1024b. I notice a special VLA SLP case can be better optimized. v = vec_perm (op1, op2, { nunits - 1, nunits, nunits + 1, ... }) Before this patch, we are using genriec approach (vrgather): vid vadd.vx vrgather vmsgeu vrgather With this patch, we use vec_extrac