[PATCH] D40035: [LoopRotate] processLoop should return true even if it just simplified the loop latch without making any other changes
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 14 09:46:13 PST 2017
craig.topper created this revision.
Simplifying a loop latch changes the IR and we need to make sure the pass manager knows to invalidate analysis passes if that happened.
PR35210 discovered a case where we failed to invalidate the post dominator tree after this simplification because we no changes other than simplifying the loop latch.
I'm still trying to put together a reduced test that triggers only the latch simplification, but I don't know anything about this pass so if anyone wants to help that would be great.
Fixes PR35210.
https://reviews.llvm.org/D40035
Files:
lib/Transforms/Scalar/LoopRotation.cpp
Index: lib/Transforms/Scalar/LoopRotation.cpp
===================================================================
--- lib/Transforms/Scalar/LoopRotation.cpp
+++ lib/Transforms/Scalar/LoopRotation.cpp
@@ -634,7 +634,7 @@
if ((MadeChange || SimplifiedLatch) && LoopMD)
L->setLoopID(LoopMD);
- return MadeChange;
+ return MadeChange || SimplifiedLatch;
}
LoopRotatePass::LoopRotatePass(bool EnableHeaderDuplication)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40035.122859.patch
Type: text/x-patch
Size: 429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171114/5c5fc0b9/attachment.bin>
More information about the llvm-commits
mailing list