* regrename.c (regrename_do_replace): Do not validate changes to debug insns. Index: gcc/regrename.c =================================================================== --- gcc/regrename.c (revision 229049) +++ gcc/regrename.c (working copy) @@ -946,10 +951,7 @@ regrename_do_replace (struct du_head *he struct reg_attrs *attr = REG_ATTRS (*chain->loc); int reg_ptr = REG_POINTER (*chain->loc); - if (DEBUG_INSN_P (chain->insn) && REGNO (*chain->loc) != base_regno) - validate_change (chain->insn, &(INSN_VAR_LOCATION_LOC (chain->insn)), - gen_rtx_UNKNOWN_VAR_LOC (), true); - else + if (!DEBUG_INSN_P (chain->insn)) { validate_change (chain->insn, chain->loc, gen_raw_REG (GET_MODE (*chain->loc), reg), true); @@ -963,6 +965,16 @@ regrename_do_replace (struct du_head *he if (!apply_change_group ()) return false; + for (chain = head->first; chain; chain = chain->next_use) + if (DEBUG_INSN_P (chain->insn)) + { + if (REGNO (*chain->loc) != base_regno) + INSN_VAR_LOCATION_LOC (chain->insn) = gen_rtx_UNKNOWN_VAR_LOC (); + else + *chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg); + df_insn_rescan (chain->insn); + } + mode = GET_MODE (*head->first->loc); head->regno = reg; head->nregs = hard_regno_nregs[reg][mode];