[llvm] [RISCV][TTI] Model partial reduce of ext for zvqdotq (PR #146788)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 10 03:51:27 PDT 2025
================
@@ -303,16 +303,29 @@ InstructionCost RISCVTTIImpl::getPartialReductionCost(
// zve32x is broken for partial_reduce_umla, but let's make sure we
// don't generate them.
if (!ST->hasStdExtZvqdotq() || ST->getELen() < 64 ||
- Opcode != Instruction::Add || !BinOp || *BinOp != Instruction::Mul ||
- InputTypeA != InputTypeB || !InputTypeA->isIntegerTy(8) ||
+ Opcode != Instruction::Add || !InputTypeA->isIntegerTy(8) ||
!AccumType->isIntegerTy(32) || !VF.isKnownMultipleOf(4))
return InstructionCost::getInvalid();
+ // We support both the plain dot product idiom, and the use of dotproduct
+ // to compute a a reduction of an extended value.
----------------
david-arm wrote:
nit: I think this should be `to compute a reduction`
https://github.com/llvm/llvm-project/pull/146788
More information about the llvm-commits
mailing list