[llvm] [ValueTracking] Support dominating known bits condition in and/or (PR #74728)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 9 00:55:27 PST 2023


================
@@ -34,23 +34,39 @@ static void findAffectedValues(Value *Cond,
     }
   };
 
-  ICmpInst::Predicate Pred;
-  Value *A;
-  if (match(Cond, m_ICmp(Pred, m_Value(A), m_Constant()))) {
-    AddAffected(A);
+  bool TopLevelIsAnd = match(Cond, m_LogicalAnd());
----------------
nikic wrote:

See also the tests `test_cond_and` and `test_cond_logical_and` that check both bitwise and logical operations.

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


More information about the llvm-commits mailing list