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