[llvm] [LoopIdiomRecognize] Enable clmul optimization for CRC loops (PR #203405)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 05:13:23 PDT 2026
================
@@ -669,6 +669,18 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
TLI->isOperationLegalOrCustom(ISD::FSQRT, VT);
}
+ bool haveFastClmul(IntegerType *Ty) const override {
+ // FIXME: clmul should really be Promote for any bitwidth under the largest
+ // legal bitwidth for clmul. This is a hack to get around that shortcoming.
+ if (auto *PromoteTy = dyn_cast_if_present<IntegerType>(
+ DL.getSmallestLegalIntType(Ty->getContext(), Ty->getBitWidth())))
----------------
artagnon wrote:
Hm, I suppose getLargestLegalIntType gives you worse results?
https://github.com/llvm/llvm-project/pull/203405
More information about the llvm-commits
mailing list