diff options
| author | Andrew Trick <atrick@apple.com> | 2011-09-26 23:35:25 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2011-09-26 23:35:25 +0000 |
| commit | 8868faec63ce47d47b5b4c8e4414a8ca6c3d5833 (patch) | |
| tree | 6d085f8649993bf22ebcfb890890c79b7e88836c /llvm/lib/Transforms/Scalar | |
| parent | a486cb972f5b45311c4fb03d8cc6f91c23fcfb97 (diff) | |
| download | bcm5719-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.cpp | 8 |
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; |

