Skip to content

Commit 10b5747

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

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)