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:
parent
06094b5e91
commit
05431d5ca5
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user