[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 8 18:13:58 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.43 -> 1.44
---
Log message:
SCEVAddExpr::get() of an empty list is invalid.
---
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.43 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.44
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.43 Mon Aug 8 19:18:09 2005
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 8 20:13:47 2005
@@ -608,7 +608,10 @@
for (unsigned j = 0, e = AE->getNumOperands(); j != e; ++j)
if (!SubExpressionUseCounts.count(AE->getOperand(j)))
NewOps.push_back(AE->getOperand(j));
- Uses[i].Base = SCEVAddExpr::get(NewOps);
+ if (NewOps.size() == 0)
+ Uses[i].Base = Zero;
+ else
+ Uses[i].Base = SCEVAddExpr::get(NewOps);
} else {
// If the base is zero (which is common), return zero now, there are no
// CSEs we can find.
More information about the llvm-commits
mailing list