[llvm] [VPlan] Introduce m_SelectLike and use to support 2-operand blends. (PR #194729)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue May 5 07:07:52 PDT 2026


================
@@ -773,7 +773,7 @@ VPInstruction *vputils::findComputeReductionResult(VPReductionPHIRecipe *PhiR) {
 
   // Look through selects inserted for tail folding or predicated reductions.
   VPRecipeBase *SelR = vputils::findUserOf(
-      BackedgeVal, m_Select(m_VPValue(), m_VPValue(), m_VPValue()));
+      BackedgeVal, m_SelectLike(m_VPValue(), m_VPValue(), m_VPValue()));
----------------
david-arm wrote:

Looks like both this and some of the other changes had no effect on the tests. I think it would be good to have tests for more cases in order to defend the new pattern which is now being used everywhere. Or, if it's not possible to exercise a code path using `m_SelectLike` for reductions and partial reductions, perhaps it's worth restricting the cope to only those places where we can test it?

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


More information about the llvm-commits mailing list