[llvm] [VPlan] Make simplifyRecipe more like InstCombine (PR #212968)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 3 01:53:43 PDT 2026
================
@@ -1658,7 +1613,16 @@ void VPlanTransforms::simplifyRecipes(VPlan &Plan) {
for (VPBasicBlock *VPBB : VPBlockUtils::blocksOnly<VPBasicBlock>(RPOT)) {
for (VPRecipeBase &R : make_early_inc_range(*VPBB))
if (auto *Def = dyn_cast<VPSingleDefRecipe>(&R))
- simplifyRecipe(Def);
+ if (VPValue *New = simplifyRecipe(Def)) {
+ if (New != Def) {
----------------
lukel97 wrote:
We only want to RAUW if we created a new recipe to replace it. Otherwise if we've modified the recipe in place it falls through to the `else if (vputils::isDeadRecipe(R))` case below
https://github.com/llvm/llvm-project/pull/212968
More information about the llvm-commits
mailing list