Skip to content

Commit c3b41e2

Browse files
committed
Rebase and update
1 parent 155bf09 commit c3b41e2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2380,14 +2380,12 @@ void InnerLoopVectorizer::scalarizeInstruction(const Instruction *Instr,
23802380
// End if-block.
23812381
VPRegionBlock *Parent = RepRecipe->getParent()->getParent();
23822382
bool IfPredicateInstr = Parent ? Parent->isReplicator() : false;
2383-
assert((Parent ||
2384-
(RepRecipe->getOpcode() == Instruction::Store &&
2385-
isa<VPInstruction>(RepRecipe->getOperand(0)) &&
2386-
cast<VPInstruction>(RepRecipe->getOperand(0))->isVectorToScalar() &&
2387-
RepRecipe->getOperand(1)->isDefinedOutsideLoopRegions())) &&
2388-
"Expected a recipe either in a region, or a uniform store with a "
2389-
"vector-to-scalar stored value and an address defined outside "
2390-
"vectorized region.");
2383+
assert((Parent || all_of(RepRecipe->operands(),
2384+
[](VPValue *Op) {
2385+
return Op->isDefinedOutsideLoopRegions();
2386+
})) &&
2387+
"Expected a recipe is either within a region or all of its operands "
2388+
"are defined outside the vectorized region.");
23912389
if (IfPredicateInstr)
23922390
PredicatedInstructions.push_back(Cloned);
23932391
}

0 commit comments

Comments
 (0)