[PATCH] D45937: [LoopSimplify] Fix incorrect SCEV invalidation

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 23 15:23:24 PDT 2018


sanjoy added a comment.

`ScalarEvolution::verify` has false positives (i.e. it fails when it shouldn't) in some corner cases which is why it isn't run by default from `verifyAnalysis`[0].  So I don't think it is safe to add calls to `ScalarEvolution::verify` like this (this should really have been a comment on `ScalarEvolution::verify` -- I'll add that once these new call sites are removed).

[0] An an example, going by memory, it will complain if you change the trip count of a loop from `undef` to `undef + 1`.  Of course, `undef + 1` is `undef`, but SCEV does not know that -- it assumes `undef` is an unknown constant.


Repository:
  rL LLVM

https://reviews.llvm.org/D45937





More information about the llvm-commits mailing list