diff options
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r-- | gcc/regrename.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c index 663935b7ec1..669a6ead705 100644 --- a/gcc/regrename.c +++ b/gcc/regrename.c @@ -348,11 +348,17 @@ check_new_reg_p (int reg ATTRIBUTE_UNUSED, int new_reg, /* See whether it accepts all modes that occur in definition and uses. */ for (tmp = this_head->first; tmp; tmp = tmp->next_use) - if ((!targetm.hard_regno_mode_ok (new_reg, GET_MODE (*tmp->loc)) - && ! DEBUG_INSN_P (tmp->insn)) - || call_clobbered_in_chain_p (this_head, GET_MODE (*tmp->loc), - new_reg)) - return false; + { + /* Completely ignore DEBUG_INSNs, otherwise we can get + -fcompare-debug failures. */ + if (DEBUG_INSN_P (tmp->insn)) + continue; + + if (!targetm.hard_regno_mode_ok (new_reg, GET_MODE (*tmp->loc)) + || call_clobbered_in_chain_p (this_head, GET_MODE (*tmp->loc), + new_reg)) + return false; + } return true; } |