[llvm-commits] [llvm] r140583 - /llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Andrew Trick
atrick at apple.com
Mon Sep 26 16:35:26 PDT 2011
Author: atrick
Date: Mon Sep 26 18:35:25 2011
New Revision: 140583
URL: http://llvm.org/viewvc/llvm-project?rev=140583&view=rev
Log:
LSR, one of the new Cost::isLoser() checks did not get merged in the previous checkin.
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=140583&r1=140582&r2=140583&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Sep 26 18:35:25 2011
@@ -745,9 +745,13 @@
// 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->getOperand(1)))
+ if (!AR->isAffine() || !isa<SCEVConstant>(AR->getOperand(1))) {
+ if (!Regs.count(AR->getOperand(1))) {
RateRegister(AR->getOperand(1), Regs, L, SE, DT);
+ if (isLoser())
+ return;
+ }
+ }
}
++NumRegs;
More information about the llvm-commits
mailing list