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: new sign/zero extension elimination pass


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


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