PTR-PLUS merge into the mainline

Roman Zippel zippel@linux-m68k.org
Thu Jul 5 22:22:00 GMT 2007


Hi,

On Thu, 5 Jul 2007, Richard Guenther wrote:

> For me both canonicalizations generate
> 
>         movl    8(%ecx,%edx,4), %eax
>         addl    4(%ecx,%edx,4), %eax

Hmm, there seem to be other problems in this area as well.
Either add a "p[i + 3]" to it to fool combine or try this:

int g(void);
void foo(int *p, unsigned int i)
{
        p[i + 1] = g();
        p[i + 2] = g();
}

bye, Roman



More information about the Gcc mailing list