Re: [PATCH] Constant fold SS_NEG and SS_ABS in simplify-rtx.c

2021-10-17 Thread Jeff Law via Gcc-patches
On 10/17/2021 3:12 AM, Roger Sayle wrote: This simple patch performs compile-time constant folding of signed saturating negation and signed saturating absolute value in the RTL optimizers. Normally in two's complement arithmetic the lowest representable signed value overflows on negation, wit

[PATCH] Constant fold SS_NEG and SS_ABS in simplify-rtx.c

2021-10-17 Thread Roger Sayle
This simple patch performs compile-time constant folding of signed saturating negation and signed saturating absolute value in the RTL optimizers. Normally in two's complement arithmetic the lowest representable signed value overflows on negation, with these saturating operators they "saturate" t