Skip to content

Commit 9a955b1

Browse files
committed
!fixup address latest comments, thanks!
1 parent fddabf6 commit 9a955b1

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
@@ -785,8 +785,11 @@ void VPInstruction::execute(VPTransformState &State) {
785785
InstructionCost VPInstruction::computeCost(ElementCount VF,
786786
VPCostContext &Ctx) const {
787787
if (Instruction::isBinaryOp(getOpcode())) {
788-
if (!getUnderlyingValue())
788+
if (!getUnderlyingValue()) {
789+
// TODO: Compute cost for VPInstructions without underlying values once
790+
// the legacy cost model has been retired.
789791
return 0;
792+
}
790793

791794
assert(!doesGeneratePerAllLanes() &&
792795
"Should only generate a vector value or single scalar, not scalars "
@@ -798,8 +801,10 @@ InstructionCost VPInstruction::computeCost(ElementCount VF,
798801
return Ctx.TTI.getArithmeticInstrCost(getOpcode(), ResTy, Ctx.CostKind);
799802
}
800803

804+
// TODO: Compute cost other VPInstructions once the legacy cost model has
805+
// been retired.
801806
assert(!getUnderlyingValue() &&
802-
"unexpected VPInstruction without underlying value");
807+
"unexpected VPInstruction witht underlying value");
803808
return 0;
804809
}
805810

0 commit comments

Comments
 (0)