[llvm] [RISCV][TTI]Use processShuffleMasks for cost estimations/actual per-register shuffles (PR #118103)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 09:26:52 PST 2025
================
@@ -389,7 +389,103 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
// First, handle cases where having a fixed length vector enables us to
// give a more accurate cost than falling back to generic scalable codegen.
// TODO: Each of these cases hints at a modeling gap around scalable vectors.
- if (isa<FixedVectorType>(Tp)) {
+ if (ST->hasVInstructions() && isa<FixedVectorType>(Tp)) {
+ MVT LegalVT = LT.second;
+ InstructionCost NumOfDests = InstructionCost::getInvalid();
----------------
preames wrote:
For readability, can you extract this into a helper function called costShuffleViaVRegSplitting? That would make it easy to map the lowering code, and would allow use of early return to reduce indentation.
https://github.com/llvm/llvm-project/pull/118103
More information about the llvm-commits
mailing list