[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Aug 17 14:22:52 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.53 -> 1.54
---
Log message:
Fix Transforms/LoopStrengthReduce/2005-08-17-OutOfLoopVariant.ll, a crash
on 177.mesa
---
Diffs of the changes: (+4 -1)
LoopStrengthReduce.cpp | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.53 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.54
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.53 Wed Aug 17 01:35:16 2005
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Aug 17 16:22:41 2005
@@ -744,7 +744,10 @@
// value of the IV. Do not put anything in the base, make sure it's all in
// the immediate field to allow as much factoring as possible.
if (!L->contains(UsersToProcess[i].Inst->getParent())) {
- std::swap(UsersToProcess[i].Base, UsersToProcess[i].Imm);
+ UsersToProcess[i].Imm = SCEVAddExpr::get(UsersToProcess[i].Imm,
+ UsersToProcess[i].Base);
+ UsersToProcess[i].Base =
+ SCEVUnknown::getIntegerSCEV(0, UsersToProcess[i].Base->getType());
} else {
// Addressing modes can be folded into loads and stores. Be careful that
More information about the llvm-commits
mailing list