[llvm] [VPlan] Fix VPTypeAnalysis cache clobbering in EVL transform (PR #120252)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 17 09:15:27 PST 2024
================
@@ -1565,10 +1567,17 @@ static void transformRecipestoEVLRecipes(VPlan &Plan, VPValue &EVL) {
VPValue *CurVPV = CurRecipe->getVPSingleValue();
CurVPV->replaceAllUsesWith(NewRecipe->getVPSingleValue());
}
- CurRecipe->eraseFromParent();
+ // Defer erasing recipes till the end so that we don't invalidate the
+ // VPTypeAnalysis cache
+ ToErase.push_back(CurRecipe);
}
- recursivelyDeleteDeadRecipes(HeaderMask);
----------------
lukel97 wrote:
Is it possible that `HeaderMask` might still be used by a recipe if it can't be converted to an EVL recipe?
https://github.com/llvm/llvm-project/pull/120252
More information about the llvm-commits
mailing list