[PATCH] D101291: [IndVars] avoid crash in LFTR when assuming an add recurrence

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 26 11:22:37 PDT 2021


nikic added a comment.

This is what the SCEV looks like: https://gist.github.com/nikic/28415b7c83f1d7599dc6ac1b04da88b3

I believe this is hitting the hasHugeExpression() limit, and thus not folding the +1 into the AddRec. So I think this doesn't indicate a problem from the SCEV side.

However, I think it would be better to bail out in this case in isLoopCounter() already. As written, I think this code is subtly wrong because it will not drop nowrap flags if it's not an AddRec -- we should be dropping them though, as we just don't have any information in this case.


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

https://reviews.llvm.org/D101291



More information about the llvm-commits mailing list