SCEV should forget all loops containing a deleted block.
authorAlina Sbirlea <asbirlea@google.com>
Thu, 9 Aug 2018 17:53:26 +0000 (17:53 +0000)
committerAlina Sbirlea <asbirlea@google.com>
Thu, 9 Aug 2018 17:53:26 +0000 (17:53 +0000)
commitbf9fe79397419a33d1bda13836b9218d0f3e4108
tree5d828193bcb96dcc8e3358ebd380e417d4274d58
parent7a3dc2c184c170f4477549f306f7a453dafebc99
SCEV should forget all loops containing a deleted block.

Summary:
LoopSimplifyCFG should update ScEv for all loops after a block is deleted.
If the deleted block "Succ" is part of L, then it is part of all parent loops, so forget topmost loop.

Reviewers: greened, mkazantsev, sanjoy

Subscribers: jlebar, javed.absar, uabelho, llvm-commits

Differential Revision: https://reviews.llvm.org/D50422

llvm-svn: 339363
llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
llvm/test/Transforms/LoopIdiom/scev-invalidation_topmostloop.ll [new file with mode: 0644]