[llvm] [VPlan] Simplify VPBlendRecipes to select instructions (PR #133993)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 8 03:03:18 PDT 2025
================
@@ -7047,6 +7047,13 @@ static bool planContainsAdditionalSimplifications(VPlan &Plan,
if (isa<VPPartialReductionRecipe>(&R))
return true;
+ // VPBlendRecipes are converted to selects and may have been simplified.
+ using namespace VPlanPatternMatch;
+ if (match(&R, m_VPInstruction<Instruction::Select>(
+ m_VPValue(), m_VPValue(), m_VPValue())) &&
----------------
lukel97 wrote:
Good catch, I didn't notice this at the time. But I tried it out and it turns out m_Select also matches VPWidenSelectRecipes and VPReplicateRecipes too which we don't want to skip
https://github.com/llvm/llvm-project/pull/133993
More information about the llvm-commits
mailing list