mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-14 00:32:55 +00:00
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12668 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1b151b4a3b
commit
ddd947f21a
@ -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…
x
Reference in New Issue
Block a user