This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Redundant instructions in loop optimization for x86-64?
> H. J. Lu wrote:
> >Is there a way to tell gcc that 32bit zero extension isn't needed for
> >x86-64?
>
> It isn't quite that simple. Sometimes they will be needed. Sometimes
> they won't.
>
> You might want to look at
> http://gcc.gnu.org/ml/gcc/2004-09/msg00377.html
> which is a proposal to add an RTL optimization pass to eliminate
> unnecessary sign/zero extension instructions on targets that support
> both 32-bit and 64-bit code.
Actually I think Zdenek's ivopts should care this case by promoting the
induction variable to 64bit. I already assigned the bugreport to him,
so lets see what happens son ;)
Without the actual promote, the zero extend is really needed and it is
almost impossible to elliminate it on RTL level since you need to watch
overflows.
Honza
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com