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]

Re: 2.95, x86: severe performance problems with short arithmetic


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~

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