mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-14 17:28:53 +00:00
Like the comment says, do not insert cast instructions before phi nodes
llvm-svn: 22586
This commit is contained in:
parent
06094b5e91
commit
05431d5ca5
@ -232,6 +232,10 @@ void LoopStrengthReduce::AnalyzeGetElementPtrUsers(GetElementPtrInst *GEP,
|
|||||||
else
|
else
|
||||||
++InsertPt;
|
++InsertPt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Do not insert casts into the middle of PHI node blocks.
|
||||||
|
while (isa<PHINode>(InsertPt)) ++InsertPt;
|
||||||
|
|
||||||
BP = new CastInst(GEP->getOperand(0), UIntPtrTy,
|
BP = new CastInst(GEP->getOperand(0), UIntPtrTy,
|
||||||
GEP->getOperand(0)->getName(), InsertPt);
|
GEP->getOperand(0)->getName(), InsertPt);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user