@@ -4676,7 +4676,7 @@ void LoopVectorizationCostModel::collectElementTypesForWidening() {
4676
4676
if (!Legal->isReductionVariable (PN))
4677
4677
continue ;
4678
4678
const RecurrenceDescriptor &RdxDesc =
4679
- Legal->getReductionVars (). find ( PN)-> second ;
4679
+ Legal->getRecurrenceDescriptor ( PN);
4680
4680
if (PreferInLoopReductions || useOrderedReductions (RdxDesc) ||
4681
4681
TTI.preferInLoopReduction (RdxDesc.getRecurrenceKind (),
4682
4682
RdxDesc.getRecurrenceType ()))
@@ -5476,7 +5476,7 @@ LoopVectorizationCostModel::getReductionPatternCost(Instruction *I,
5476
5476
ReductionPhi = InLoopReductionImmediateChains.at (ReductionPhi);
5477
5477
5478
5478
const RecurrenceDescriptor &RdxDesc =
5479
- Legal->getReductionVars (). find ( cast<PHINode>(ReductionPhi))-> second ;
5479
+ Legal->getRecurrenceDescriptor ( cast<PHINode>(ReductionPhi));
5480
5480
5481
5481
InstructionCost BaseCost;
5482
5482
RecurKind RK = RdxDesc.getRecurrenceKind ();
@@ -8300,8 +8300,7 @@ VPRecipeBase *VPRecipeBuilder::tryToCreateWidenRecipe(VPSingleDefRecipe *R,
8300
8300
" can only widen reductions and fixed-order recurrences here" );
8301
8301
VPValue *StartV = Operands[0 ];
8302
8302
if (Legal->isReductionVariable (Phi)) {
8303
- const RecurrenceDescriptor &RdxDesc =
8304
- Legal->getReductionVars ().find (Phi)->second ;
8303
+ const RecurrenceDescriptor &RdxDesc = Legal->getRecurrenceDescriptor (Phi);
8305
8304
assert (RdxDesc.getRecurrenceStartValue () ==
8306
8305
Phi->getIncomingValueForBlock (OrigLoop->getLoopPreheader ()));
8307
8306
0 commit comments