[PATCH] D56837: [IRCE] Support narrow latch condition for wide range checks
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 22 19:44:52 PST 2019
reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.
Please land w/flag disabled. Wait until bots cycle, then enable flag separately.
================
Comment at: lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:1071
return None;
LoopConstrainer::SubRanges Result;
----------------
mkazantsev wrote:
> reames wrote:
> > I can't convince myself this is correct when the IV would overflow. Can you explain why we don't need some form of overflow check here? Note that in LoopPredication in isSafeToTruncate, we *do* have an overflow check.
> We should not be doing IRCE if IV overflows its type. This is guaranteed by functions `isSafeIncreasingBound`, `isSafeDecreasingBound`. I will add some more tests to ensure that, but I'm pretty sure that we already have plenty.
>
I followed through the code, questions answered.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56837/new/
https://reviews.llvm.org/D56837
More information about the llvm-commits
mailing list