@@ -2352,7 +2352,7 @@ bool VPWidenIntOrFpInductionRecipe::isCanonical() const {
23522352 return false ;
23532353 auto *StepC = dyn_cast<ConstantInt>(getStepValue ()->getLiveInIRValue ());
23542354 auto *StartC = dyn_cast<ConstantInt>(getStartValue ()->getLiveInIRValue ());
2355- auto *CanIV = getParent ()-> getParent ()->getCanonicalIV ();
2355+ auto *CanIV = getRegion ()->getCanonicalIV ();
23562356 return StartC && StartC->isZero () && StepC && StepC->isOne () &&
23572357 getScalarType () == CanIV->getScalarType ();
23582358}
@@ -3076,7 +3076,7 @@ static void scalarizeInstruction(const Instruction *Instr,
30763076 State.AC ->registerAssumption (II);
30773077
30783078 assert (
3079- (RepRecipe->getParent ()-> getParent () ||
3079+ (RepRecipe->getRegion () ||
30803080 !RepRecipe->getParent ()->getPlan ()->getVectorLoopRegion () ||
30813081 all_of (RepRecipe->operands (),
30823082 [](VPValue *Op) { return Op->isDefinedOutsideLoopRegions (); })) &&
@@ -3268,7 +3268,7 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
32683268 to_vector (operands ()), VF);
32693269 // If the recipe is not predicated (i.e. not in a replicate region), return
32703270 // the scalar cost. Otherwise handle predicated cost.
3271- if (!getParent ()-> getParent ()->isReplicator ())
3271+ if (!getRegion ()->isReplicator ())
32723272 return ScalarCost;
32733273
32743274 // Account for the phi nodes that we will create.
@@ -3284,7 +3284,7 @@ InstructionCost VPReplicateRecipe::computeCost(ElementCount VF,
32843284 case Instruction::Store: {
32853285 // TODO: See getMemInstScalarizationCost for how to handle replicating and
32863286 // predicated cases.
3287- const VPRegionBlock *ParentRegion = getParent ()-> getParent ();
3287+ const VPRegionBlock *ParentRegion = getRegion ();
32883288 if (ParentRegion && ParentRegion->isReplicator ())
32893289 break ;
32903290
0 commit comments