mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 20:04:03 +00:00
Increment iterator now because IVUseShouldUsePostIncValue may remove
User from the list of I users. llvm-svn: 35051
This commit is contained in:
parent
75ffe11ca9
commit
ca60446cb4
@ -400,10 +400,14 @@ bool LoopStrengthReduce::AddUsersIfInteresting(Instruction *I, Loop *L,
|
||||
SCEVHandle Stride = Start;
|
||||
if (!getSCEVStartAndStride(ISE, L, Start, Stride))
|
||||
return false; // Non-reducible symbolic expression, bail out.
|
||||
|
||||
for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;++UI){
|
||||
|
||||
for (Value::use_iterator UI = I->use_begin(), E = I->use_end(); UI != E;) {
|
||||
Instruction *User = cast<Instruction>(*UI);
|
||||
|
||||
// Increment iterator now because IVUseShouldUsePostIncValue may remove
|
||||
// User from the list of I users.
|
||||
++UI;
|
||||
|
||||
// Do not infinitely recurse on PHI nodes.
|
||||
if (isa<PHINode>(User) && Processed.count(User))
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user