[llvm] [ValueTracking] Infer NonEqual from dominating conditions/assumptions (PR #117442)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 24 13:17:04 PST 2024
================
@@ -10037,10 +10081,10 @@ void llvm::findValuesAffectedByCondition(
Worklist.push_back(B);
}
} else if (match(V, m_ICmp(Pred, m_Value(A), m_Value(B)))) {
- AddCmpOperands(A, B);
-
bool HasRHSC = match(B, m_ConstantInt());
if (ICmpInst::isEquality(Pred)) {
+ AddAffected(A);
+ AddAffected(B);
----------------
nikic wrote:
Is the impact here mainly from adding more affected values or from using them in isKnownNonEqual?
Something we could do is add a bitfield for what the affected value is for (e.g. knownbits, etc), so we can quickly skip ones that are not relevant.
https://github.com/llvm/llvm-project/pull/117442
More information about the llvm-commits
mailing list