[Bug rtl-optimization/56957] [4.9 regression] ICE in add_insn_after, at emit-rtl.c:3783

abel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 25 10:03:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56957

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29886|0                           |1
        is obsolete|                            |

--- Comment #9 from Andrey Belevantsev <abel at gcc dot gnu.org> 2013-04-25 10:03:38 UTC ---
Created attachment 29937
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29937
new patch

Actually, on more thought I couldn't recall why did we need all the
insn_emitted and EXPR_WAS_CHANGED stuff (that was 5 years ago).  The code
should decide whether do we need to move the scheduling insn from below and
leave the same UID or we need to emit the new insn with the new UID.  The
current code says that the insn needs to have the same UID as the above
resulting expression, we shouldn't create any extra stuff (renaming copies,
speculative checks) at the place of the original insn, and the insn itself
should not be changed while it was being propagated up to the place of
scheduling.  However, for the last two cases (new insns created, scheduling
insn changed) the UIDs will not match, as the insn pattern would be changed
while moving up, so their check doesn't add anything new to the UID check.  And
indeed, the attached patch that only checks for UIDs passes all the tests for
me.

I will discuss this more with Alexander and will commit after additional
testing on x86_64 as appropriate.



More information about the Gcc-bugs mailing list