Re: [PATCH] MATCH: Move `(x | y) & (~x ^ y)` over to use bitwise_inverted_equal_p

2023-08-29 Thread Richard Biener via Gcc-patches
On Mon, Aug 28, 2023 at 10:15 PM Andrew Pinski via Gcc-patches wrote: > > This moves the match pattern `(x | y) & (~x ^ y)` over to use > bitwise_inverted_equal_p. > This now also allows to optmize comparisons and also catches the missed `(~x > | y) & (x ^ y)` > transformation into `~x & y`. > >

[PATCH] MATCH: Move `(x | y) & (~x ^ y)` over to use bitwise_inverted_equal_p

2023-08-28 Thread Andrew Pinski via Gcc-patches
This moves the match pattern `(x | y) & (~x ^ y)` over to use bitwise_inverted_equal_p. This now also allows to optmize comparisons and also catches the missed `(~x | y) & (x ^ y)` transformation into `~x & y`. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog:

Re: [PATCH] MATCH: Move `(X & ~Y) | (~X & Y)` over to use bitwise_inverted_equal_p

2023-08-28 Thread Richard Biener via Gcc-patches
On Fri, Aug 25, 2023 at 6:22 PM Andrew Pinski via Gcc-patches wrote: > > This moves the pattern `(X & ~Y) | (~X & Y)` to use bitwise_inverted_equal_p > so we can simplify earlier the case where X and Y are defined by comparisons. > We were able to optimize to (!X)^(!Y) in the end due to the patter

[PATCH] MATCH: Move `(X & ~Y) | (~X & Y)` over to use bitwise_inverted_equal_p

2023-08-25 Thread Andrew Pinski via Gcc-patches
This moves the pattern `(X & ~Y) | (~X & Y)` to use bitwise_inverted_equal_p so we can simplify earlier the case where X and Y are defined by comparisons. We were able to optimize to (!X)^(!Y) in the end due to the pattern added in r14-3110-g7fb65f102851248bafa0815 and the older pattern r13-4620-g4