[PATCH] D62990: [SCEV]When safe, compute MinStart as unsigned_min(Start - Stride) + Stride in computeMaxBECountForLT

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 21 10:42:38 PDT 2019


reames added a comment.

I may be missing the obvious, but the code as written appears to be assuming the post-increment form of the induction variable is passed in, not the pre-increment form.  What ensures that?

If I'm reading this right, you're basically trying to get a more specific range for Start, using the fact proved by the loop entry guard right?  I've seen such cases come up several times recently in things I've worked on, maybe it's time to add a getUnsignedRangeAtScope(SCEV, Loop) variant?  (Just as we have a getSCEVAtScope)


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62990





More information about the llvm-commits mailing list