match.pd: ~X & Y to X ^ Y in some cases

2016-05-13 Thread Marc Glisse
Hello, maybe this would fit better in VRP, but it is easier (and not completely useless) to put it in match.pd. Since the transformation is restricted to GIMPLE, I think I don't need to check that @0 is SSA_NAME. I didn't test if @0 has pointer type before calling get_range_info because we a

Re: match.pd: ~X & Y to X ^ Y in some cases

2016-05-16 Thread Jeff Law
On 05/13/2016 01:07 PM, Marc Glisse wrote: Hello, maybe this would fit better in VRP, but it is easier (and not completely useless) to put it in match.pd. Since the transformation is restricted to GIMPLE, I think I don't need to check that @0 is SSA_NAME. I didn't test if @0 has pointer type be

Re: match.pd: ~X & Y to X ^ Y in some cases

2016-05-16 Thread Marc Glisse
On Mon, 16 May 2016, Jeff Law wrote: Please use if (GIMPLE && ((get_nonzero_bits ...) Rather than #if GIMPLE Richard asked for the reverse in some previous patch: https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01617.html I don't really care which one we settle on... -- Marc Glisse

Re: match.pd: ~X & Y to X ^ Y in some cases

2016-05-16 Thread Jeff Law
On 05/16/2016 04:31 PM, Marc Glisse wrote: On Mon, 16 May 2016, Jeff Law wrote: Please use if (GIMPLE && ((get_nonzero_bits ...) Rather than #if GIMPLE Richard asked for the reverse in some previous patch: https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01617.html I don't really care w

Re: match.pd: ~X & Y to X ^ Y in some cases

2016-05-17 Thread Richard Biener
On Fri, May 13, 2016 at 9:07 PM, Marc Glisse wrote: > Hello, > > maybe this would fit better in VRP, but it is easier (and not completely > useless) to put it in match.pd. > > Since the transformation is restricted to GIMPLE, I think I don't need to > check that @0 is SSA_NAME. I didn't test if @0

Re: match.pd: ~X & Y to X ^ Y in some cases

2021-06-02 Thread Andrew Pinski via Gcc-patches
On Fri, May 13, 2016 at 12:07 PM Marc Glisse wrote: > > Hello, > > maybe this would fit better in VRP, but it is easier (and not completely > useless) to put it in match.pd. > > Since the transformation is restricted to GIMPLE, I think I don't need to > check that @0 is SSA_NAME. I didn't test if