|
@@ -2697,6 +2697,7 @@ void InnerLoopVectorizer::emitSCEVChecks(Loop *L, BasicBlock *Bypass) {
|
|
|
|
|
|
assert(!Cost->foldTailByMasking() &&
|
|
|
"Cannot SCEV check stride or overflow when folding tail");
|
|
|
+
|
|
|
// Create a new block containing the stride check.
|
|
|
BB->setName("vector.scevcheck");
|
|
|
auto *NewBB = BB->splitBasicBlock(BB->getTerminator(), "vector.ph");
|
|
@@ -2729,7 +2730,9 @@ void InnerLoopVectorizer::emitMemRuntimeChecks(Loop *L, BasicBlock *Bypass) {
|
|
|
if (!MemRuntimeCheck)
|
|
|
return;
|
|
|
|
|
|
- assert(!Cost->foldTailByMasking() && "Cannot check memory when folding tail");
|
|
|
+ assert(!BB->getParent()->hasOptSize() &&
|
|
|
+ "Cannot emit memory checks when optimizing for size");
|
|
|
+
|
|
|
// Create a new block containing the memory check.
|
|
|
BB->setName("vector.memcheck");
|
|
|
auto *NewBB = BB->splitBasicBlock(BB->getTerminator(), "vector.ph");
|