[llvm] [LVI] Generalize mask not equal conditions handling (PR #92946)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 6 00:31:14 PDT 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 fb0c705dbf27e3ab84d726ad30e172806a530c21 ae24e1f6ee56565d7d960e97ca0b17485113bae2 -- llvm/lib/Analysis/LazyValueInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 5e1b48900c..e50cb89d78 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -1202,10 +1202,10 @@ std::optional<ValueLatticeElement> LazyValueInfoImpl::getValueFromICmpCondition(
APInt::getZero(BitWidth)));
unsigned TrailingZeroesC = C->countr_zero();
- // If (Val & Mask) != C, where Mask >=u C and the number of trailing zeroes
- // of Mask is at most equal to the number of trailing zeroes of C, then
- // the value must be larger than the lowest set bit of Mask, offset by
- // constant C.
+ // If (Val & Mask) != C, where Mask >=u C and the number of trailing
+ // zeroes of Mask is at most equal to the number of trailing zeroes of C,
+ // then the value must be larger than the lowest set bit of Mask, offset
+ // by constant C.
if (Mask->uge(*C) && TrailingZeroesMask <= TrailingZeroesC) {
return ValueLatticeElement::getRange(ConstantRange::getNonEmpty(
APInt::getOneBitSet(BitWidth, TrailingZeroesMask) + *C, *C));
``````````
</details>
https://github.com/llvm/llvm-project/pull/92946
More information about the llvm-commits
mailing list