summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-09-26 23:35:25 +0000
committerAndrew Trick <atrick@apple.com>2011-09-26 23:35:25 +0000
commit8868faec63ce47d47b5b4c8e4414a8ca6c3d5833 (patch)
tree6d085f8649993bf22ebcfb890890c79b7e88836c /llvm/lib/Transforms/Scalar
parenta486cb972f5b45311c4fb03d8cc6f91c23fcfb97 (diff)
downloadbcm5719-llvm-8868faec63ce47d47b5b4c8e4414a8ca6c3d5833.tar.gz
bcm5719-llvm-8868faec63ce47d47b5b4c8e4414a8ca6c3d5833.zip
LSR, one of the new Cost::isLoser() checks did not get merged in the previous checkin.
llvm-svn: 140583
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 1e5b56bc4e2..0ad9fc38411 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -745,9 +745,13 @@ void Cost::RateRegister(const SCEV *Reg,
// 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;
OpenPOWER on IntegriCloud