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
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");