[llvm] [VPlan] Remove redundant x && (y && x) -> x && y combine (PR #213219)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 31 01:59:44 PDT 2026
================
@@ -1188,19 +1192,12 @@ 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())))) {
+ if (match(Def, m_c_LogicalAnd(m_VPValue(X),
+ m_c_LogicalAnd(m_Deferred(X), m_VPValue())))) {
Def->replaceAllUsesWith(Def->getOperand(1));
----------------
lukel97 wrote:
Fixed in 66302ae, but kept the outer-and commutative match
https://github.com/llvm/llvm-project/pull/213219
More information about the llvm-commits
mailing list