This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: {PING] [PATCH] Sign extension elimination
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Leehod Baruch <leehod dot baruch at weizmann dot ac dot il>, Toon Moene <toon at moene dot indiv dot nluug dot nl>, Daniel Berlin <dberlin at dberlin dot org>, Mircea Namolaru <namolaru at il dot ibm dot com>, leehod at gmail dot com, mark at codesourcery dot com, Roger Sayle <roger at eyesopen dot com>
- Date: Thu, 20 Apr 2006 10:49:07 -0700
- Subject: Re: {PING] [PATCH] Sign extension elimination
- References: <1478.84.108.234.162.1145542762.squirrel@84.108.234.162> <20060420144806.GA4514@lucon.org> <200604202137.52328.steven@gcc.gnu.org>
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.