[llvm] [RISCV][TTI] Refine reverse shuffle costing for high LMUL (PR #144155)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 13 13:18:52 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
index fcc9d3977..288a20f0c 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -904,8 +904,11 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
ContainerVT.getVectorMinNumElements() / M1VT.getVectorMinNumElements();
InstructionCost GatherCost =
getRISCVInstructionCost({RISCV::VRGATHER_VV}, M1VT, CostKind) * Ratio;
- InstructionCost SlideCost = !LT.second.isFixedLengthVector() ? 0 :
- getRISCVInstructionCost({RISCV::VSLIDEDOWN_VX}, LT.second, CostKind);
+ InstructionCost SlideCost =
+ !LT.second.isFixedLengthVector()
+ ? 0
+ : getRISCVInstructionCost({RISCV::VSLIDEDOWN_VX}, LT.second,
+ CostKind);
return FixedCost + LT.first * (GatherCost + SlideCost);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/144155
More information about the llvm-commits
mailing list