Skip to content

Commit 1fa2c6a

Browse files
committed
Rebase and update
1 parent f4bbf95 commit 1fa2c6a

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
@@ -2373,14 +2373,12 @@ void InnerLoopVectorizer::scalarizeInstruction(const Instruction *Instr,
23732373
// End if-block.
23742374
VPRegionBlock *Parent = RepRecipe->getParent()->getParent();
23752375
bool IfPredicateInstr = Parent ? Parent->isReplicator() : false;
2376-
assert((Parent ||
2377-
(RepRecipe->getOpcode() == Instruction::Store &&
2378-
isa<VPInstruction>(RepRecipe->getOperand(0)) &&
2379-
cast<VPInstruction>(RepRecipe->getOperand(0))->isVectorToScalar() &&
2380-
RepRecipe->getOperand(1)->isDefinedOutsideLoopRegions())) &&
2381-
"Expected a recipe either in a region, or a uniform store with a "
2382-
"vector-to-scalar stored value and an address defined outside "
2383-
"vectorized region.");
2376+
assert((Parent || all_of(RepRecipe->operands(),
2377+
[](VPValue *Op) {
2378+
return Op->isDefinedOutsideLoopRegions();
2379+
})) &&
2380+
"Expected a recipe is either within a region or all of its operands "
2381+
"are defined outside the vectorized region.");
23842382
if (IfPredicateInstr)
23852383
PredicatedInstructions.push_back(Cloned);
23862384
}

0 commit comments

Comments
 (0)