From: Sjoerd Meijer Date: Tue, 3 Sep 2019 08:53:02 +0000 (+0000) Subject: [LV] Tail-folding, runtime scev checks X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ba9e6a642f34548be9cef6ae40f38aa7edb5823e;p=llvm [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 --- diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 4f67aa1f322..1db9f920c6e 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/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");