[llvm] [ISel] Introduce llvm.clmul intrinsic (PR #168731)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 09:24:36 PST 2025
================
@@ -10315,6 +10315,28 @@ SDValue DAGCombiner::visitShiftByConstant(SDNode *N) {
if (SDValue R = combineShiftOfShiftedLogic(N, DAG))
return R;
+ // Fold clmul(zext(x), zext(y)) >> (BW - 1 | BW) -> clmul(r|h)(x, y).
+ SDLoc DL(N);
+ EVT VT = N->getValueType(0);
+ uint64_t HalfBW = VT.getScalarSizeInBits() / 2;
----------------
topperc wrote:
Do we need to check that VT.getScalarSizeInBits is even?
https://github.com/llvm/llvm-project/pull/168731
More information about the llvm-commits
mailing list