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

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 02:22:23 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()));
----------------
sdesmalen-arm wrote:

They definitely had effect (it enables the same functionality as added in #194859), but this shows there is missing test-coverage.

My recommendation would be to slim down this PR by removing some of the _uses_ of `m_SelectLike` that don't affect the change in `tail-folding-complex-mask.ll` and get this PR merged (I think adding `m_SelectLike` is rather uncontroversial). Then #194859 can rebase and use `m_SelectLike` for the cases relevant to that PR with corresponding tests.

Any follow-up PRs could replace further uses with more test-coverage.



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


More information about the llvm-commits mailing list