diff options
author | Chris Jackson <chris.jackson@sony.com> | 2021-07-27 13:59:34 +0100 |
---|---|---|
committer | Chris Jackson <chris.jackson@sony.com> | 2021-07-27 14:22:09 +0100 |
commit | 796b84d26f4d461fb50e7b4e84e15a10eaca88fc (patch) | |
tree | 937d1ba8f1c0a80510e5082809926be7304c3dd2 /llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | |
parent | 259e365deaa3a6920b30f49e3d03d3508f1d4900 (diff) | |
download | llvm-796b84d26f4d461fb50e7b4e84e15a10eaca88fc.zip llvm-796b84d26f4d461fb50e7b4e84e15a10eaca88fc.tar.gz llvm-796b84d26f4d461fb50e7b4e84e15a10eaca88fc.tar.bz2 |
[DebugInfo][LoopStrengthReduction] SCEV-based salvaging for LSR
This reapplies commit 76f3ffb2b285998f02639db8fd42fb0de8a540d0 that was
reverted due to buildbot failures.
- Update lit tests with REQUIRES condition.
- Abandon salvage attempt if SCEVUnknown::getValue() returns nullptr.
Differential Revision: https://reviews.llvm.org/D105207
Diffstat (limited to 'llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp index 5af1c37..3978e1e 100644 --- a/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp +++ b/llvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp @@ -1393,9 +1393,10 @@ SCEVExpander::getAddRecExprPHILiterally(const SCEVAddRecExpr *Normalized, // can ensure that IVIncrement dominates the current uses. PostIncLoops = SavedPostIncLoops; - // Remember this PHI, even in post-inc mode. + // Remember this PHI, even in post-inc mode. LSR SCEV-based salvaging is most + // effective when we are able to use an IV inserted here, so record it. InsertedValues.insert(PN); - + InsertedIVs.push_back(PN); return PN; } |