mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-20 00:20:11 +00:00
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
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