Skip to content

Commit 127ba53

Browse files
authored
[RISCV] Remove ST->hasVInstructions() from getIntrinsicInstrCost for cttz/ctlz/ctpop. NFC. (#154064)
That isn't necessary if we've checked ST->hasStdExtZvbb().
1 parent 246a64a commit 127ba53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
14311431
case Intrinsic::ctlz:
14321432
case Intrinsic::ctpop: {
14331433
auto LT = getTypeLegalizationCost(RetTy);
1434-
if (ST->hasVInstructions() && ST->hasStdExtZvbb() && LT.second.isVector()) {
1434+
if (ST->hasStdExtZvbb() && LT.second.isVector()) {
14351435
unsigned Op;
14361436
switch (ICA.getID()) {
14371437
case Intrinsic::cttz:

0 commit comments

Comments
 (0)