[Bug rtl-optimization/17482] [4.0 Regression] GCSE after reload replacing changing instructions

Graham Stott graham.stott@btinternet.com
Wed Sep 15 19:00:00 GMT 2004


Steven,

One thing that stands out from looking at the code is the routines

record_last_set_info and mark_set don't appear to be taking any note
of any REG_INC notes that may be present within the MEM's

Should the existing code:

  if (REG_P (dest))
    record_last_reg_set_info (insn, REGNO (dest));
  else if (MEM_P (dest))
    record_last_mem_set_info (insn);

contain this following check for registers  mentioned in REG_INC notes?

  note = find_reg_note (insn, REG_INC, NULL_RTX);
  if (note)
    record_last_reg_set_info (insn, REGNO (XEXP (note, 0)));

Graham



More information about the Gcc-bugs mailing list