Skip to content

Commit c77cd41

Browse files
committed
fixup! [RISCV] Fix missing scaling by LMUL in cost model
1 parent 204d328 commit c77cd41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,9 +784,8 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
784784
}
785785
// TODO: add more intrinsic
786786
case Intrinsic::experimental_stepvector: {
787-
unsigned Cost = 1; // vid
788787
auto LT = getTypeLegalizationCost(RetTy);
789-
return (Cost + (LT.first - 1)) * TLI->getLMULCost(LT.second);
788+
return LT.first * TLI->getLMULCost(LT.second);
790789
}
791790
case Intrinsic::vp_rint: {
792791
// RISC-V target uses at least 5 instructions to lower rounding intrinsics.

0 commit comments

Comments
 (0)