Re: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Koning, Paul via Gcc-patches
On May 25, 2022, at 10:39 AM, Roger Sayle mailto:ro...@nextmovesoftware.com>> wrote: On May 25, 2022, at 7:34 AM, Richard Biener via Gcc-patches mailto:patc...@gcc.gnu.org>> wrote: On Tue, May 24, 2022 at 3:55 PM Roger Sayle mailto:ro...@nextmovesoftware.com>> wrote: "For every pessimizati

RE: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Roger Sayle
> > On May 25, 2022, at 7:34 AM, Richard Biener via Gcc-patches patc...@gcc.gnu.org> wrote: > > > > On Tue, May 24, 2022 at 3:55 PM Roger Sayle > wrote: > >> > >> > >> "For every pessimization, there's an equal and opposite optimization". > >> > >> In the review of my original patch for PR midd

Re: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Koning, Paul via Gcc-patches
> On May 25, 2022, at 7:34 AM, Richard Biener via Gcc-patches > wrote: > > On Tue, May 24, 2022 at 3:55 PM Roger Sayle > wrote: >> >> >> "For every pessimization, there's an equal and opposite optimization". >> >> In the review of my original patch for PR middle-end/98865, Richard >> Bie

Re: [PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-25 Thread Richard Biener via Gcc-patches
On Tue, May 24, 2022 at 3:55 PM Roger Sayle wrote: > > > "For every pessimization, there's an equal and opposite optimization". > > In the review of my original patch for PR middle-end/98865, Richard > Biener pointed out that match.pd shouldn't be transforming X*Y into > X&-Y as the former is cons

[PATCH] Canonicalize X&-Y as X*Y in match.pd when Y is [0,1].

2022-05-24 Thread Roger Sayle
"For every pessimization, there's an equal and opposite optimization". In the review of my original patch for PR middle-end/98865, Richard Biener pointed out that match.pd shouldn't be transforming X*Y into X&-Y as the former is considered cheaper by tree-ssa's cost model (operator count). A cor