mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
remove a bogus assertion: the latch block of a loop is not
neccesarily an uncond branch to the header. This fixes PR8955 (the assertion tripping). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123219 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -335,12 +335,11 @@ bool LoopRotate::rotateLoop(Loop *L) {
|
||||
assert(L->getLoopPreheader() && "Invalid loop preheader after loop rotation");
|
||||
assert(L->getLoopLatch() && "Invalid loop latch after loop rotation");
|
||||
|
||||
// Now that the CFG and DomTree are in a consistent state again, merge the
|
||||
// OrigHeader block into OrigLatch. We know that they are joined by an
|
||||
// unconditional branch. This is just a cleanup so the emitted code isn't
|
||||
// too gross.
|
||||
bool DidIt = MergeBlockIntoPredecessor(OrigHeader, this);
|
||||
assert(DidIt && "Block merge failed??"); (void)DidIt;
|
||||
// Now that the CFG and DomTree are in a consistent state again, try to merge
|
||||
// the OrigHeader block into OrigLatch. This will succeed if they are
|
||||
// connected by an unconditional branch. This is just a cleanup so the
|
||||
// emitted code isn't too gross in this common case.
|
||||
MergeBlockIntoPredecessor(OrigHeader, this);
|
||||
|
||||
++NumRotated;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user