Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-17 Thread Mikhail Maltsev
On 05/17/2016 06:09 PM, Richard Biener wrote: > > The patch is ok. > Committed as r236344. -- Regards, Mikhail Maltsev

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-17 Thread Richard Biener
On Tue, May 17, 2016 at 4:05 PM, Marc Glisse wrote: > On Tue, 17 May 2016, Richard Biener wrote: > >> On Fri, May 13, 2016 at 3:36 PM, Marc Glisse wrote: >>> >>> On Fri, 13 May 2016, Mikhail Maltsev wrote: >>> > I don't know if we might want some :c / single_use restrictions, maybe > on >

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-17 Thread Marc Glisse
On Tue, 17 May 2016, Richard Biener wrote: On Fri, May 13, 2016 at 3:36 PM, Marc Glisse wrote: On Fri, 13 May 2016, Mikhail Maltsev wrote: I don't know if we might want some :c / single_use restrictions, maybe on the outer convert and the rshift/rotate. I don't think :c can be used here.

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-17 Thread Mikhail Maltsev
On 05/17/2016 04:39 PM, Richard Biener wrote: > > Are you sure narrowing conversions are valid for rotates? > > (char)short_var < byte. > Yes, but the transformation leaves conversions as-is. Only bit_not is removed. -- Regards, Mikhail Maltsev

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-17 Thread Richard Biener
On Fri, May 13, 2016 at 3:36 PM, Marc Glisse wrote: > On Fri, 13 May 2016, Mikhail Maltsev wrote: > >>> I don't know if we might want some :c / single_use restrictions, maybe on >>> the >>> outer convert and the rshift/rotate. >>> >> I don't think :c can be used here. > > > Oups, typo for :s. > >>

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-13 Thread Marc Glisse
On Fri, 13 May 2016, Mikhail Maltsev wrote: I don't know if we might want some :c / single_use restrictions, maybe on the outer convert and the rshift/rotate. I don't think :c can be used here. Oups, typo for :s. As for :s, I added it, as you suggested. :s will be ignored when there is n

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-13 Thread Mikhail Maltsev
On 05/11/2016 10:52 AM, Marc Glisse wrote: > +/* ~((~X) >> Y) -> X >> Y (for arithmetic shift). */ > +(simplify > + (bit_not (convert? (rshift (bit_not @0) @1))) > + (if (!TYPE_UNSIGNED (TREE_TYPE (@0)) > + && TYPE_PRECISION (type) <= TYPE_PRECISION (TREE_TYPE (@0))) > + (convert (rshift

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-11 Thread Marc Glisse
On Tue, 10 May 2016, Mikhail Maltsev wrote: On 05/08/2016 10:57 PM, Marc Glisse wrote: On Sun, 8 May 2016, Mikhail Maltsev wrote: Hi! I decided to revive this patch: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00999.html. I addressed review comments about sign conversions. Bootstrapped and

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-10 Thread Mikhail Maltsev
On 05/08/2016 10:57 PM, Marc Glisse wrote: > On Sun, 8 May 2016, Mikhail Maltsev wrote: > >> Hi! >> >> I decided to revive this patch: >> https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00999.html. >> I addressed review comments about sign conversions. Bootstrapped and >> regtested >> on x86_64-lin

Re: [PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-08 Thread Marc Glisse
On Sun, 8 May 2016, Mikhail Maltsev wrote: Hi! I decided to revive this patch: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00999.html. I addressed review comments about sign conversions. Bootstrapped and regtested on x86_64-linux-gnu {,-m32}. OK for trunk? Hello, are you sure that your tra

[PATCH, GCC] PR middle-end/55299, fold bitnot through ASR and rotates

2016-05-08 Thread Mikhail Maltsev
Hi! I decided to revive this patch: https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00999.html. I addressed review comments about sign conversions. Bootstrapped and regtested on x86_64-linux-gnu {,-m32}. OK for trunk? -- Regards, Mikhail Maltsev gcc/testsuite/ChangeLog: 2016-05-08 Mikhail M