[PATCH] D129753: [SCEV] Prove condition invariance via context

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 22:37:15 PDT 2022


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:10824
+    // All together it means that ArLHS <u RHS <=> Start(ArLHS) >=s 0.
+    // We can strenthen this to Start(ArLHS <u RHS).
+    auto SignFlippedPred = ICmpInst::getFlippedSignednessPredicate(Pred);
----------------
apilipenko wrote:
> Why don't you use Start(ArLHS) >=s 0 as the resulting invariant condition?
Imagine `RHS = 100`. `LHS <u 100` will allow us to infer more facts from it than `LHS >=s 0`.


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

https://reviews.llvm.org/D129753



More information about the llvm-commits mailing list