diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-01 12:04:51 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-09-01 12:04:51 +0000 |
commit | 64f30e3eedc08a9387baef2d2e24d62d85b53f26 (patch) | |
tree | ed7b26b6573a81296b4736197a5b568e05a51713 | |
parent | 8365e9bcc2627d365d6c7b39e8b5df6e8307c510 (diff) | |
download | external_llvm-64f30e3eedc08a9387baef2d2e24d62d85b53f26.zip external_llvm-64f30e3eedc08a9387baef2d2e24d62d85b53f26.tar.gz external_llvm-64f30e3eedc08a9387baef2d2e24d62d85b53f26.tar.bz2 |
LoopRotation: Check some invariants of the dominator updating code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163058 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/Scalar/LoopRotation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LoopRotation.cpp b/lib/Transforms/Scalar/LoopRotation.cpp index 2c76706..f8122bf 100644 --- a/lib/Transforms/Scalar/LoopRotation.cpp +++ b/lib/Transforms/Scalar/LoopRotation.cpp @@ -418,6 +418,9 @@ bool LoopRotate::rotateLoop(Loop *L) { for (unsigned I = 0, E = HeaderChildren.size(); I != E; ++I) DT->changeImmediateDominator(HeaderChildren[I], OrigPreheaderNode); + assert(DT->getNode(Exit)->getIDom() == OrigPreheaderNode); + assert(DT->getNode(NewHeader)->getIDom() == OrigPreheaderNode); + // Update OrigHeader to be dominated by the new header block. DT->changeImmediateDominator(OrigHeader, OrigLatch); } |