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
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user