On 1/5/2022 1:12 PM, Navid Rahimi via Gcc-patches wrote:
Hi GCC community,
This patch will add the missed pattern described in bug 103514 [1] to the
match.pd. [1] includes proof of correctness for the patch too.
PR tree-optimization/103514
* match.pd (a & b) ^ (a == b) -> !(a | b): New optimization.
* match.pd (a & b) == (a ^ b) -> !(a | b): New optimization.
* gcc.dg/tree-ssa/pr103514.c: Testcase for this optimization.
1) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103514
Note the bug was filed an fixed during stage3, review just didn't happen
in a reasonable timeframe.
I'm going to ACK this for the trunk and go ahead and commit it for you.
Thanks for your patience,
jeff