This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: new sign/zero extension elimination pass
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Tom de Vries <tom at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Bernd Schmidt <bernds at codesourcery dot com>
- Date: Mon, 8 Nov 2010 13:29:55 -0800
- Subject: Re: new sign/zero extension elimination pass
- References: <4CBC698B.3080204@codesourcery.com>
On Mon, Oct 18, 2010 at 8:36 AM, Tom de Vries <tom@codesourcery.com> wrote:
> I created a new sign/zero extension elimination pass.
>
> The motivating example for this pass is:
>
> Âvoid f(unsigned char *p, short s, int c, int *z)
> Â Â{
> Â Â Âif (c)
> Â Â Â Â*z = 0;
> Â Â Â*p ^= (unsigned char)s;
> Â Â}
>
> For MIPS, compilation results in the following insns.
One more thing about the above testcase. When I was working on
removing some more zero extensions, I noticed that
TARGET_PROMOTE_PROTOTYPES was being defined for MIPS. This macro was
just removed from SPARC for the same reason why I was looking into
those zero extensions. You might want to check the definition for
MIPS and refine it.
Thanks,
Andrew Pinski