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 @@ -2430,13 +2430,22 @@ void VPlanTransforms::simplifyEVLIVs(VPlan &Plan) {
2430
2430
};
2431
2431
2432
2432
// Find EVL loop entries by locating VPEVLBasedIVPHIRecipe
2433
+ // There should be only one EVL PHI in the entire plan
2434
+ VPEVLBasedIVPHIRecipe *EVLPhi = nullptr ;
2435
+ VPBasicBlock *EVLPhiBlock = nullptr ;
2436
+
2433
2437
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(
2434
2438
vp_depth_first_shallow (Plan.getEntry ())))
2435
2439
for (VPRecipeBase &R : VPBB->phis ())
2436
2440
if (auto *PhiR = dyn_cast<VPEVLBasedIVPHIRecipe>(&R)) {
2437
- ConvertEVLPhi (Plan, VPBB, PhiR);
2438
- break ;
2441
+ assert (!EVLPhi && " Found multiple EVL PHIs - only one expected" );
2442
+ EVLPhi = PhiR;
2443
+ EVLPhiBlock = VPBB;
2439
2444
}
2445
+
2446
+ // Process the single EVL PHI if found
2447
+ if (EVLPhi)
2448
+ ConvertEVLPhi (Plan, EVLPhiBlock, EVLPhi);
2440
2449
}
2441
2450
2442
2451
void VPlanTransforms::dropPoisonGeneratingRecipes (
You can’t perform that action at this time.
0 commit comments