[llvm] [VPlan] Remove redundant x && (y && x) -> x && y combine (PR #213219)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 03:46:25 PDT 2026
================
@@ -1192,16 +1192,9 @@ static bool simplifyLogicalRecipe(VPSingleDefRecipe *Def, VPBuilder &Builder,
}
// x && (x && y) -> x && y
- if (match(Def, m_LogicalAnd(m_VPValue(X),
- m_LogicalAnd(m_Deferred(X), m_VPValue())))) {
- Def->replaceAllUsesWith(Def->getOperand(1));
- return true;
- }
-
- // x && (y && x) -> x && y
- if (match(Def, m_LogicalAnd(m_VPValue(X),
- m_LogicalAnd(m_VPValue(Y), m_Deferred(X))))) {
- Def->replaceAllUsesWith(Builder.createLogicalAnd(X, Y));
----------------
artagnon wrote:
At the moment, I don't think LogicalAnd will ever have an underlying value?
https://github.com/llvm/llvm-project/pull/213219
More information about the llvm-commits
mailing list