[llvm] [ISel] Introduce llvm.clmul intrinsic (PR #168731)
Piotr Fusik via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 20 08:17:56 PST 2025
================
@@ -10315,6 +10315,25 @@ 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);
+ SDValue X, Y;
+ if (sd_match(N, m_Srl(m_Clmul(m_ZExt(m_Value(X)), m_ZExt(m_Value(Y))),
----------------
pfusik wrote:
Are the ZEXTs here guaranteed to be from half the VT width types?
https://github.com/llvm/llvm-project/pull/168731
More information about the llvm-commits
mailing list