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