[llvm] [VPlan] Simplify (X && Y) || (X && !Y) -> X. (PR #89386)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 25 01:57:35 PDT 2024
================
@@ -940,6 +940,18 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
#endif
}
+ VPValue *B;
+ VPValue *C;
+ VPValue *D;
+ // Simplify (X && Y) || (X && !Y) -> X.
+ if (match(&R,
----------------
ayalz wrote:
More general and modular: first simplify (A && B) || (C && D) where A == C into A && (B || D). Also for A == D, B == C, B == D. Followed by simplifying (X || !X).
https://github.com/llvm/llvm-project/pull/89386
More information about the llvm-commits
mailing list