This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: help with combine
- From: Richard Henderson <rth at redhat dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 20 Nov 2001 14:13:16 -0800
- Subject: Re: help with combine
- References: <9FEA3500-DDEC-11D5-82BD-003065C86F94@apple.com>
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~