[PATCH] D148618: [SCEV] Support sub in and negative constants willNotOverflow

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 02:30:48 PDT 2023


mkazantsev added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:2372
+    return isKnownPredicateAt(Pred, getConstant(Limit), LHS, CtxI);
+  } else {
+    // To avoid overflow up, we need to make sure that LHS <= MAX - Magnitude
----------------
dmakogon wrote:
> You don't need this `else` after return
Indeed.


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

https://reviews.llvm.org/D148618



More information about the llvm-commits mailing list