Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-26 Thread William J. Schmidt
On Sun, 2012-02-26 at 00:39 -0800, Andrew T Pinski wrote: > On Fri, 2012-02-24 at 15:41 -0600, William J. Schmidt wrote: > > On Fri, 2012-02-10 at 15:46 -0500, Michael Meissner wrote: > > > I was looking at the routelookup EEMBC benchmark and it has code of the > > > form: > > > > > >while (

Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-26 Thread Andrew T Pinski
On Fri, 2012-02-24 at 15:41 -0600, William J. Schmidt wrote: > On Fri, 2012-02-10 at 15:46 -0500, Michael Meissner wrote: > > I was looking at the routelookup EEMBC benchmark and it has code of the > > form: > > > >while ( this_node->cmpbit > next_node->cmpbit ) > > { > > this_node

Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-24 Thread William J. Schmidt
On Fri, 2012-02-10 at 15:46 -0500, Michael Meissner wrote: > I was looking at the routelookup EEMBC benchmark and it has code of the form: > >while ( this_node->cmpbit > next_node->cmpbit ) > { > this_node = next_node; > > if ( proute->dst_addr & (0x1 << this_node->cmpbit) ) >

Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-15 Thread William J. Schmidt
On Fri, 2012-02-10 at 13:02 -0800, Andrew Pinski wrote: > On Fri, Feb 10, 2012 at 12:46 PM, Michael Meissner > wrote: > > I was looking at the routelookup EEMBC benchmark and it has code of the > > form: > > > > while ( this_node->cmpbit > next_node->cmpbit ) > >{ > > this_node = next_

Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-13 Thread Joseph S. Myers
On Mon, 13 Feb 2012, Richard Guenther wrote: > Indeed. But note that the transform is not valid as *this_node may cross > a page boundary and thus either pointer load may trap if the other does not > (well, unless the C standard (and thus our middle-end) would require that > iff ptr->component do

Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-13 Thread Richard Guenther
On Fri, Feb 10, 2012 at 10:02 PM, Andrew Pinski wrote: > On Fri, Feb 10, 2012 at 12:46 PM, Michael Meissner > wrote: >> I was looking at the routelookup EEMBC benchmark and it has code of the form: >> >>   while ( this_node->cmpbit > next_node->cmpbit ) >>    { >>      this_node = next_node; >> >

Re: [PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-10 Thread Andrew Pinski
On Fri, Feb 10, 2012 at 12:46 PM, Michael Meissner wrote: > I was looking at the routelookup EEMBC benchmark and it has code of the form: > >   while ( this_node->cmpbit > next_node->cmpbit ) >    { >      this_node = next_node; > >      if ( proute->dst_addr & (0x1 << this_node->cmpbit) ) >      

[PATCH] [RFC, GCC 4.8] Optimize conditional moves from adjacent memory locations

2012-02-10 Thread Michael Meissner
I was looking at the routelookup EEMBC benchmark and it has code of the form: while ( this_node->cmpbit > next_node->cmpbit ) { this_node = next_node; if ( proute->dst_addr & (0x1 << this_node->cmpbit) ) next_node = this_node->rlink; else next_node = thi