[llvm] [AArch64][ISel] Add custom lowering for clmul nxv8i16 (PR #195893)

Matthew Devereau via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 09:37:46 PDT 2026


MDevereau wrote:

> It's up to you but if you want to improve the generated code further I'll note that only half the `pmul` vectors have useful data so rather than extracting the high half of each operand I think you can just byte swap one of them and do a single `pmul`. At that point I think you are just a combination of `eorbt` and `eortb` away from the final result.
 
I've mostly done what you asked, using REVB got a bit messy since it requires predication and i'm not sure if it added much value. The changes aren't massively beneficial overall, this version of the patch is about 2% faster than the previous one, but it does still help. I also didn't think eorbt and eortb are both necessary, either one or the other with an LSL or an AND is ok I think?


https://github.com/llvm/llvm-project/pull/195893


More information about the llvm-commits mailing list