summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit2e8c69cf9732726f6b9dbfa56fbddd5e4130bfa5 (patch)
tree2a136ad205fc4fde5216ba322c5c9b78c0d653c9 /llvm/lib/Transforms
parentb613dfadcbfda86c0e681038269ebac0829fc1e5 (diff)
downloadbcm5719-llvm-2e8c69cf9732726f6b9dbfa56fbddd5e4130bfa5.tar.gz
bcm5719-llvm-2e8c69cf9732726f6b9dbfa56fbddd5e4130bfa5.zip
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. llvm-svn: 181495
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index e7da695d503..b16b371878b 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/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;
OpenPOWER on IntegriCloud