[PATCH] D47216: [LV] Fix to pr37515, FP primary induction crashes LV

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 12:36:30 PDT 2018


hsaito added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:729
     LLVM_DEBUG(dbgs() << "LV: Did not find one integer induction var.\n");
-    if (Inductions.empty()) {
+    if (Inductions.empty() || !WidestIndTy) {
       ORE->emit(createMissedAnalysis("NoInductionVariable")
----------------
In pr37515, Ayal suggested going just "if (!WidestIndTy)". I agree.

He also suggested adding an assert for non-NULL IdxTy in the following place. Also makes sense.

This line in InnerLoopVectorizer::getOrCreateTripCount():
  Type *IdxTy = Legal->getWidestInductionType();



Repository:
  rL LLVM

https://reviews.llvm.org/D47216





More information about the llvm-commits mailing list