@@ -465,7 +465,7 @@ Value *VPInstruction::generatePerLane(VPTransformState &State,
465465// / Create a conditional branch using \p Cond branching to the successors of \p
466466// / VPBB. Note that the first successor is always forward (i.e. not created yet)
467467// / while the second successor may already have been created (if it is a header
468- // / block and VPBB is a header ).
468+ // / block and VPBB is a latch ).
469469static BranchInst *createCondBranch (Value *Cond, VPBasicBlock *VPBB,
470470 VPTransformState &State) {
471471 // Replace the temporary unreachable terminator with a new conditional
@@ -1557,7 +1557,7 @@ void VPWidenSelectRecipe::execute(VPTransformState &State) {
15571557InstructionCost VPWidenSelectRecipe::computeCost (ElementCount VF,
15581558 VPCostContext &Ctx) const {
15591559 SelectInst *SI = cast<SelectInst>(getUnderlyingValue ());
1560- bool ScalarCond = getOperand (0 )->isDefinedOutsideLoop ();
1560+ bool ScalarCond = getOperand (0 )->isDefinedOutsideLoopRegions ();
15611561 Type *ScalarTy = Ctx.Types .inferScalarType (this );
15621562 Type *VectorTy = toVectorTy (Ctx.Types .inferScalarType (this ), VF);
15631563
@@ -1778,7 +1778,7 @@ InstructionCost VPWidenRecipe::computeCost(ElementCount VF,
17781778 TargetTransformInfo::OperandValueInfo RHSInfo = Ctx.getOperandInfo (RHS);
17791779
17801780 if (RHSInfo.Kind == TargetTransformInfo::OK_AnyValue &&
1781- getOperand (1 )->isDefinedOutsideLoop ())
1781+ getOperand (1 )->isDefinedOutsideLoopRegions ())
17821782 RHSInfo.Kind = TargetTransformInfo::OK_UniformValue;
17831783 Type *VectorTy = toVectorTy (Ctx.Types .inferScalarType (this ), VF);
17841784 Instruction *CtxI = dyn_cast_or_null<Instruction>(getUnderlyingValue ());
@@ -2677,12 +2677,13 @@ static void scalarizeInstruction(const Instruction *Instr,
26772677 if (auto *II = dyn_cast<AssumeInst>(Cloned))
26782678 State.AC ->registerAssumption (II);
26792679
2680- assert ((RepRecipe->getParent ()->getParent () ||
2681- !RepRecipe->getParent ()->getPlan ()->getVectorLoopRegion () ||
2682- all_of (RepRecipe->operands (),
2683- [](VPValue *Op) { return Op->isDefinedOutsideLoop (); })) &&
2684- " Expected a recipe is either within a region or all of its operands "
2685- " are defined outside the vectorized region." );
2680+ assert (
2681+ (RepRecipe->getParent ()->getParent () ||
2682+ !RepRecipe->getParent ()->getPlan ()->getVectorLoopRegion () ||
2683+ all_of (RepRecipe->operands (),
2684+ [](VPValue *Op) { return Op->isDefinedOutsideLoopRegions (); })) &&
2685+ " Expected a recipe is either within a region or all of its operands "
2686+ " are defined outside the vectorized region." );
26862687}
26872688
26882689void VPReplicateRecipe::execute (VPTransformState &State) {
0 commit comments