Index: lib/Transforms/Vectorize/LoopVectorizationLegality.cpp =================================================================== --- lib/Transforms/Vectorize/LoopVectorizationLegality.cpp +++ lib/Transforms/Vectorize/LoopVectorizationLegality.cpp @@ -726,7 +726,7 @@ if (!PrimaryInduction) { LLVM_DEBUG(dbgs() << "LV: Did not find one integer induction var.\n"); - if (Inductions.empty()) { + if (Inductions.empty() || !WidestIndTy) { ORE->emit(createMissedAnalysis("NoInductionVariable") << "loop induction variable could not be identified"); return false;