File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1473,7 +1473,7 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
1473
1473
for (VPUser *U : collectUsersRecursively (HeaderMask)) {
1474
1474
VPRecipeBase *NewRecipe = nullptr ;
1475
1475
auto *CurRecipe = dyn_cast<VPRecipeBase>(U);
1476
- if (!CurRecipe || CurRecipe-> getNumDefinedValues () > 1 )
1476
+ if (!CurRecipe)
1477
1477
continue ;
1478
1478
1479
1479
auto GetNewMask = [&](VPValue *OrigMask) -> VPValue * {
@@ -1498,6 +1498,9 @@ bool VPlanTransforms::tryAddExplicitVectorLength(VPlan &Plan) {
1498
1498
assert (NumDefVal == CurRecipe->getNumDefinedValues () &&
1499
1499
" New recipe must define the same number of values as the "
1500
1500
" original." );
1501
+ assert (
1502
+ NumDefVal <= 1 &&
1503
+ " Only supports recipes with a single definition or without users." );
1501
1504
NewRecipe->insertBefore (CurRecipe);
1502
1505
if (NumDefVal > 0 ) {
1503
1506
VPValue *CurVPV = CurRecipe->getVPSingleValue ();
You can’t perform that action at this time.
0 commit comments