@@ -4676,7 +4676,7 @@ void LoopVectorizationCostModel::collectElementTypesForWidening() {
46764676 if (!Legal->isReductionVariable (PN))
46774677 continue ;
46784678 const RecurrenceDescriptor &RdxDesc =
4679- Legal->getReductionVars (). find ( PN)-> second ;
4679+ Legal->getRecurrenceDescriptor ( PN);
46804680 if (PreferInLoopReductions || useOrderedReductions (RdxDesc) ||
46814681 TTI.preferInLoopReduction (RdxDesc.getRecurrenceKind (),
46824682 RdxDesc.getRecurrenceType ()))
@@ -5476,7 +5476,7 @@ LoopVectorizationCostModel::getReductionPatternCost(Instruction *I,
54765476 ReductionPhi = InLoopReductionImmediateChains.at (ReductionPhi);
54775477
54785478 const RecurrenceDescriptor &RdxDesc =
5479- Legal->getReductionVars (). find ( cast<PHINode>(ReductionPhi))-> second ;
5479+ Legal->getRecurrenceDescriptor ( cast<PHINode>(ReductionPhi));
54805480
54815481 InstructionCost BaseCost;
54825482 RecurKind RK = RdxDesc.getRecurrenceKind ();
@@ -8297,8 +8297,7 @@ VPRecipeBase *VPRecipeBuilder::tryToCreateWidenRecipe(VPSingleDefRecipe *R,
82978297 " can only widen reductions and fixed-order recurrences here" );
82988298 VPValue *StartV = Operands[0 ];
82998299 if (Legal->isReductionVariable (Phi)) {
8300- const RecurrenceDescriptor &RdxDesc =
8301- Legal->getReductionVars ().find (Phi)->second ;
8300+ const RecurrenceDescriptor &RdxDesc = Legal->getRecurrenceDescriptor (Phi);
83028301 assert (RdxDesc.getRecurrenceStartValue () ==
83038302 Phi->getIncomingValueForBlock (OrigLoop->getLoopPreheader ()));
83048303
0 commit comments