[llvm] [ISel] Introduce llvm.clmul intrinsic (PR #168731)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 27 07:46:47 PST 2025


https://github.com/artagnon commented:

> Is it not better to remove ISD::CLMULR and ISD::CLMULH from this patch? They seem to be complicating things and it might be better to just concentrate on clmul to begin with.

APIntOps::clmul[rh] have already landed (and the reviewer said that all three were required for completeness), so this was the natural next step. My next patch to  custom-lower ISD::CLMUL[RH] to RISCVISD::CLMUL[RH] is dependent on this, and the patch after that to LoopIdiom to optimize big-endian/little-endian CRC cannot happen without all three. Perhaps it would have been better to focus on ISD::CLMUL in the initial development phase, but the patch is nearly done now, and ISD::CLMULH simplifies LegalizeIntegerTypes, where we use it to widen the result. Besides, I think it's nicer to review a diff of clmul[rh] side-by-side. If you don't mind, I'd like to keep ISD::CLMUL[RH].

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


More information about the llvm-commits mailing list