diff options
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index fd4294bdd63..f6e1dbc4686 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3894,14 +3894,15 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx i0, int *new_direct_jump_p, PATTERN (undobuf.other_insn) = other_pat; - /* If any of the notes in OTHER_INSN were REG_UNUSED, ensure that they - are still valid. Then add any non-duplicate notes added by - recog_for_combine. */ + /* If any of the notes in OTHER_INSN were REG_DEAD or REG_UNUSED, + ensure that they are still valid. Then add any non-duplicate + notes added by recog_for_combine. */ for (note = REG_NOTES (undobuf.other_insn); note; note = next) { next = XEXP (note, 1); - if (REG_NOTE_KIND (note) == REG_UNUSED + if ((REG_NOTE_KIND (note) == REG_DEAD + || REG_NOTE_KIND (note) == REG_UNUSED) && ! reg_set_p (XEXP (note, 0), PATTERN (undobuf.other_insn))) remove_note (undobuf.other_insn, note); } |