[PATCH] D105921: [SCEV] Handle zero stride correctly in howManyLessThans

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 13 12:21:14 PDT 2021


reames added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:11675
+      auto *StartIfZero = getMinusSCEV(IV->getStart(), Stride);
+      return isLoopEntryGuardedByCond(L, Cond, StartIfZero, RHS);
+    };
----------------
efriedma wrote:
> We make exactly the same isLoopEntryGuardedByCond() call later; can we avoid calling it twice?
I assume you're concerned about compile time?  If so, I'd prefer to land the simple change (this one), and then revisit if needed.  I would not be surprised if the later one changed form anyways.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D105921



More information about the llvm-commits mailing list