summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-10-17 11:56:26 +0000
committerTobias Grosser <tobias@grosser.es>2016-10-17 11:56:26 +0000
commit2bbec0ee7f22ac7e23e67b7d342f3b4823da72c4 (patch)
tree3874d58ca7bf527ce5574e36071ee75859d67e26 /llvm/lib
parentfa90c692db7c8a9e5f661ee0cdd4a4ca2f8985dd (diff)
downloadbcm5719-llvm-2bbec0ee7f22ac7e23e67b7d342f3b4823da72c4.tar.gz
bcm5719-llvm-2bbec0ee7f22ac7e23e67b7d342f3b4823da72c4.zip
[SCEV] Consider delinearization pattern with extension with identity factor
Summary: The delinearization algorithm did not consider terms which had an extension without a multiply factor, i.e. a identify factor. We lose cases where size is char type where there will no multiply factor. Reviewers: sanjoy, grosser Subscribers: mzolotukhin, Eugene.Zelenko, llvm-commits, mssimpso, sanjoy, grosser Differential Revision: https://reviews.llvm.org/D16492 llvm-svn: 284378
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index 8389e3c34c3..f8dadd13f72 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -8948,7 +8948,8 @@ struct SCEVCollectTerms {
: Terms(T) {}
bool follow(const SCEV *S) {
- if (isa<SCEVUnknown>(S) || isa<SCEVMulExpr>(S)) {
+ if (isa<SCEVUnknown>(S) || isa<SCEVMulExpr>(S) ||
+ isa<SCEVSignExtendExpr>(S)) {
if (!containsUndefs(S))
Terms.push_back(S);
OpenPOWER on IntegriCloud