[llvm] [ValueTracking] Infer NonEqual from dominating conditions/assumptions (PR #117442)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 24 21:35:48 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);
----------------
dtcxzyw wrote:

It is mainly from adding more affected values.

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


More information about the llvm-commits mailing list