@@ -5644,14 +5644,16 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
56445644 OpAExtend == TTI::PR_None)
56455645 return Invalid;
56465646
5647+ assert ((BinOp || (OpBExtend == TTI::PR_None && !InputTypeB)) &&
5648+ (!BinOp || (OpBExtend != TTI::PR_None && InputTypeB)) &&
5649+ " Unexpected values for OpBExtend or InputTypeB" );
5650+
56475651 // We only support multiply binary operations for now, and for muls we
56485652 // require the types being extended to be the same.
56495653 if (BinOp && (*BinOp != Instruction::Mul || InputTypeA != InputTypeB))
56505654 return Invalid;
5651- assert ((BinOp || (OpBExtend == TTI::PR_None && !InputTypeB)) &&
5652- " Unexpected values for OpBExtend or InputTypeB" );
56535655
5654- bool IsUSDot = OpBExtend && OpAExtend != OpBExtend;
5656+ bool IsUSDot = OpBExtend != TTI::PR_None && OpAExtend != OpBExtend;
56555657 if (IsUSDot && !ST->hasMatMulInt8 ())
56565658 return Invalid;
56575659
@@ -5663,8 +5665,7 @@ InstructionCost AArch64TTIImpl::getPartialReductionCost(
56635665 VectorType *InputVectorType = VectorType::get (InputTypeA, VF);
56645666 VectorType *AccumVectorType =
56655667 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.
56685669 auto TA = TLI->getTypeAction (AccumVectorType->getContext (),
56695670 EVT::getEVT (AccumVectorType));
56705671 switch (TA) {
0 commit comments