[llvm] [AArch64][ISel] Add custom lowering for clmul nxv8i16 (PR #195893)
Matthew Devereau via llvm-commits
llvm-commits at lists.llvm.org
Thu May 7 03:57:07 PDT 2026
MDevereau wrote:
> > > I've only given this a passing glance so please take with a pinch of salt, but isn't this just `trn1(pmullb(a,b), pmullt(a,b)`?
> >
> >
> > Do you pmullb as size s or b?
>
> Oh, I assumed pmullb H->S existed but I see that's not an option. I guess you could promote the operands and use the S->D variant. That should be better than what we have today although presumably not as good as what you've already implemented?
I think that would be worse than this implementation, yeah. The missing .h precision and various feature requirements make the optimal lowering for each type quite situational.
The scalar expansion is also quite poor currently, where Neon's pmullt/b only has (.Q <- .D) and (.H <- .B). We've done a similar thing to your promotion suggestion when FEAT_PMULL is present for scalar precisions greater than .B, but could try to build scalars from vector .B PMULs as it's always available with Neon. #184468 Added something like this for fixed vector types.
https://github.com/llvm/llvm-project/pull/195893
More information about the llvm-commits
mailing list