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 @@ -2405,13 +2405,22 @@ void VPlanTransforms::simplifyEVLIVs(VPlan &Plan) {
2405
2405
};
2406
2406
2407
2407
// Find EVL loop entries by locating VPEVLBasedIVPHIRecipe
2408
+ // There should be only one EVL PHI in the entire plan
2409
+ VPEVLBasedIVPHIRecipe *EVLPhi = nullptr ;
2410
+ VPBasicBlock *EVLPhiBlock = nullptr ;
2411
+
2408
2412
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
2409
2413
vp_depth_first_shallow (Plan.getEntry ())))
2410
2414
for (VPRecipeBase &R : VPBB->phis ())
2411
2415
if (auto *PhiR = dyn_cast<VPEVLBasedIVPHIRecipe>(&R)) {
2412
- ConvertEVLPhi (Plan, VPBB, PhiR);
2413
- break ;
2416
+ assert (!EVLPhi && " Found multiple EVL PHIs - only one expected" );
2417
+ EVLPhi = PhiR;
2418
+ EVLPhiBlock = VPBB;
2414
2419
}
2420
+
2421
+ // Process the single EVL PHI if found
2422
+ if (EVLPhi)
2423
+ ConvertEVLPhi (Plan, EVLPhiBlock, EVLPhi);
2415
2424
}
2416
2425
2417
2426
void VPlanTransforms::dropPoisonGeneratingRecipes (
You can’t perform that action at this time.
0 commit comments