This is the mail archive of the gcc-patches@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: {PING] [PATCH] Sign extension elimination


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.


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