This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix PR rtl-optimization/60116
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Eric Botcazou <ebotcazou at adacore dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Feb 2014 09:58:42 +0100
- Subject: Re: Fix PR rtl-optimization/60116
- Authentication-results: sourceware.org; auth=none
- References: <2585649 dot S67QkVIkMN at polaris>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Feb 12, 2014 at 09:51:44AM +0100, Eric Botcazou wrote:
> --- combine.c (revision 207685)
> +++ combine.c (working copy)
> @@ -3894,14 +3894,15 @@ try_combine (rtx i3, rtx i2, rtx i1, rtx
>
> 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);
Thanks, just wonder if reg_set_p is the right predicate for the REG_DEAD
notes, don't we want to check if the register in REG_DEAD note isn't used
in undobuf.other_insn rather than set?
Jakub