Re: [PATCH][GCC][middle-end] Fix logical shift truncation (PR91838)

2020-01-31 Thread Jakub Jelinek
On Fri, Jan 31, 2020 at 10:12:08AM +, Tamar Christina wrote: > 2020-01-31 Tamar Christina > > PR 91838 > * simplify-rtx.c (simplify_binary_operation_1): Update LSHIFTRT case > to truncate if allowed or reject combination. > > gcc/testsuite/ChangeLog: > > 2020-01-31 Tama

Re: [PATCH][GCC][middle-end] Fix logical shift truncation (PR91838)

2020-01-31 Thread Tamar Christina
Hi Segher, The 01/31/2020 12:13, Segher Boessenkool wrote: > Hi! > > On Fri, Jan 31, 2020 at 10:12:08AM +, Tamar Christina wrote: > > This fixes a fall-out from a patch I had submitted two years ago which > > started > > allowing simplify-rtx to fold logical right shifts by offsets a followe

Re: [PATCH][GCC][middle-end] Fix logical shift truncation (PR91838)

2020-01-31 Thread Segher Boessenkool
Hi! On Fri, Jan 31, 2020 at 10:12:08AM +, Tamar Christina wrote: > This fixes a fall-out from a patch I had submitted two years ago which started > allowing simplify-rtx to fold logical right shifts by offsets a followed by b > into >> (a + b). > > However this can generate inefficient code w

[PATCH][GCC][middle-end] Fix logical shift truncation (PR91838)

2020-01-31 Thread Tamar Christina
Hi All, This fixes a fall-out from a patch I had submitted two years ago which started allowing simplify-rtx to fold logical right shifts by offsets a followed by b into >> (a + b). However this can generate inefficient code when the resulting shift count ends up being the same as the size of the