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

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 24 02:29:28 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:

Compile-time impact is large: http://llvm-compile-time-tracker.com/compare.php?from=f8202e1b5c4f38be95c42ab945b4f69ab7501ffa&to=6041815eace62ac98d5e1ba48b24a3dcfecde111&stat=instructions%3Au

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


More information about the llvm-commits mailing list