diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-05 18:46:55 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-05 18:46:55 +0000 |
commit | 29153fc2e51db3cafb0a9be90db9a40d9ff50363 (patch) | |
tree | 719934432e1173875a02155254357f9c0332003d /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 6f4fea937b7430f26b98078ddb57f3dd0daa9423 (diff) | |
download | bcm5719-llvm-29153fc2e51db3cafb0a9be90db9a40d9ff50363.tar.gz bcm5719-llvm-29153fc2e51db3cafb0a9be90db9a40d9ff50363.zip |
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
llvm-svn: 12668
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index e75229c0675..8e6ee5363ae 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -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 { |