Re: [PATCH] MATCH: Improve zero_one_valued_p for cases without range information

2023-09-15 Thread Andrew Pinski via Gcc-patches
On Thu, Sep 14, 2023 at 11:28 PM Richard Biener via Gcc-patches wrote: > > On Fri, Sep 15, 2023 at 3:09 AM Andrew Pinski via Gcc-patches > wrote: > > > > I noticed we sometimes lose range information in forwprop due to a few > > match and simplify patterns optimizing away casts. So the easier

Re: [PATCH] MATCH: Improve zero_one_valued_p for cases without range information

2023-09-15 Thread Richard Biener via Gcc-patches
On Fri, Sep 15, 2023 at 3:09 AM Andrew Pinski via Gcc-patches wrote: > > I noticed we sometimes lose range information in forwprop due to a few > match and simplify patterns optimizing away casts. So the easier way > to these cases is to add a match for zero_one_valued_p wich mathes > a cast from

[PATCH] MATCH: Improve zero_one_valued_p for cases without range information

2023-09-14 Thread Andrew Pinski via Gcc-patches
I noticed we sometimes lose range information in forwprop due to a few match and simplify patterns optimizing away casts. So the easier way to these cases is to add a match for zero_one_valued_p wich mathes a cast from another zero_one_valued_p. This also adds the case of `x & zero_one_valued_p`