[VPlan] Shallow-traverse vector-loop in dropPoisonGen (NFC) (#193635)

A shallow-traversal of the vector loop region is sufficient to operate
on Memory and Interleave recipes.
This commit is contained in:
Ramkumar Ramachandra
2026-04-23 21:07:20 +01:00
committed by GitHub
parent 6d826cb602
commit ecefc4a2ec

View File

@@ -3688,7 +3688,8 @@ void VPlanTransforms::dropPoisonGeneratingRecipes(
// Traverse all the recipes in the VPlan and collect the poison-generating
// recipes in the backward slice starting at the address of a VPWidenRecipe or
// VPInterleaveRecipe.
auto Iter = vp_depth_first_deep(Plan.getEntry());
auto Iter =
vp_depth_first_shallow(Plan.getVectorLoopRegion()->getEntryBasicBlock());
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(Iter)) {
for (VPRecipeBase &Recipe : *VPBB) {
if (auto *WidenRec = dyn_cast<VPWidenMemoryRecipe>(&Recipe)) {