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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 02:57:33 PDT 2021


fhahn added a comment.

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).

In D111495#3054169 <https://reviews.llvm.org/D111495#3054169>, @mkazantsev wrote:

> Agreed, change in test's behavior looks suspicious. Looks like something else is missing.

yeah, it still seems correct but potentially can be fixed by the additional change in D82799 <https://reviews.llvm.org/D82799>


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