Skip to content

Commit 1877d1b

Browse files
committed
!fixup address latest comments, thanks!
1 parent 1a8691c commit 1877d1b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,8 +771,11 @@ void VPInstruction::execute(VPTransformState &State) {
771771
InstructionCost VPInstruction::computeCost(ElementCount VF,
772772
VPCostContext &Ctx) const {
773773
if (Instruction::isBinaryOp(getOpcode())) {
774-
if (!getUnderlyingValue())
774+
if (!getUnderlyingValue()) {
775+
// TODO: Compute cost for VPInstructions without underlying values once
776+
// the legacy cost model has been retired.
775777
return 0;
778+
}
776779

777780
assert(!doesGeneratePerAllLanes() &&
778781
"Should only generate a vector value or single scalar, not scalars "
@@ -784,8 +787,10 @@ InstructionCost VPInstruction::computeCost(ElementCount VF,
784787
return Ctx.TTI.getArithmeticInstrCost(getOpcode(), ResTy, Ctx.CostKind);
785788
}
786789

790+
// TODO: Compute cost other VPInstructions once the legacy cost model has
791+
// been retired.
787792
assert(!getUnderlyingValue() &&
788-
"unexpected VPInstruction without underlying value");
793+
"unexpected VPInstruction witht underlying value");
789794
return 0;
790795
}
791796

0 commit comments

Comments
 (0)