[llvm] [VPlan] Remove VPBlendRecipe and replace with select VPInstructions (PR #150369)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 1 05:16:37 PDT 2025


================
@@ -8656,9 +8658,11 @@ VPlanPtr LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(
       // latter are added above for masking.
       // FIXME: Migrate code relying on the underlying instruction from VPlan0
       // to construct recipes below to not use the underlying instruction.
-      if (isa<VPCanonicalIVPHIRecipe, VPWidenCanonicalIVRecipe, VPBlendRecipe>(
-              &R) ||
-          (isa<VPInstruction>(&R) && !UnderlyingValue))
+      if (isa<VPCanonicalIVPHIRecipe, VPWidenCanonicalIVRecipe>(&R) ||
+          (isa<VPInstruction>(&R) && !UnderlyingValue) ||
+          (match(&R, m_VPInstruction<Instruction::Select>(
+                         m_VPValue(), m_VPValue(), m_VPValue())) &&
----------------
artagnon wrote:

Would be good to introduce an empty variant of the select matcher?

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


More information about the llvm-commits mailing list