------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-11-21 
09:07 -------
> IIRC note luids are supposed to be a superset of regular luids, so your check
> should be redundant (see regclass.c:reg_scan_mark_refs).  Now something could
> have invalidated this relationship.

It's this chunk of code in load_mems:

          set = gen_move_insn (reg, best);
          set = loop_insn_hoist (loop, set);
          if (REG_P (best))
            {
              for (p = prev_ebb_head; p != loop->start; p = NEXT_INSN (p))
                if (REGNO_LAST_UID (REGNO (best)) == INSN_UID (p))
                  {
                    REGNO_LAST_UID (REGNO (best)) = INSN_UID (set);
                    break;
                  }
            }

which changes REGNO_LAST_UID without updating REGNO_LAST_NOTE_UID for pseudo 78.
 Note that there is no note mentioning pseudo 78 so REGNO_LAST_NOTE_UID points
to garbage after it is executed.

We could probably update REGNO_LAST_NOTE_UID too here, but there might be other
places with the same problem so I think your proposed fix is the safest one. 
I'm going to test it on x86.


-- 


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

Reply via email to