mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 21:18:19 +00:00
fix PR9523, a crash in looprotate on a non-canonical loop made out of indirectbr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129203 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -184,7 +184,11 @@ bool LoopRotate::rotateLoop(Loop *L) {
|
||||
// Now, this loop is suitable for rotation.
|
||||
BasicBlock *OrigPreheader = L->getLoopPreheader();
|
||||
BasicBlock *OrigLatch = L->getLoopLatch();
|
||||
assert(OrigPreheader && OrigLatch && "Loop not in canonical form?");
|
||||
|
||||
// If the loop could not be converted to canonical form, it must have an
|
||||
// indirectbr in it, just give up.
|
||||
if (OrigPreheader == 0 || OrigLatch == 0)
|
||||
return false;
|
||||
|
||||
// Anything ScalarEvolution may know about this loop or the PHI nodes
|
||||
// in its header will soon be invalidated.
|
||||
|
||||
Reference in New Issue
Block a user