Ok. Just sent V2. I will adjust comment and send V3 again :)
juzhe.zh...@rivai.ai From: Robin Dapp Date: 2023-06-20 16:55 To: juzhe.zh...@rivai.ai; gcc-patches CC: rdapp.gcc; kito.cheng; Kito.cheng; palmer; palmer; jeffreyalaw Subject: Re: [PATCH] RISC-V: Optimize codegen of VLA SLP > + /* Step 2: VID AND -NPATTERNS: > + { 0&-4, 1&-4, 2&-4, 3 &-4, 4 &-4, 5 &-4, 6 &-4, 7 &-4, ... } > + */ Before that, just add something simple like: We want to create a pattern where value[ix] = floor (ix / NPATTERNS). As NPATTERNS is always a power of two we can rewrite this as = ix & -NPATTERNS. Regards Robin