@@ -5644,14 +5644,16 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
5644
5644
OpAExtend == TTI::PR_None)
5645
5645
return Invalid;
5646
5646
5647
+ assert ((BinOp || (OpBExtend == TTI::PR_None && !InputTypeB)) &&
5648
+ (!BinOp || (OpBExtend != TTI::PR_None && InputTypeB)) &&
5649
+ " Unexpected values for OpBExtend or InputTypeB" );
5650
+
5647
5651
// We only support multiply binary operations for now, and for muls we
5648
5652
// require the types being extended to be the same.
5649
5653
if (BinOp && (*BinOp != Instruction::Mul || InputTypeA != InputTypeB))
5650
5654
return Invalid;
5651
- assert ((BinOp || (OpBExtend == TTI::PR_None && !InputTypeB)) &&
5652
- " Unexpected values for OpBExtend or InputTypeB" );
5653
5655
5654
- bool IsUSDot = OpBExtend && OpAExtend != OpBExtend;
5656
+ bool IsUSDot = OpBExtend != TTI::PR_None && OpAExtend != OpBExtend;
5655
5657
if (IsUSDot && !ST->hasMatMulInt8 ())
5656
5658
return Invalid;
5657
5659
@@ -5663,8 +5665,7 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
5663
5665
VectorType *InputVectorType = VectorType::get (InputTypeA, VF);
5664
5666
VectorType *AccumVectorType =
5665
5667
VectorType::get (AccumType, VF.divideCoefficientBy (Ratio));
5666
- // We don't yet support all kinds of legalization (e.g. widening
5667
- // of <[vscale x] 1 x ..> accumulators)
5668
+ // We don't yet support all kinds of legalization.
5668
5669
auto TA = TLI->getTypeAction (AccumVectorType->getContext (),
5669
5670
EVT::getEVT (AccumVectorType));
5670
5671
switch (TA) {
0 commit comments