This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: help with combine


On Tue, Nov 20, 2001 at 11:27:24AM -0800, Dale Johannesen wrote:
> int x,y,z,w,v;
> int xx ()
>    {
>      int t = -w;
>      x = v + t;
>      y = z + t;
> }
> 
> gcc3 generates code as written for this, a negate and two adds.  Better
> is to combine the adds and negate, and do two subtracts.

It's CSE that ought to tackle this, not combine.  Combine really
works best when the inputs die; otherwise it gives up early.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]