Re: [PATCH] Improve CSE (PR rtl-optimization/70467)

2016-04-01 Thread Bernd Schmidt
On 04/01/2016 04:51 PM, Jakub Jelinek wrote: On Fri, Apr 01, 2016 at 03:35:19PM +0200, Bernd Schmidt wrote: On 04/01/2016 03:14 PM, Jakub Jelinek wrote: As the testcase below shows, we can end up with lots of useless instructions from multi-word arithmetics. simplify-rtx.c can optimize x

Re: [PATCH] Improve CSE (PR rtl-optimization/70467)

2016-04-01 Thread Jakub Jelinek
On Fri, Apr 01, 2016 at 03:35:19PM +0200, Bernd Schmidt wrote: > On 04/01/2016 03:14 PM, Jakub Jelinek wrote: > >As the testcase below shows, we can end up with lots of useless > >instructions from multi-word arithmetics. > >simplify-rtx.c can optimize x {&,|,^}= {0,-1}, but while > >x &= 0 or x

Re: [PATCH] Improve CSE (PR rtl-optimization/70467)

2016-04-01 Thread Bernd Schmidt
On 04/01/2016 03:14 PM, Jakub Jelinek wrote: As the testcase below shows, we can end up with lots of useless instructions from multi-word arithmetics. simplify-rtx.c can optimize x {&,|,^}= {0,-1}, but while x &= 0 or x {|,^}= -1 are optimized into constants and CSE can handle those fine, we

[PATCH] Improve CSE (PR rtl-optimization/70467)

2016-04-01 Thread Jakub Jelinek
Hi! As the testcase below shows, we can end up with lots of useless instructions from multi-word arithmetics. simplify-rtx.c can optimize x {&,|,^}= {0,-1}, but while x &= 0 or x {|,^}= -1 are optimized into constants and CSE can handle those fine, we keep x &= -1 and x {|,^}= 0 in the IL until