{PING] [PATCH] Sign extension elimination

H. J. Lu hjl@lucon.org
Thu Apr 20 17:49:00 GMT 2006


On Thu, Apr 20, 2006 at 09:37:52PM +0200, Steven Bosscher wrote:
> On Thursday 20 April 2006 16:48, H. J. Lu wrote:
> > Yes, we will add:
> (...)
> > +/* Similar to sign-extension, but it is a dummy nop.  */
> > +DEF_RTL_EXPR(PSEUDO_SIGN_EXTEND, "pseudo_sign_extend", "e", RTX_UNARY)
> > +
> > +/* Similar to zero-extension, but it is a dummy nop.  */
> > +DEF_RTL_EXPR(PSEUDO_ZERO_EXTEND, "pseudo_zero_extend", "e", RTX_UNARY)
> > +
> 
> Why not add sing_extends to the define_insns where appropriate,
> and make the extension explicit?  Is that wrong somehow for the
> insns that you would need this (IMHO rather ugly) new construct
> in RTL?

We want the implicit extension only when we need to access an SImode
register in DImode. Otherwise, we may generate 64bit register
instructions when only 32bit register instructions are needed, which
will make the resulting code bigger and slower.


H.J.



More information about the Gcc-patches mailing list