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

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 22:39:43 PDT 2022


apilipenko accepted this revision.
apilipenko added inline comments.
This revision is now accepted and ready to land.


================
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);
----------------
mkazantsev wrote:
> 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`.
Maybe add a comment about it as well?


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

https://reviews.llvm.org/D129753



More information about the llvm-commits mailing list