[llvm] [AArch64][NEON][SVE] Lower mixed sign/zero extended partial reductions to usdot (PR #107566)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 9 06:55:28 PDT 2024


================
@@ -21824,37 +21824,59 @@ SDValue tryLowerPartialReductionToDot(SDNode *N,
 
   auto ExtA = MulOp->getOperand(0);
   auto ExtB = MulOp->getOperand(1);
-  bool IsSExt = ExtA->getOpcode() == ISD::SIGN_EXTEND;
-  bool IsZExt = ExtA->getOpcode() == ISD::ZERO_EXTEND;
-  if (ExtA->getOpcode() != ExtB->getOpcode() || (!IsSExt && !IsZExt))
-    return SDValue();
-
   auto A = ExtA->getOperand(0);
----------------
paulwalker-arm wrote:

You cannot just move these checks because you need to prove `ExtA` and `ExtB` have an operand before calling `getOperand()`.

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


More information about the llvm-commits mailing list