Re: [PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-30 Thread Jeff Law
On 03/29/2016 12:03 PM, Jakub Jelinek wrote: On Tue, Mar 29, 2016 at 11:47:57AM -0600, Jeff Law wrote: 2016-03-29 Jakub Jelinek PR rtl-optimization/70429 * combine.c (simplify_shift_const_1): For ASHIFTRT don't optimize (cst1 >> count) >> cst2 into (cst1 >> cst2) >> c

Re: [PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-29 Thread Segher Boessenkool
On Tue, Mar 29, 2016 at 07:21:29PM +0200, Jakub Jelinek wrote: > This is a case similar to the LSHIFTRT I've fixed recently. > But, unlike LSHIFTRT, which can be handled by masking at the outer level, > ASHIFTRT would need outer sign extension, so most of the time 2 outer > operations in addition t

Re: [PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-29 Thread Jakub Jelinek
On Tue, Mar 29, 2016 at 11:47:57AM -0600, Jeff Law wrote: > >>>2016-03-29 Jakub Jelinek > >>> > >>> PR rtl-optimization/70429 > >>> * combine.c (simplify_shift_const_1): For ASHIFTRT don't optimize > >>> (cst1 >> count) >> cst2 into (cst1 >> cst2) >> count if > >>> mode != result_mode. >

Re: [PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-29 Thread Jeff Law
On 03/29/2016 11:43 AM, Jakub Jelinek wrote: On Tue, Mar 29, 2016 at 11:34:29AM -0600, Jeff Law wrote: This is a case similar to the LSHIFTRT I've fixed recently. But, unlike LSHIFTRT, which can be handled by masking at the outer level, ASHIFTRT would need outer sign extension, so most of the ti

Re: [PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-29 Thread Jakub Jelinek
On Tue, Mar 29, 2016 at 11:34:29AM -0600, Jeff Law wrote: > >This is a case similar to the LSHIFTRT I've fixed recently. > >But, unlike LSHIFTRT, which can be handled by masking at the outer level, > >ASHIFTRT would need outer sign extension, so most of the time 2 outer > >operations in addition to

Re: [PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-29 Thread Jeff Law
On 03/29/2016 11:21 AM, Jakub Jelinek wrote: Hi! This is a case similar to the LSHIFTRT I've fixed recently. But, unlike LSHIFTRT, which can be handled by masking at the outer level, ASHIFTRT would need outer sign extension, so most of the time 2 outer operations in addition to the kept two inne

[PATCH] Fix simplify_shift_const_1 once more (PR rtl-optimization/70429)

2016-03-29 Thread Jakub Jelinek
Hi! This is a case similar to the LSHIFTRT I've fixed recently. But, unlike LSHIFTRT, which can be handled by masking at the outer level, ASHIFTRT would need outer sign extension, so most of the time 2 outer operations in addition to the kept two inner shifts, which is IMHO very unlikely to ever b