[llvm-commits] CVS: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Feb 11 19:27:01 PST 2005
Changes in directory llvm/lib/Transforms/Scalar:
IndVarSimplify.cpp updated: 1.74 -> 1.75
---
Log message:
Fix for testcase Transforms/IndVarsSimplify/2005-02-11-InvokeCrash.ll
and PR504: http://llvm.cs.uiuc.edu/PR504 .
---
Diffs of the changes: (+2 -0)
IndVarSimplify.cpp | 2 ++
1 files changed, 2 insertions(+)
Index: llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff -u llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.74 llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.75
--- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp:1.74 Wed Oct 27 11:12:28 2004
+++ llvm/lib/Transforms/Scalar/IndVarSimplify.cpp Fri Feb 11 21:26:49 2005
@@ -133,6 +133,8 @@
if ((*UI)->getType() == Ty)
if (CastInst *CI = dyn_cast<CastInst>(cast<Instruction>(*UI))) {
BasicBlock::iterator It = I; ++It;
+ if (isa<InvokeInst>(I))
+ It = cast<InvokeInst>(I)->getNormalDest()->begin();
while (isa<PHINode>(It)) ++It;
if (It != BasicBlock::iterator(CI)) {
// Splice the cast immediately after the operand in question.
More information about the llvm-commits
mailing list