File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -2413,13 +2413,22 @@ void VPlanTransforms::simplifyEVLIVs(VPlan &Plan) {
2413
2413
};
2414
2414
2415
2415
// Find EVL loop entries by locating VPEVLBasedIVPHIRecipe
2416
+ // There should be only one EVL PHI in the entire plan
2417
+ VPEVLBasedIVPHIRecipe *EVLPhi = nullptr ;
2418
+ VPBasicBlock *EVLPhiBlock = nullptr ;
2419
+
2416
2420
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
2417
2421
vp_depth_first_shallow (Plan.getEntry ())))
2418
2422
for (VPRecipeBase &R : VPBB->phis ())
2419
2423
if (auto *PhiR = dyn_cast<VPEVLBasedIVPHIRecipe>(&R)) {
2420
- ConvertEVLPhi (Plan, VPBB, PhiR);
2421
- break ;
2424
+ assert (!EVLPhi && " Found multiple EVL PHIs - only one expected" );
2425
+ EVLPhi = PhiR;
2426
+ EVLPhiBlock = VPBB;
2422
2427
}
2428
+
2429
+ // Process the single EVL PHI if found
2430
+ if (EVLPhi)
2431
+ ConvertEVLPhi (Plan, EVLPhiBlock, EVLPhi);
2423
2432
}
2424
2433
2425
2434
void VPlanTransforms::dropPoisonGeneratingRecipes (
You can’t perform that action at this time.
0 commit comments