diff --git a/llvm/lib/Transforms/Utils/LCSSA.cpp b/llvm/lib/Transforms/Utils/LCSSA.cpp --- a/llvm/lib/Transforms/Utils/LCSSA.cpp +++ b/llvm/lib/Transforms/Utils/LCSSA.cpp @@ -395,12 +395,6 @@ IRBuilder<> Builder(L.getHeader()->getContext()); Changed = formLCSSAForInstructions(Worklist, DT, *LI, SE, Builder); - // If we modified the code, remove any caches about the loop from SCEV to - // avoid dangling entries. - // FIXME: This is a big hammer, can we clear the cache more selectively? - if (SE && Changed) - SE->forgetLoop(&L); - assert(L.isLCSSAForm(DT)); return Changed;