[PATCH] D46045: [LoopUnswitch] Fix potentially incorrect SCEV invalidation in unswitching
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 25 00:26:54 PDT 2018
mkazantsev updated this revision to Diff 143867.
https://reviews.llvm.org/D46045
Files:
lib/Transforms/Scalar/LoopUnswitch.cpp
Index: lib/Transforms/Scalar/LoopUnswitch.cpp
===================================================================
--- lib/Transforms/Scalar/LoopUnswitch.cpp
+++ lib/Transforms/Scalar/LoopUnswitch.cpp
@@ -1201,8 +1201,10 @@
<< " blocks] in Function " << F->getName()
<< " when '" << *Val << "' == " << *LIC << "\n");
+ // We are going to make modifications to loop's block which can also affect
+ // cached invariants for its parent loops.
if (auto *SEWP = getAnalysisIfAvailable<ScalarEvolutionWrapperPass>())
- SEWP->getSE().forgetLoop(L);
+ SEWP->getSE().forgetTopmostLoop(L);
LoopBlocks.clear();
NewBlocks.clear();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46045.143867.patch
Type: text/x-patch
Size: 657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180425/aca6a16e/attachment.bin>
More information about the llvm-commits
mailing list