mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-22 10:36:10 +00:00
Porting r50563 from Tak to mainline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50564 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ceda160b3
commit
643310da6d
@ -1124,6 +1124,11 @@ bool LoopIndexSplit::safeSplitCondition(SplitInfo &SD) {
|
||||
BasicBlock *Succ0 = SplitTerminator->getSuccessor(0);
|
||||
BasicBlock *Succ1 = SplitTerminator->getSuccessor(1);
|
||||
|
||||
// If split block does not dominate the latch then this is not a diamond.
|
||||
// Such loop may not benefit from index split.
|
||||
if (!DT->dominates(SplitCondBlock, Latch))
|
||||
return false;
|
||||
|
||||
// Finally this split condition is safe only if merge point for
|
||||
// split condition branch is loop latch. This check along with previous
|
||||
// check, to ensure that exit condition is in either loop latch or header,
|
||||
|
Loading…
x
Reference in New Issue
Block a user