Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-21 Thread Richard Guenther
On Fri, May 20, 2011 at 9:21 PM, Kai Tietz wrote: > 2011/5/20 Richard Guenther : >> On Thu, May 19, 2011 at 7:52 PM, Kai Tietz wrote: >>> To illustrate in which scenario code in tree-ssa-forwprop doesn't help >>> is binop-tor4.c >>> >>> w/o this patch we get >>> >>> >>> foo (int a, int b, int c)

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-20 Thread Kai Tietz
2011/5/20 Richard Guenther : > On Thu, May 19, 2011 at 7:52 PM, Kai Tietz wrote: >> To illustrate in which scenario code in tree-ssa-forwprop doesn't help >> is binop-tor4.c >> >> w/o this patch we get >> >> >> foo (int a, int b, int c) >> { >>  int e; >>  int d; >>  int D.2701; >>  _Bool D.2700;

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-20 Thread Richard Guenther
On Thu, May 19, 2011 at 7:52 PM, Kai Tietz wrote: > To illustrate in which scenario code in tree-ssa-forwprop doesn't help > is binop-tor4.c > > w/o this patch we get > > > foo (int a, int b, int c) > { >  int e; >  int d; >  int D.2701; >  _Bool D.2700; >  _Bool D.2699; >  _Bool D.2698; >  _Bool

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Eric Botcazou : >> Bootstrapped and tested for x86_64-pc-linux-gnu for all standard >> languages plus ADA and Obj-C++. > > Ada, not ADA, this is the first name of the Countess of Lovelace: >  http://en.wikipedia.org/wiki/Ada_Lovelace Well, I glad to hear that isn't drived by Russian word

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Eric Botcazou
> Bootstrapped and tested for x86_64-pc-linux-gnu for all standard > languages plus ADA and Obj-C++. Ada, not ADA, this is the first name of the Countess of Lovelace: http://en.wikipedia.org/wiki/Ada_Lovelace -- Eric Botcazou

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
To illustrate in which scenario code in tree-ssa-forwprop doesn't help is binop-tor4.c w/o this patch we get foo (int a, int b, int c) { int e; int d; int D.2701; _Bool D.2700; _Bool D.2699; _Bool D.2698; _Bool D.2697; _Bool D.2696; int D.2695; : D.2695_3 = b_2(D) | a_1(D);

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 3:36 PM, Kai Tietz wrote: >> 2011/5/19 Richard Guenther : >>> On Thu, May 19, 2011 at 3:30 PM, Kai Tietz wrote: 2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 3:08 PM, Kai Tietz > wrote: >> 2011/5/19 Richard Guenthe

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Richard Guenther
On Thu, May 19, 2011 at 3:36 PM, Kai Tietz wrote: > 2011/5/19 Richard Guenther : >> On Thu, May 19, 2011 at 3:30 PM, Kai Tietz wrote: >>> 2011/5/19 Richard Guenther : On Thu, May 19, 2011 at 3:08 PM, Kai Tietz wrote: > 2011/5/19 Richard Guenther : >> On Thu, May 19, 2011 at 2:59 PM,

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 3:30 PM, Kai Tietz wrote: >> 2011/5/19 Richard Guenther : >>> On Thu, May 19, 2011 at 3:08 PM, Kai Tietz wrote: 2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 2:59 PM, Kai Tietz > wrote: >> 2011/5/19 Richard Guenthe

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Richard Guenther
On Thu, May 19, 2011 at 3:30 PM, Kai Tietz wrote: > 2011/5/19 Richard Guenther : >> On Thu, May 19, 2011 at 3:08 PM, Kai Tietz wrote: >>> 2011/5/19 Richard Guenther : On Thu, May 19, 2011 at 2:59 PM, Kai Tietz wrote: > 2011/5/19 Richard Guenther : >> On Thu, May 19, 2011 at 2:48 PM,

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 3:08 PM, Kai Tietz wrote: >> 2011/5/19 Richard Guenther : >>> On Thu, May 19, 2011 at 2:59 PM, Kai Tietz wrote: 2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 2:48 PM, Kai Tietz > wrote: >> Hello, >> >> This

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Richard Guenther
On Thu, May 19, 2011 at 3:08 PM, Kai Tietz wrote: > 2011/5/19 Richard Guenther : >> On Thu, May 19, 2011 at 2:59 PM, Kai Tietz wrote: >>> 2011/5/19 Richard Guenther : On Thu, May 19, 2011 at 2:48 PM, Kai Tietz wrote: > Hello, > > This patch improves reassociation folding for com

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 2:59 PM, Kai Tietz wrote: >> 2011/5/19 Richard Guenther : >>> On Thu, May 19, 2011 at 2:48 PM, Kai Tietz wrote: Hello, This patch improves reassociation folding for comparision. It expands expressions within binary-AND/OR

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Richard Guenther
On Thu, May 19, 2011 at 2:59 PM, Kai Tietz wrote: > 2011/5/19 Richard Guenther : >> On Thu, May 19, 2011 at 2:48 PM, Kai Tietz wrote: >>> Hello, >>> >>> This patch improves reassociation folding for comparision. It expands >>> expressions within binary-AND/OR expression like (X | Y) == 0 to (X ==

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Richard Guenther
On Thu, May 19, 2011 at 2:56 PM, Richard Guenther wrote: > On Thu, May 19, 2011 at 2:48 PM, Kai Tietz wrote: >> Hello, >> >> This patch improves reassociation folding for comparision. It expands >> expressions within binary-AND/OR expression like (X | Y) == 0 to (X == >> 0 && Y == 0) >> and (X |

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Richard Guenther : > On Thu, May 19, 2011 at 2:48 PM, Kai Tietz wrote: >> Hello, >> >> This patch improves reassociation folding for comparision. It expands >> expressions within binary-AND/OR expression like (X | Y) == 0 to (X == >> 0 && Y == 0) >> and (X | Y) != 0 to (X != 0 || Y != 0)

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Richard Guenther
On Thu, May 19, 2011 at 2:48 PM, Kai Tietz wrote: > Hello, > > This patch improves reassociation folding for comparision. It expands > expressions within binary-AND/OR expression like (X | Y) == 0 to (X == > 0 && Y == 0) > and (X | Y) != 0 to (X != 0 || Y != 0).  This is necessary to allow > bette

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
2011/5/19 Jakub Jelinek : > On Thu, May 19, 2011 at 02:48:08PM +0200, Kai Tietz wrote: >> ChangeLog >> >>       * gcc.dg/binop-tand1.c >>       * gcc.dg/binop-tand2.c >>       * gcc.dg/binop-tand3.c >>       * gcc.dg/binop-tand4.c >>       * gcc.dg/binop-tor1.c >>       * gcc.dg/binop-tor2.c >>    

Re: [patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Jakub Jelinek
On Thu, May 19, 2011 at 02:48:08PM +0200, Kai Tietz wrote: > ChangeLog > > * gcc.dg/binop-tand1.c > * gcc.dg/binop-tand2.c > * gcc.dg/binop-tand3.c > * gcc.dg/binop-tand4.c > * gcc.dg/binop-tor1.c > * gcc.dg/binop-tor2.c > * gcc.dg/binop-tor3.c > * g

[patch tree-ssa-reassoc.c]: Better reassoication for comparision and boolean-logic

2011-05-19 Thread Kai Tietz
Hello, This patch improves reassociation folding for comparision. It expands expressions within binary-AND/OR expression like (X | Y) == 0 to (X == 0 && Y == 0) and (X | Y) != 0 to (X != 0 || Y != 0). This is necessary to allow better reassociation on weak pre-folded logical expressions. This un