[llvm-branch-commits] [llvm] [VPlan] Remove (X && Y) | (X && !Y) -> X combine. NFC (PR #219368)
Luke Lau via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Aug 27 22:10:33 PDT 2026
https://github.com/lukel97 created https://github.com/llvm/llvm-project/pull/219368
We have smaller combines that can take care of this now that we process recipes in a worklist
---
<sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
>From 7dee60a69903411915bb6bc29884d3da194147aa Mon Sep 17 00:00:00 2001
From: Luke Lau <luke at igalia.com>
Date: Fri, 28 Aug 2026 13:04:50 +0800
Subject: [PATCH] [VPlan] Remove (X && Y) | (X && !Y) -> X combine. NFC
We have smaller combines that can take care of this now that we process recipes in a worklist
---
llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp | 8 --------
1 file changed, 8 deletions(-)
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())))
More information about the llvm-branch-commits
mailing list