[PATCH] D111495: [IndVars] Invalidate SCEV when IR is changed in rewriteLoopExitValue.

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 12:06:06 PDT 2021


nikic added a comment.

In D111495#3054492 <https://reviews.llvm.org/D111495#3054492>, @fhahn wrote:

> In D111495#3053355 <https://reviews.llvm.org/D111495#3053355>, @nikic wrote:
>
>> This looks like basically the same change as D82799 <https://reviews.llvm.org/D82799>, though there I thought this was just a compile-time optimization, not a correctness fix. In that patch, I also added an extra forgetValue() call in IV widening to prevent the elim-extend.ll test change.
>
> Thanks for sharing the patch, I completely missed that one! Happy to got with this one, it just looks like it's been marked as changes-planned for a while with a mention of adding something. But it seems like it would be good to go in as is, potentially with the test case in `llvm/test/Transforms/IndVarSimplify/invalidate-modified-lcssa-phi.ll`? (I can also commit that test separately).

Happy to go with your patch, just wanted to point out the additional forgetValue() call. I never had the time to fully investigate the binary changes, though I think they were of the harmless sort (different but equivalent SCEV expressions).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111495



More information about the llvm-commits mailing list