[llvm] [RISCV] Extend zvqdot matching to handle reduction trees (PR #138965)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri May 9 07:24:25 PDT 2025


================
@@ -18142,6 +18165,26 @@ static SDValue foldReduceOperandViaVQDOT(SDValue InVec, const SDLoc &DL,
       !InVec.getValueType().getVectorElementCount().isKnownMultipleOf(4))
     return SDValue();
 
+  // Recurse through adds (since generic dag canonicalizes to that
+  // form).
+  if (InVec->getOpcode() == ISD::ADD) {
----------------
lukel97 wrote:

Just wondering, will we ever have to deal with disjoint ors here? Nothing that needs to be done for this patch.

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


More information about the llvm-commits mailing list