[PATCH] D101722: [SCEV] Don't require ControlsExit for gt/lt NoWrap

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 14:12:54 PDT 2021


reames added a comment.

@nikic I'm increasingly thinking that the computeBECount logic is just wrong.  I believe you can trip the overflow to zero case with a loop with explicit (correct) flags.  There's some comments and a guard on negative steps which appear incorrect, and I'm guessing were an attempt to work around an existing bug.

I think we need to change the computeBECount function to correctly compute the trip count for the overflowing (computation) case, but doing that "cheap enough" has has me slightly stuck.  I was hoping to get a patch up for this in the next day or two once I had some time to sit down and focus on that aspect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101722



More information about the llvm-commits mailing list