[llvm-commits] CVS: llvm/lib/Analysis/ScalarEvolution.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Apr 5 13:47:07 PDT 2004
Changes in directory llvm/lib/Analysis:
ScalarEvolution.cpp updated: 1.3 -> 1.4
---
Log message:
Fix PR312: http://llvm.cs.uiuc.edu/PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
---
Diffs of the changes: (+2 -0)
Index: llvm/lib/Analysis/ScalarEvolution.cpp
diff -u llvm/lib/Analysis/ScalarEvolution.cpp:1.3 llvm/lib/Analysis/ScalarEvolution.cpp:1.4
--- llvm/lib/Analysis/ScalarEvolution.cpp:1.3 Fri Apr 2 18:43:03 2004
+++ llvm/lib/Analysis/ScalarEvolution.cpp Mon Apr 5 13:46:55 2004
@@ -2478,6 +2478,8 @@
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 {
More information about the llvm-commits
mailing list