[Vectorization] Actually return from error case in isStridedPtr
[oota-llvm.git] / lib / Analysis / LoopAccessAnalysis.cpp
index d7896ade3543259755f5a601094c640f64e59fd0..8bcdcb862014dc9bd9dc786dd1a63b55914abce8 100644 (file)
@@ -845,6 +845,7 @@ int llvm::isStridedPtr(PredicatedScalarEvolution &PSE, Value *Ptr,
   if (Lp != AR->getLoop()) {
     DEBUG(dbgs() << "LAA: Bad stride - Not striding over innermost loop " <<
           *Ptr << " SCEV: " << *PtrScev << "\n");
+    return 0;
   }
 
   // The address calculation must not wrap. Otherwise, a dependence could be