Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.124 -> 1.125 --- Log message: allow -1 strides to reuse "1" strides. --- Diffs of the changes: (+2 -1) LoopStrengthReduce.cpp | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.124 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.125 --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.124 Mon Apr 2 01:34:44 2007 +++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Apr 2 17:51:58 2007 @@ -929,7 +929,8 @@ for (std::map<SCEVHandle, IVsOfOneStride>::iterator SI= IVsByStride.begin(), SE = IVsByStride.end(); SI != SE; ++SI) { int64_t SSInt = cast<SCEVConstant>(SI->first)->getValue()->getSExtValue(); - if (unsigned(abs(SInt)) < SSInt || (SInt % SSInt) != 0) + if (SInt != -SSInt && + (unsigned(abs(SInt)) < SSInt || (SInt % SSInt) != 0)) continue; int64_t Scale = SInt / SSInt; // Check that this stride is valid for all the types used for loads and _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits