summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IVUsers.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2017-04-25 06:53:25 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2017-04-25 06:53:25 +0000
commit561247a8238a094bc4aa35376a2fd076bef51fe6 (patch)
treefa788e47be113b6ce6a6caadde874c3a29ee27a5 /llvm/lib/Analysis/IVUsers.cpp
parentd5775617c8c2a1f393a7edd339f63fc3c4c7c0a4 (diff)
downloadbcm5719-llvm-561247a8238a094bc4aa35376a2fd076bef51fe6.tar.gz
bcm5719-llvm-561247a8238a094bc4aa35376a2fd076bef51fe6.zip
[IVUsers] Don't bail out of normalizing non-affine add recs
Summary: In a previous change I changed SCEV's normalization / denormalization to work with non-affine add recs. So the bailout in IVUsers can be removed. Reviewers: atrick, efriedma Reviewed By: atrick Subscribers: davide, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D32105 llvm-svn: 301298
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
-rw-r--r--llvm/lib/Analysis/IVUsers.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp
index fde805a5fde..c30feb973e6 100644
--- a/llvm/lib/Analysis/IVUsers.cpp
+++ b/llvm/lib/Analysis/IVUsers.cpp
@@ -253,18 +253,8 @@ bool IVUsers::AddUsersImpl(Instruction *I,
const SCEV *OriginalISE = ISE;
auto NormalizePred = [&](const SCEVAddRecExpr *AR) {
- // We only allow affine AddRecs to be normalized, otherwise we would not
- // be able to correctly denormalize.
- // e.g. {1,+,3,+,2} == {-2,+,1,+,2} + {3,+,2}
- // Normalized form: {-2,+,1,+,2}
- // Denormalized form: {1,+,3,+,2}
- //
- // However, denormalization would use a different step expression than
- // normalization (see getPostIncExpr), generating the wrong final
- // expression: {-2,+,1,+,2} + {1,+,2} => {-1,+,3,+,2}
auto *L = AR->getLoop();
- bool Result =
- AR->isAffine() && IVUseShouldUsePostIncValue(User, I, L, DT);
+ bool Result = IVUseShouldUsePostIncValue(User, I, L, DT);
if (Result)
NewUse.PostIncLoops.insert(L);
return Result;
OpenPOWER on IntegriCloud