[llvm] 310cf74 - [VPlan] Remove (X && Y) | (X && !Y) -> X combine. NFC (#219368)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 01:44:40 PDT 2026


Author: Luke Lau
Date: 2026-09-28T09:44:32+01:00
New Revision: 310cf744bd0c1af7b07377a8fa5a6c2fd72ef4a3

URL: https://github.com/llvm/llvm-project/commit/310cf744bd0c1af7b07377a8fa5a6c2fd72ef4a3
DIFF: https://github.com/llvm/llvm-project/commit/310cf744bd0c1af7b07377a8fa5a6c2fd72ef4a3.diff

LOG: [VPlan] Remove (X && Y) | (X && !Y) -> X combine. NFC (#219368)

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

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
index 13abd173502e9..dfea9325c0058 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
@@ -1171,13 +1171,7 @@ static void removeRedundantExpandSCEVRecipes(VPlan &Plan) {
 
 /// Try to simplify logical and bitwise recipes in \p Def.
 static VPValue *simplifyLogicalRecipe(VPlan &Plan, VPSingleDefRecipe *Def) {
-  // Simplify (X && Y) | (X && !Y) -> X.
-  // TODO: Remove now that we have smaller combines for this.
-  VPValue *X, *Y;
-  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;
+  VPValue *X;
 
   // X | AllOnes -> AllOnes
   if (match(Def, m_c_BinaryOr(m_VPValue(X), m_AllOnes())))


        


More information about the llvm-commits mailing list