[PATCH] D119261: [DependenceAnalysis][PR52170] Conservative crash on overflowed loop backedge
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 25 13:34:40 PST 2022
nikic added a comment.
In D119261#3345920 <https://reviews.llvm.org/D119261#3345920>, @bmahjour wrote:
> I'm generally in favour of this patch, but just not sure if there is (or should be) a guarantee that SCEV will NOT produce an AddRec in overflow situations. For example when a GEP has the inbounds attribute, the produced address after adding the index/offset cannot cause an unsigned overflow, so not sure why SCEV would produce different results depending on whether the index/offset could wrap! SCEV seems to produce an AddRec for the offset/index (eg. `%i.add`) regardless whether it could wrap or not. It's just the GEP that seems to be behaving the way you described.
Unless there is some DA-specific restriction involved here, AddRecs (including pointer AddRecs) in SCEV can definitely wrap.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119261/new/
https://reviews.llvm.org/D119261
More information about the llvm-commits
mailing list