diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-12 08:49:55 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-02-12 08:49:55 +0000 |
commit | b74177237684bc892ed27e50f5d6f2ddc6f7a0c2 (patch) | |
tree | 978e4087ca2bdbd4afd96388ab25a7caa8853cda /gcc/combine.c | |
parent | de7822787195e4b0af134a143fe6705a5c9a7772 (diff) | |
download | gcc-b74177237684bc892ed27e50f5d6f2ddc6f7a0c2.tar.gz |
PR rtl-optimization/60116
* combine.c (try_combine): Also remove dangling REG_DEAD notes on the
other_insn once the combination has been validated.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207713 138bc75d-0d04-0410-961f-82ee72b054a4
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); } |