[llvm-commits] [llvm] r140431 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Andrew Trick
atrick at apple.com
Fri Sep 23 16:05:19 PDT 2011
Author: atrick
Date: Fri Sep 23 18:05:19 2011
New Revision: 140431
URL: http://llvm.org/viewvc/llvm-project?rev=140431&view=rev
Log:
LSR minor bug fix in RateRegister.
No test case. Noticed by inspection and I doubt it ever affects the
outcome of the overall heuristic, let alone final codegen.
Modified:
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=140431&r1=140430&r2=140431&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Fri Sep 23 18:05:19 2011
@@ -728,7 +728,7 @@
// Add the step value register, if it needs one.
// TODO: The non-affine case isn't precisely modeled here.
if (!AR->isAffine() || !isa<SCEVConstant>(AR->getOperand(1)))
- if (!Regs.count(AR->getStart()))
+ if (!Regs.count(AR->getOperand(1)))
RateRegister(AR->getOperand(1), Regs, L, SE, DT);
}
++NumRegs;
More information about the llvm-commits
mailing list