[llvm] [ValueTracking] Improve KnownBits for signed min-max clamping (PR #120576)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 07:05:59 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 2691b964150c77a9e6967423383ad14a7693095e 54b6643377009de4f401be9b8e42e77926fdc7fb --extensions cpp -- llvm/lib/Analysis/ValueTracking.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index dad1c2bb23..d54ea644bf 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -1100,7 +1100,8 @@ static bool isSignedMinMaxIntrinsicClamp(const IntrinsicInst *II,
const APInt *&CLow,
const APInt *&CHigh) {
assert((II->getIntrinsicID() == Intrinsic::smin ||
- II->getIntrinsicID() == Intrinsic::smax) && "Must be smin/smax");
+ II->getIntrinsicID() == Intrinsic::smax) &&
+ "Must be smin/smax");
Intrinsic::ID InverseID = getInverseMinMaxIntrinsic(II->getIntrinsicID());
auto *InnerII = dyn_cast<IntrinsicInst>(II->getArgOperand(0));
``````````
</details>
https://github.com/llvm/llvm-project/pull/120576
More information about the llvm-commits
mailing list