Re: [PATCH 1/2] Move `~X & X` and `~X | X` over to use bitwise_inverted_equal_p

2023-08-02 Thread Andrew Pinski via Gcc-patches
On Wed, Aug 2, 2023 at 1:25 AM Jakub Jelinek via Gcc-patches wrote: > > On Wed, Aug 02, 2023 at 10:04:26AM +0200, Richard Biener via Gcc-patches > wrote: > > > --- a/gcc/match.pd > > > +++ b/gcc/match.pd > > > @@ -1157,8 +1157,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > > > > > > /* Simplify ~X

Re: [PATCH 1/2] Move `~X & X` and `~X | X` over to use bitwise_inverted_equal_p

2023-08-02 Thread Jakub Jelinek via Gcc-patches
On Wed, Aug 02, 2023 at 10:04:26AM +0200, Richard Biener via Gcc-patches wrote: > > --- a/gcc/match.pd > > +++ b/gcc/match.pd > > @@ -1157,8 +1157,9 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > > > > /* Simplify ~X & X as zero. */ > > (simplify > > - (bit_and:c (convert? @0) (convert? (bit_not @0))

Re: [PATCH 1/2] Move `~X & X` and `~X | X` over to use bitwise_inverted_equal_p

2023-08-02 Thread Richard Biener via Gcc-patches
On Mon, Jul 31, 2023 at 7:47 PM Andrew Pinski via Gcc-patches wrote: > > This is a simple patch to move these 2 patterns over to use > bitwise_inverted_equal_p. It also allows us to remove 2 other patterns > which were used on comparisons as they are now handled by > the original pattern. > > OK?

[PATCH 1/2] Move `~X & X` and `~X | X` over to use bitwise_inverted_equal_p

2023-07-31 Thread Andrew Pinski via Gcc-patches
This is a simple patch to move these 2 patterns over to use bitwise_inverted_equal_p. It also allows us to remove 2 other patterns which were used on comparisons as they are now handled by the original pattern. OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions. gcc/ChangeLog: