[Bug rtl-optimization/34302] [4.3 regression] Invalid code reordering

Kenneth Zadeck zadeck@naturalbridge.com
Mon Dec 10 20:46:00 GMT 2007


This patch fixes where the move insn is inserted on pre increments.  it
had been inserted before the auto inc but this is not correct.  it needs
to replace the existing add to properly handle the case where the
operands of the add change between the add and the load.

Tested on ppc-32.  The patch will only effect architectures with pre
increment.

Ok for commit?

Jakub, note that i changed the name of your testcase from 20071012-1.c
to 20071210-1.c.
I believe that this is the correct.

Kenny


2007-12-10  Kenneth Zadeck <zadeck@naturalbridge.com>

    PR rtl-optimization/34302
    * auto-inc-dec.c (attempt_change): Change place where move is
    inserted.

2007-12-10  Jakub Jelinek  <jakub@redhat.com>

    PR rtl-optimization/34302
    * gcc.c-torture/execute/20071210-1.c: New test.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoincdec2.diff
Type: text/x-patch
Size: 2351 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071210/34ba4c9b/attachment.bin>


More information about the Gcc-patches mailing list