Re: [PATCH v2] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Richard Biener
On May 7, 2020 4:34:59 PM GMT+02:00, Jakub Jelinek wrote: >On Thu, May 07, 2020 at 10:12:12AM +0200, Richard Biener wrote: >> I think unconditionally using (abs @0) is simplifying things enough >> (getting rid of one xor and one plus) to not worry about keeping >> the (x >> (prec - 1))? > >Ok. > >

[PATCH v2] match.pd: Canonicalize (X + (X >> (prec - 1))) ^ (X >> (prec - 1)) to abs (X) [PR94783]

2020-05-07 Thread Jakub Jelinek via Gcc-patches
On Thu, May 07, 2020 at 10:12:12AM +0200, Richard Biener wrote: > I think unconditionally using (abs @0) is simplifying things enough > (getting rid of one xor and one plus) to not worry about keeping > the (x >> (prec - 1))? Ok. > Do you really need the TYPE_OVERFLOW_UNDEFINED check? Probably n