Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.83 -> 1.84 --- Log message: RewriteExpr, either the new PHI node of induction variable or the post-increment value, should be first cast to the appropriated type (to the type of the common expr). Otherwise, the rewrite of a use based on (common + iv) may end up with an incorrect type. --- Diffs of the changes: (+3 -0) LoopStrengthReduce.cpp | 3 +++ 1 files changed, 3 insertions(+) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.83 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.84 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.83 Wed Apr 12 14:28:15 2006 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Thu Jun 8 19:12:42 2006 @@ -1074,6 +1074,9 @@ if (L->contains(User.Inst->getParent())) User.Inst->moveBefore(LatchBlock->getTerminator()); } + if (RewriteOp->getType() != ReplacedTy) + RewriteOp = SCEVExpander::InsertCastOfTo(RewriteOp, ReplacedTy); + SCEVHandle RewriteExpr = SCEVUnknown::get(RewriteOp); // Clear the SCEVExpander's expression map so that we are guaranteed _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits