Skip to content

Commit 842e5d4

Browse files
committed
Substitute insertion block check with an assert
1 parent 049bf68 commit 842e5d4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8938,8 +8938,7 @@ VPRecipeBuilder::tryToCreatePartialReduction(Instruction *Reduction,
89388938
unsigned ReductionOpcode = Reduction->getOpcode();
89398939
if (ReductionOpcode == Instruction::Sub) {
89408940
VPBasicBlock *ParentBlock = Builder.getInsertBlock();
8941-
if (!ParentBlock)
8942-
return nullptr;
8941+
assert(ParentBlock && "Builder must have an insert block.");
89438942

89448943
auto *const Zero = ConstantInt::get(Reduction->getType(), 0);
89458944
SmallVector<VPValue *, 2> Ops;

0 commit comments

Comments
 (0)