[llvm] [VPlan] Simplify (x && y) | !x -> !x || y (PR #220801)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 02:49:09 PDT 2026
================
@@ -1210,6 +1210,13 @@ static VPValue *simplifyLogicalRecipe(VPSingleDefRecipe *Def,
if (match(Def, m_Select(m_VPValue(), m_VPValue(X), m_Deferred(X))))
return X;
+ // (x && y) | !x -> !x || y
+ if (CanCreateNewRecipe &&
+ match(Def,
+ m_c_BinaryOr(m_OneUse(m_LogicalAnd(m_VPValue(X), m_VPValue(Y))),
----------------
david-arm wrote:
I realise I'm a bit late here as it's already merged, but the alive proof is only valid for i1 types, but we're looking at a binary or which could surely be greater than 1 bit in size?
https://github.com/llvm/llvm-project/pull/220801
More information about the llvm-commits
mailing list