Skip to content

Commit 3a2bcd9

Browse files
authored
[RISCV][TTI] Allow partial reduce with mismatched extends (#143608)
This depends on the recently add partial_reduce_sumla node for lowering but at this point, we have all the parts.
1 parent 32649e0 commit 3a2bcd9

File tree

2 files changed

+296
-146
lines changed

2 files changed

+296
-146
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ InstructionCost RISCVTTIImpl::getPartialReductionCost(
305305
if (!ST->hasStdExtZvqdotq() || ST->getELen() < 64 ||
306306
Opcode != Instruction::Add || !BinOp || *BinOp != Instruction::Mul ||
307307
InputTypeA != InputTypeB || !InputTypeA->isIntegerTy(8) ||
308-
OpAExtend != OpBExtend || !AccumType->isIntegerTy(32) ||
309-
!VF.isKnownMultipleOf(4))
308+
!AccumType->isIntegerTy(32) || !VF.isKnownMultipleOf(4))
310309
return InstructionCost::getInvalid();
311310

312311
Type *Tp = VectorType::get(AccumType, VF.divideCoefficientBy(4));

0 commit comments

Comments
 (0)