mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
LoopRotate: When reconstructing loop simplify form don't split edges from indirectbrs.
Yet another chapter in the endless story. While this looks like we leave the loop in a non-canonical state this replicates the logic in LoopSimplify so it doesn't diverge from the canonical form in any way. PR21968 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -535,6 +535,8 @@ bool LoopRotate::rotateLoop(Loop *L, bool SimplifiedLatch) {
|
||||
Loop *PredLoop = LI->getLoopFor(*PI);
|
||||
if (!PredLoop || PredLoop->contains(Exit))
|
||||
continue;
|
||||
if (isa<IndirectBrInst>((*PI)->getTerminator()))
|
||||
continue;
|
||||
SplitLatchEdge |= L->getLoopLatch() == *PI;
|
||||
BasicBlock *ExitSplit = SplitCriticalEdge(
|
||||
*PI, Exit, CriticalEdgeSplittingOptions(DT, LI).setPreserveLCSSA());
|
||||
|
Reference in New Issue
Block a user