[llvm-branch-commits] [llvm] [VPlan] Remove (X && Y) | (X && !Y) -> X combine. NFC (PR #219368)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 27 22:11:11 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Luke Lau (lukel97)

<details>
<summary>Changes</summary>

We have smaller combines that can take care of this now that we process recipes in a worklist

---
Full diff: https://github.com/llvm/llvm-project/pull/219368.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp (-8) 


``````````diff
diff --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 8b1d68a9ac9c5..cbe1796ae208d 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -1129,15 +1129,7 @@ static VPValue *simplifyLogicalRecipe(VPSingleDefRecipe *Def,
                                       VPBuilder &Builder,
                                       bool CanCreateNewRecipe) {
   VPlan *Plan = Def->getParent()->getPlan();
-
-  // Simplify (X && Y) | (X && !Y) -> X.
-  // TODO: Split up into simpler, modular combines: (X && Y) | (X && Z) into X
-  // && (Y | Z) and (X | !X) into true.
   VPValue *X, *Y, *Z;
-  if (match(Def,
-            m_c_BinaryOr(m_LogicalAnd(m_VPValue(X), m_VPValue(Y)),
-                         m_LogicalAnd(m_Deferred(X), m_Not(m_Deferred(Y))))))
-    return X;
 
   // x | AllOnes -> AllOnes
   if (match(Def, m_c_BinaryOr(m_VPValue(X), m_AllOnes())))

``````````

</details>


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


More information about the llvm-branch-commits mailing list