Skip to content

Commit c3377af

Browse files
authored
[RISCV][CostModel] add cost for cttz/ctlz under the non-zvbb (#117515)
1 parent d727b6f commit c3377af

File tree

2 files changed

+86
-78
lines changed

2 files changed

+86
-78
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,14 @@ static const CostTblEntry VectorIntrinsicCostTable[]{
925925
{Intrinsic::ctpop, MVT::i16, 19},
926926
{Intrinsic::ctpop, MVT::i32, 20},
927927
{Intrinsic::ctpop, MVT::i64, 21},
928+
{Intrinsic::ctlz, MVT::i8, 19},
929+
{Intrinsic::ctlz, MVT::i16, 28},
930+
{Intrinsic::ctlz, MVT::i32, 31},
931+
{Intrinsic::ctlz, MVT::i64, 35},
932+
{Intrinsic::cttz, MVT::i8, 16},
933+
{Intrinsic::cttz, MVT::i16, 23},
934+
{Intrinsic::cttz, MVT::i32, 24},
935+
{Intrinsic::cttz, MVT::i64, 25},
928936
{Intrinsic::vp_ctpop, MVT::i8, 12},
929937
{Intrinsic::vp_ctpop, MVT::i16, 19},
930938
{Intrinsic::vp_ctpop, MVT::i32, 20},

0 commit comments

Comments
 (0)