mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-28 06:32:09 +00:00
SCEVExpander: hoistStep should check strict dominance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147683 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b937b76045
commit
3326ec1842
@ -1564,7 +1564,7 @@ bool SCEVExpander::hoistStep(Instruction *IncV, Instruction *InsertPos,
|
||||
for (User::op_iterator OI = IncV->op_begin(), OE = IncV->op_end();
|
||||
OI != OE; ++OI) {
|
||||
Instruction *OInst = dyn_cast<Instruction>(OI);
|
||||
if (OInst && !DT->dominates(OInst, InsertPos))
|
||||
if (OInst && (OInst == InsertPos || !DT->dominates(OInst, InsertPos)))
|
||||
return false;
|
||||
}
|
||||
IncV->moveBefore(InsertPos);
|
||||
|
Loading…
x
Reference in New Issue
Block a user