Эх сурвалжийг харах

[LV] Tail-folding, runtime scev checks

Now that we allow tail-folding, not only when we optimise for size, make
sure we do not run in this assert.

Differential revision: https://reviews.llvm.org/D66932

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@370711 91177308-0d34-0410-b5e6-96231b3b80d8
Sjoerd Meijer 6 жил өмнө
parent
commit
ba9e6a642f

+ 2 - 2
lib/Transforms/Vectorize/LoopVectorize.cpp

@@ -2695,8 +2695,8 @@ void InnerLoopVectorizer::emitSCEVChecks(Loop *L, BasicBlock *Bypass) {
     if (C->isZero())
       return;
 
-  assert(!Cost->foldTailByMasking() &&
-         "Cannot SCEV check stride or overflow when folding tail");
+  assert(!BB->getParent()->hasOptSize() &&
+         "Cannot SCEV check stride or overflow when optimizing for size");
 
   // Create a new block containing the stride check.
   BB->setName("vector.scevcheck");