[llvm] [RISCV][TTI]Use processShuffleMasks for cost estimations/actual per-register shuffles (PR #118103)

via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 13:23:39 PST 2024


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 fbdf652d970322a00f61333f1ca10facb72f0cbb 499b31f213ca766788baa362321e7635016450c9 --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 eac8946008..3a7f8f71c5 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -398,8 +398,7 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
       LegalVT = getTypeLegalizationCost(
                     FixedVectorType::get(Tp->getElementType(), ElemsPerVReg))
                     .second;
-      NumOfDests = divideCeil(Mask.size(),
-                              LegalVT.getVectorNumElements());
+      NumOfDests = divideCeil(Mask.size(), LegalVT.getVectorNumElements());
     }
     if (NumOfDests.isValid() && NumOfDests > 1 &&
         LegalVT.isFixedLengthVector() &&

``````````

</details>


https://github.com/llvm/llvm-project/pull/118103


More information about the llvm-commits mailing list