[PATCH] D110517: [SCEV] Prove implication X <u Y, Y >=s 0 --> X <s Y

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 12:57:04 PDT 2021


nikic added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10725
+        return isImpliedCondOperands(FoundPred, LHS, RHS, FoundLHS, FoundRHS);
+  }
 
----------------
This looks correct to me, but also rather ad-hoc -- it handles one out of multiple symmetrical patterns. For example, if we just swap both predicates (Pred == SGT and non-negative LHS) this will not trigger anymore. Or did that already get canonicalized away (in which case we should test it)?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110517/new/

https://reviews.llvm.org/D110517



More information about the llvm-commits mailing list