[llvm] [VPlan] Use subpattern-m_VPValue in simplifyRecipe (NFC) (PR #213268)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 08:23:55 PDT 2026


================
@@ -1473,11 +1472,12 @@ static void simplifyRecipe(VPSingleDefRecipe *Def) {
 
   // For i1 vp.merges produced by AnyOf reductions:
   // vp.merge true, (or x, y), x, evl -> vp.merge y, true, x, evl
-  if (match(Def, m_Intrinsic<Intrinsic::vp_merge>(m_True(), m_VPValue(A),
-                                                  m_VPValue(X), m_VPValue())) &&
+  if (match(Def, m_Intrinsic<Intrinsic::vp_merge>(m_VPValue(Z, m_True()),
+                                                  m_VPValue(A), m_VPValue(X),
+                                                  m_VPValue())) &&
       match(A, m_c_BinaryOr(m_Specific(X), m_VPValue(Y))) &&
       Def->getScalarType()->isIntegerTy(1)) {
-    Def->setOperand(1, Def->getOperand(0));
+    Def->setOperand(1, Z);
----------------
lukel97 wrote:

This is probably easiest written as just Plan.getTrue()

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


More information about the llvm-commits mailing list