@@ -9616,16 +9616,16 @@ void BoUpSLP::reorderGatherNode(TreeEntry &TE) {
96169616 Cost += ::getShuffleCost(*TTI, TTI::SK_InsertSubvector, VecTy, {}, CostKind,
96179617 Idx, getWidenedType(ScalarTy, Sz));
96189618 }
9619- if (isa <FixedVectorType>(ScalarTy)) {
9619+ if (auto *FTy = dyn_cast <FixedVectorType>(ScalarTy)) {
96209620 assert(SLPReVec && "Only supported by REVEC.");
96219621 // If ScalarTy is FixedVectorType, we should use CreateInsertVector instead
96229622 // of CreateInsertElement.
96239623 unsigned ScalarTyNumElements = getNumElements(ScalarTy);
96249624 for (unsigned I : seq<unsigned>(TE.Scalars.size()))
96259625 if (DemandedElts[I])
9626- Cost += TTI->getShuffleCost(
9627- TTI::SK_InsertSubvector, VecTy, std::nullopt, CostKind ,
9628- I * ScalarTyNumElements, cast<FixedVectorType>(ScalarTy) );
9626+ Cost +=
9627+ TTI->getShuffleCost(TTI ::SK_InsertSubvector, VecTy, std::nullopt,
9628+ CostKind, I * ScalarTyNumElements, FTy );
96299629 } else {
96309630 Cost += TTI->getScalarizationOverhead(VecTy, DemandedElts, /*Insert=*/true,
96319631 /*Extract=*/false, CostKind);
0 commit comments