[llvm] [ValueTracking] Infer known bits fromfrom (icmp eq (and/or x,y), C) (PR #87143)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 29 23:46:02 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 c2f3a11dbe1a6bc2fc46b35c3fb4398e1d6a90c4 6a90629a32bf64571bbcd373e8d611361d3dbb92 -- 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 33a69861cc..93ba231f74 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -657,8 +657,7 @@ static void computeKnownBitsFromCmp(const Value *V, CmpInst::Predicate Pred,
if (match(LHS, m_V) && match(RHS, m_APInt(C))) {
Known = Known.unionWith(KnownBits::makeConstant(*C));
// assume(V & Mask = C)
- } else if (match(LHS, m_c_And(m_V, m_Value(Y))) &&
- match(RHS, m_APInt(C))) {
+ } else if (match(LHS, m_c_And(m_V, m_Value(Y))) && match(RHS, m_APInt(C))) {
// For one bits in Mask, we can propagate bits from C to V.
Known.One |= *C;
if (match(Y, m_APInt(Mask)))
``````````
</details>
https://github.com/llvm/llvm-project/pull/87143
More information about the llvm-commits
mailing list