File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -771,8 +771,11 @@ void VPInstruction::execute(VPTransformState &State) {
771771InstructionCost 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
You can’t perform that action at this time.
0 commit comments