summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
authorArnold Schwaighofer <aschwaighofer@apple.com>2013-05-09 00:32:18 +0000
committerArnold Schwaighofer <aschwaighofer@apple.com>2013-05-09 00:32:18 +0000
commitc121f5dc267e5d7048b8f27ddcfdc41f8c8e7073 (patch)
treec439b513a604cfc10d2b61a8d9eb743caa68298c /lib/Transforms
parent96e70b2a0065488e8b72f5c6ace4de9e2e87035c (diff)
downloadllvm-c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073.tar.gz
llvm-c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073.tar.bz2
llvm-c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073.tar.xz
LoopVectorizer: Don't assert on the absence of induction variables
A computable loop exit count does not imply the presence of an induction variable. Scalar evolution can return a value for an infinite loop. Fixes PR15926. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp
index e7da695d50..b16b371878 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -2523,7 +2523,8 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
if (!Induction) {
DEBUG(dbgs() << "LV: Did not find one integer induction var.\n");
- assert(getInductionVars()->size() && "No induction variables");
+ if (Inductions.empty())
+ return false;
}
return true;