mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 19:12:56 +02:00
SCEVExpander: hoistStep should check strict dominance.
llvm-svn: 147683
This commit is contained in:
parent
3da57dd6b3
commit
a2096be363
@ -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…
Reference in New Issue
Block a user