[llvm] [AArch64] [CostModel] Fix cost modelling for saturating arithmetic intrinsics (PR #152333)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 09:25:01 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/AArch64/AArch64TargetTransformInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index a112d69fb..dfa8ed01c 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -631,12 +631,12 @@ AArch64TTIImpl::getIntrinsicInstrCost(const IntrinsicCostAttributes &ICA,
LT.second.getScalarSizeInBits() == RetTy->getScalarSizeInBits() ? 1 : 4;
if (any_of(ValidSatTys, [<](MVT M) { return M == LT.second; }))
return LT.first * Instrs;
-
+
TypeSize TS = getDataLayout().getTypeSizeInBits(RetTy);
uint64_t VectorSize = TS.getKnownMinValue();
if (ST->isSVEAvailable() && VectorSize >= 128 && isPowerOf2_64(VectorSize))
- return LT.first * Instrs;
+ return LT.first * Instrs;
break;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/152333
More information about the llvm-commits
mailing list