Skip to content

Commit 3b32a4e

Browse files
committed
Remove the check for the number of definations
1 parent 7329881 commit 3b32a4e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
14731473
for (VPUser *U : collectUsersRecursively(HeaderMask)) {
14741474
VPRecipeBase *NewRecipe = nullptr;
14751475
auto *CurRecipe = dyn_cast<VPRecipeBase>(U);
1476-
if (!CurRecipe || CurRecipe->getNumDefinedValues() > 1)
1476+
if (!CurRecipe)
14771477
continue;
14781478

14791479
auto GetNewMask = [&](VPValue *OrigMask) -> VPValue * {
@@ -1498,6 +1498,9 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
14981498
assert(NumDefVal == CurRecipe->getNumDefinedValues() &&
14991499
"New recipe must define the same number of values as the "
15001500
"original.");
1501+
assert(
1502+
NumDefVal <= 1 &&
1503+
"Only supports recipes with a single definition or without users.");
15011504
NewRecipe->insertBefore(CurRecipe);
15021505
if (NumDefVal > 0) {
15031506
VPValue *CurVPV = CurRecipe->getVPSingleValue();

0 commit comments

Comments
 (0)