[llvm] [WIP][TTI] Replace getStridedMemoryOpCost with getIntrinsicInstrCost (PR #165532)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 02:44:51 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 origin/main HEAD --extensions h,cpp -- llvm/include/llvm/Analysis/TargetTransformInfo.h llvm/include/llvm/Analysis/TargetTransformInfoImpl.h llvm/include/llvm/CodeGen/BasicTTIImpl.h llvm/lib/Analysis/TargetTransformInfo.cpp llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp llvm/lib/Target/RISCV/RISCVTargetTransformInfo.h llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</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 e794281b0..da74320af 100644
--- a/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
+++ b/llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp
@@ -1555,7 +1555,8 @@ RISCVTTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
     if (ICA.isTypeBasedOnly())
       Alignment = ICA.getAlign().value_or(ABITyAlign);
     else {
-      unsigned Index = (ICA.getID() == Intrinsic::experimental_vp_strided_load) ? 0 : 1;
+      unsigned Index =
+          (ICA.getID() == Intrinsic::experimental_vp_strided_load) ? 0 : 1;
       Alignment = I->getParamAlign(Index).value_or(ABITyAlign);
     }
 

``````````

</details>


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


More information about the llvm-commits mailing list