Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2014-11-13 Thread Richard Biener
On Thu, Jun 20, 2013 at 2:52 PM, Jeff Law l...@redhat.com wrote: On 06/20/2013 04:49 AM, Andreas Schwab wrote: Jeff Law l...@redhat.com writes: +/* { dg-final { scan-tree-dump-times Replaced 8 forwprop1} } */ $ grep -c Replaced forwprop-28.c.022t.forwprop1 16 ;; Function test (test,

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-20 Thread Andreas Schwab
Jeff Law l...@redhat.com writes: +/* { dg-final { scan-tree-dump-times Replaced 8 forwprop1} } */ $ grep -c Replaced forwprop-28.c.022t.forwprop1 16 ;; Function test (test, funcdef_no=0, decl_uid=1388, symbol_order=0) Replaced 'rotate_7 == 0' with '_6 == 0' Replaced '_6 == 0' with

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-20 Thread Jeff Law
On 06/20/2013 04:49 AM, Andreas Schwab wrote: Jeff Law l...@redhat.com writes: +/* { dg-final { scan-tree-dump-times Replaced 8 forwprop1} } */ $ grep -c Replaced forwprop-28.c.022t.forwprop1 16 ;; Function test (test, funcdef_no=0, decl_uid=1388, symbol_order=0) Replaced 'rotate_7 ==

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Chung-Ju Wu
2013/6/19 Jeff Law l...@redhat.com: * gcc.dg/tree-ssa/forwprop-28.c: New test. In the gnu coding standard we have a space before the open-parentheses. Would that be great to have testcase follow this convention as well? :) If so, then... diff --git

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Jakub Jelinek
On Wed, Jun 19, 2013 at 03:02:38PM +0800, Chung-Ju Wu wrote: In the gnu coding standard we have a space before the open-parentheses. Would that be great to have testcase follow this convention as well? :) If so, then... Testcases generally don't need to follow the coding conventions, they

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Chung-Ju Wu
2013/6/19 Jakub Jelinek ja...@redhat.com: On Wed, Jun 19, 2013 at 03:02:38PM +0800, Chung-Ju Wu wrote: In the gnu coding standard we have a space before the open-parentheses. Would that be great to have testcase follow this convention as well? :) If so, then... Testcases generally don't

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Richard Biener
On Wed, Jun 19, 2013 at 6:08 AM, Jeff Law l...@redhat.com wrote: The notable changes since the last version: First, it should properly handle signed single bit types, though I haven't tested it with real code. Second, the transformation is only applied when the result is used in a

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Jeff Law
On 06/19/2013 01:02 AM, Chung-Ju Wu wrote: 2013/6/19 Jeff Law l...@redhat.com: * gcc.dg/tree-ssa/forwprop-28.c: New test. In the gnu coding standard we have a space before the open-parentheses. Would that be great to have testcase follow this convention as well? :) If so, then...

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Bernhard Reutner-Fischer
On 19 June 2013 15:57, Jeff Law l...@redhat.com wrote: On 06/19/2013 01:02 AM, Chung-Ju Wu wrote: 2013/6/19 Jeff Law l...@redhat.com: * gcc.dg/tree-ssa/forwprop-28.c: New test. In the gnu coding standard we have a space before the open-parentheses. Would that be great to have

Re: [PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-19 Thread Jeff Law
On 06/19/2013 10:02 AM, Bernhard Reutner-Fischer wrote: On 19 June 2013 15:57, Jeff Law l...@redhat.com wrote: On 06/19/2013 01:02 AM, Chung-Ju Wu wrote: 2013/6/19 Jeff Law l...@redhat.com: * gcc.dg/tree-ssa/forwprop-28.c: New test. In the gnu coding standard we have a space

[PATCH] Improve folding of bitwise ops feeding conditionals for single bit types

2013-06-18 Thread Jeff Law
The notable changes since the last version: First, it should properly handle signed single bit types, though I haven't tested it with real code. Second, the transformation is only applied when the result is used in a conditional. Thus it's much less likely to pessimize targets with