Re: [PATCH] Fold sign of LSHIFT_EXPR to eliminate no-op conversions.

2021-08-23 Thread Andrew Pinski via Gcc-patches
On Mon, Aug 23, 2021 at 1:09 PM Jakub Jelinek via Gcc-patches wrote: > > On Mon, Aug 23, 2021 at 01:25:13AM +0100, Roger Sayle wrote: > > This patch has been tested on x86_64-pc-linux-gnu with "make bootstrap" > > and "make -k check" with no new failures. Ok for mainline? > > > > > > 2021-08-23

Re: [PATCH] Fold sign of LSHIFT_EXPR to eliminate no-op conversions.

2021-08-23 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 23, 2021 at 01:25:13AM +0100, Roger Sayle wrote: > This patch has been tested on x86_64-pc-linux-gnu with "make bootstrap" > and "make -k check" with no new failures. Ok for mainline? > > > 2021-08-23 Roger Sayle > > gcc/ChangeLog > * match.pd (shift transformations): Chang

Re: [PATCH] Fold sign of LSHIFT_EXPR to eliminate no-op conversions.

2021-08-22 Thread Jeff Law via Gcc-patches
On 8/22/2021 6:25 PM, Roger Sayle wrote: This short patch teaches fold that it is "safe" to change the sign of a left shift, to reduce the number of type conversions in gimple. As an example: unsigned int foo(unsigned int i) { return (int)i << 8; } is currently optimized to: unsigned int