On Thu, 2020-05-07 at 10:12 +0200, Richard Biener wrote:
> On Thu, 7 May 2020, Jakub Jelinek wrote:
>
> > Hi!
> >
> > The following patch canonicalizes M = X >> (prec - 1); (X + M) ^ M
> > for signed integral types into ABS_EXPR (X). For X == min it is already
> > UB because M is -1 and min + -1
On Thu, 7 May 2020, Jakub Jelinek wrote:
> Hi!
>
> The following patch canonicalizes M = X >> (prec - 1); (X + M) ^ M
> for signed integral types into ABS_EXPR (X). For X == min it is already
> UB because M is -1 and min + -1 is UB, so we can use ABS_EXPR rather than
> say ABSU_EXPR + cast.
>
>
Hi!
The following patch canonicalizes M = X >> (prec - 1); (X + M) ^ M
for signed integral types into ABS_EXPR (X). For X == min it is already
UB because M is -1 and min + -1 is UB, so we can use ABS_EXPR rather than
say ABSU_EXPR + cast.
The backend might then emit the abs code back using the s