[PATCH] D56837: [IRCE] Support narrow latch condition for wide range checks
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 22 00:19:16 PST 2019
mkazantsev marked an inline comment as done.
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp:1071
return None;
LoopConstrainer::SubRanges Result;
----------------
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.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56837/new/
https://reviews.llvm.org/D56837
More information about the llvm-commits
mailing list