[PATCH] D89381: [SCEV] Use nw flag and symbolic iteration count to sharpen ranges of AddRecs

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 15 20:21:40 PDT 2020


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:5757
+  if (isKnownPositive(Step) && isKnownPredicate(LEPred, Start, End)) {
+    if (!ProveBetween(LEPred))
+      return ConstantRange::getFull(BitWidth);
----------------
Actually we do not need to prove anything about V1. Knowing `start < end` && `step is positive` is enough, as well as `start > end` is negative.


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

https://reviews.llvm.org/D89381



More information about the llvm-commits mailing list