This is the mail archive of the gcc@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: Bogus REG_EQUIV note generation [was RE: Deep CSE bug!]


On Mon, 21 Jun 2004, Dave Korn wrote:
> -	3208	  last_insn = emit_move_insn_1 (x, y);
>  	3209
> -	3210	  if (y_cst && GET_CODE (x) == REG)
> -	3211	    set_unique_reg_note (last_insn, REG_EQUAL, y_cst);
>  	3212
> -	3213	  return last_insn;

I agree with your analysis.  The quick-and-dirty work-around would be
to add something like:

	if (y_cst && GET_CODE (x) == REG)
	  {
	    rtx set = single_set (last_insn);
	    if (set != NULL_RTX && SET_DEST (set) == x)
	      set_unique_reg_note (last_insn, REG_EQUAL, y_cst);
	  }


However, I much prefer your proposal to pass y_cst to emit_move_insn_1,
and add the appropriate decomposed REQ_EQUAL notes there.

Roger
--


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