This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix PR rtl-optimization/60116


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]