[llvm] [ValueTracking] Support dominating known bits condition in and/or (PR #74728)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 15:19:40 PST 2024
================
@@ -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());
+ SmallVector<Value *, 8> Worklist;
+ SmallPtrSet<Value *, 8> Visited;
+ Worklist.push_back(Cond);
+ while (!Worklist.empty()) {
----------------
dtcxzyw wrote:
What is the compile-time impact after this patch?
https://github.com/llvm/llvm-project/pull/74728
More information about the llvm-commits
mailing list