1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

Like the comment says, do not insert cast instructions before phi nodes

llvm-svn: 22586
This commit is contained in:
Chris Lattner 2005-08-02 03:31:14 +00:00
parent 06094b5e91
commit 05431d5ca5

View File

@ -232,6 +232,10 @@ void LoopStrengthReduce::AnalyzeGetElementPtrUsers(GetElementPtrInst *GEP,
else
++InsertPt;
}
// Do not insert casts into the middle of PHI node blocks.
while (isa<PHINode>(InsertPt)) ++InsertPt;
BP = new CastInst(GEP->getOperand(0), UIntPtrTy,
GEP->getOperand(0)->getName(), InsertPt);
}