This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 2.95, x86: severe performance problems with short arithmetic
- To: Zack Weinberg <zack@bitmover.com>
- Subject: Re: 2.95, x86: severe performance problems with short arithmetic
- From: Richard Henderson <rth@cygnus.com>
- Date: Wed, 11 Aug 1999 21:49:04 -0700
- Cc: law@cygnus.com, John Wehle <john@feith.com>, gcc@gcc.gnu.org
- References: <law@cygnus.com> <199908111829.LAA04319@zack.bitmover.com>
On Wed, Aug 11, 1999 at 11:29:24AM -0700, Zack Weinberg wrote:
> At RTL generation time, pretend that there are no HImode operations
> other than load/store.
This loses. I'm not sure of The Cause, if in fact there is a single
cause, but the overall effect was clear.
You can easily test this out for yourself by defining PROMOTE_MODE.
> For example, we'd produce
>
> (set (reg:SI 21) (extend:SI (mem:HI address)))
> (set (reg:SI 22) (add (reg:SI 21) (const_int 1)))
> (set (mem:HI address) (subreg:HI (reg:SI 22) 0))
>
> for an increment of a HImode memory location.
As opposed to `incw (%eax)'? Unfriendly.
> After reload, we decide how to generate the load-and-extends based
> on processor type (xor/movw versus movzwl, etc.)
Yes. You can also find places where an extra xor would be helpful
to prevent stalls between unrelated uses of a register.
r~