Răsfoiți Sursa

[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 ani în urmă
părinte
comite
ba9e6a642f
1 a modificat fișierele cu 2 adăugiri și 2 ștergeri
  1. 2 2
      lib/Transforms/Vectorize/LoopVectorize.cpp

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

@@ -2695,8 +2695,8 @@ void InnerLoopVectorizer::emitSCEVChecks(Loop *L, BasicBlock *Bypass) {
     if (C->isZero())
     if (C->isZero())
       return;
       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.
   // Create a new block containing the stride check.
   BB->setName("vector.scevcheck");
   BB->setName("vector.scevcheck");