mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-20 19:42:54 +02:00
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
llvm-svn: 12668
This commit is contained in:
parent
30ff883603
commit
8b61b8c936
@ -2478,6 +2478,8 @@ Value *ScalarEvolutionRewriter::ExpandCodeFor(SCEVHandle SH,
|
||||
else if (Instruction *I = dyn_cast<Instruction>(V)) {
|
||||
// FIXME: check to see if there is already a cast!
|
||||
BasicBlock::iterator IP = I; ++IP;
|
||||
if (InvokeInst *II = dyn_cast<InvokeInst>(I))
|
||||
IP = II->getNormalDest()->begin();
|
||||
while (isa<PHINode>(IP)) ++IP;
|
||||
return new CastInst(V, Ty, V->getName(), IP);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user