diff options
author | Arnold Schwaighofer <aschwaighofer@apple.com> | 2013-05-09 00:32:18 +0000 |
---|---|---|
committer | Arnold Schwaighofer <aschwaighofer@apple.com> | 2013-05-09 00:32:18 +0000 |
commit | c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073 (patch) | |
tree | c439b513a604cfc10d2b61a8d9eb743caa68298c /lib | |
parent | 96e70b2a0065488e8b72f5c6ace4de9e2e87035c (diff) | |
download | external_llvm-c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073.zip external_llvm-c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073.tar.gz external_llvm-c121f5dc267e5d7048b8f27ddcfdc41f8c8e7073.tar.bz2 |
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')
-rw-r--r-- | lib/Transforms/Vectorize/LoopVectorize.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index e7da695..b16b371 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; |