------- Comment #7 from amodra at bigpond dot net dot au  2005-11-08 23:19 
-------
I snipped too much of the dumps.  The problem is that after reg 137 dies in
insn 118, it is set, and dies again before insn 123.  When combine tries to
find a place for the death note on insn 118, it can't put it on the new
(deleted) insn 118, nor on the new insn 123 (because reg 137 isn't used there).
 Instead, combine searches back *from insn 123* looking for a suitable place. 
It finds the other insn where reg 137 dies, and decides nothing more need be
done.  Testing the following:

        PR rtl-optimization/22002
        * combine.c (distribute_notes): Search back for a suitable place
        for a death note from "from_insn", not "i3".

Index: gcc/combine.c
===================================================================
--- gcc/combine.c       (revision 106635)
+++ gcc/combine.c       (working copy)
@@ -12106,7 +12106,9 @@ distribute_notes (rtx notes, rtx from_in
            {
              basic_block bb = this_basic_block;

-             for (tem = PREV_INSN (i3); place == 0; tem = PREV_INSN (tem))
+             for (tem = PREV_INSN (from_insn);
+                  place == 0;
+                  tem = PREV_INSN (tem))
                {
                  if (! INSN_P (tem))
                    {


-- 

amodra at bigpond dot net dot au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |amodra at bigpond dot net
                   |dot org                     |dot au
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-06-10 14:14:42         |2005-11-08 23:19:44
               date|                            |


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

Reply via email to