[PATCH] D144718: [ScalarEvolution] Enhance Predicate implication from condition

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 27 20:35:05 PST 2023


mkazantsev requested changes to this revision.
mkazantsev added inline comments.
This revision now requires changes to proceed.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11768
+  // FoundLHS > FoundRHS =>
+  // LHS = (FoundLHS + Offset) > RHS = (FoundRHS + Offset)
+  if ((FoundPred == Pred) && (FoundLHS->getType() == LHS->getType()) &&
----------------
This is incorrect in case of overflow. See `isKnownPredicateViaNoOverflow`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144718



More information about the llvm-commits mailing list