[llvm] [LV] Support EVL for partial reduction and VPExpressionRecipe. (PR #205741)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 20:53:00 PDT 2026


================
@@ -237,6 +237,29 @@ static VPRecipeBase *optimizeMaskToEVL(VPValue *HeaderMask,
                                            Mask ? Mask : Plan->getTrue(), &EVL},
                                           IntrR->getScalarType(), {}, {}, DL);
 
+  // Transforms the VPReductionRecipe inside the VPExpressionRecipe.
+  if (auto *Expr = dyn_cast<VPExpressionRecipe>(&CurRecipe))
----------------
lukel97 wrote:

I would pull this out into `VPlanTransforms::optimizeEVLMasks` in a separate iteration over any header mask users, since it makes it more obvious that we're erasing the `VPExpressionRecipe` after decomposing it, and we don't need to make `optimizeMaskToEVL` recursive anymore

https://github.com/llvm/llvm-project/pull/205741


More information about the llvm-commits mailing list