Skip to content

Commit 31163fd

Browse files
committed
fixup! address review comments
1 parent 96b3422 commit 31163fd

File tree

4 files changed

+239
-428
lines changed

4 files changed

+239
-428
lines changed

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24845,9 +24845,8 @@ bool RISCVTargetLowering::isCtpopFast(EVT VT) const {
2484524845
// If the element type is legal we can use cpop.v if it is enabled.
2484624846
if (isLegalElementTypeForRVV(SVT))
2484724847
return Subtarget.hasStdExtZvbb();
24848-
// If it will be scalarized, we might be able to use cpop.
24849-
return VT.isFixedLengthVector() && Subtarget.hasCPOPLike() &&
24850-
(SVT == MVT::i32 || SVT == MVT::i64);
24848+
// Don't consider it fast if the type needs to be legalized or scalarized.
24849+
return false;
2485124850
}
2485224851

2485324852
return Subtarget.hasCPOPLike() && (VT == MVT::i32 || VT == MVT::i64);

0 commit comments

Comments
 (0)