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 @@ -785,8 +785,11 @@ void VPInstruction::execute(VPTransformState &State) {
785785InstructionCost 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
You can’t perform that action at this time.
0 commit comments