Commit 26132f71 by Jim Wilson Committed by Jim Wilson

Fix cse bug that broke the ia64 port.

	* cse.c (cse_insn): Revert Oct 31 change.  When computing src_elt,
	if REG_RETVAL check succeeds, then put classp in src_elt.

From-SVN: r30406
parent 9399d5c6
Thu Nov 4 23:07:14 1999 Jim Wilson <wilson@cygnus.com>
* cse.c (cse_insn): Revert Oct 31 change. When computing src_elt,
if REG_RETVAL check succeeds, then put classp in src_elt.
Thu Nov 4 23:48:14 1999 Jeffrey A Law (law@cygnus.com) Thu Nov 4 23:48:14 1999 Jeffrey A Law (law@cygnus.com)
* function.c (pad_to_arg_alignment): Only update argument_pad * function.c (pad_to_arg_alignment): Only update argument_pad
......
...@@ -5730,9 +5730,8 @@ cse_insn (insn, libcall_insn) ...@@ -5730,9 +5730,8 @@ cse_insn (insn, libcall_insn)
does not yet have an elt, and if so set the elt of the set source does not yet have an elt, and if so set the elt of the set source
to src_eqv_elt. */ to src_eqv_elt. */
for (i = 0; i < n_sets; i++) for (i = 0; i < n_sets; i++)
if (n_sets == 1 if (sets[i].rtl && sets[i].src_elt == 0
|| (sets[i].rtl && sets[i].src_elt == 0 && rtx_equal_p (SET_SRC (sets[i].rtl), src_eqv))
&& rtx_equal_p (SET_SRC (sets[i].rtl), src_eqv)))
sets[i].src_elt = src_eqv_elt; sets[i].src_elt = src_eqv_elt;
} }
...@@ -5760,29 +5759,33 @@ cse_insn (insn, libcall_insn) ...@@ -5760,29 +5759,33 @@ cse_insn (insn, libcall_insn)
enum machine_mode mode enum machine_mode mode
= GET_MODE (src) == VOIDmode ? GET_MODE (dest) : GET_MODE (src); = GET_MODE (src) == VOIDmode ? GET_MODE (dest) : GET_MODE (src);
/* Don't put a hard register source into the table if this is if (sets[i].src_elt == 0)
the last insn of a libcall. */
if (sets[i].src_elt == 0
&& (GET_CODE (src) != REG
|| REGNO (src) >= FIRST_PSEUDO_REGISTER
|| ! find_reg_note (insn, REG_RETVAL, NULL_RTX)))
{ {
register struct table_elt *elt; /* Don't put a hard register source into the table if this is
the last insn of a libcall. In this case, we only need
/* Note that these insert_regs calls cannot remove to put src_eqv_elt in src_elt. */
any of the src_elt's, because they would have failed to if (GET_CODE (src) != REG
match if not still valid. */ || REGNO (src) >= FIRST_PSEUDO_REGISTER
if (insert_regs (src, classp, 0)) || ! find_reg_note (insn, REG_RETVAL, NULL_RTX))
{ {
rehash_using_reg (src); register struct table_elt *elt;
sets[i].src_hash = HASH (src, mode);
/* Note that these insert_regs calls cannot remove
any of the src_elt's, because they would have failed to
match if not still valid. */
if (insert_regs (src, classp, 0))
{
rehash_using_reg (src);
sets[i].src_hash = HASH (src, mode);
}
elt = insert (src, classp, sets[i].src_hash, mode);
elt->in_memory = sets[i].src_in_memory;
elt->in_struct = sets[i].src_in_struct;
sets[i].src_elt = classp = elt;
} }
elt = insert (src, classp, sets[i].src_hash, mode); else
elt->in_memory = sets[i].src_in_memory; sets[i].src_elt = classp;
elt->in_struct = sets[i].src_in_struct;
sets[i].src_elt = classp = elt;
} }
if (sets[i].src_const && sets[i].src_const_elt == 0 if (sets[i].src_const && sets[i].src_const_elt == 0
&& src != sets[i].src_const && src != sets[i].src_const
&& ! rtx_equal_p (sets[i].src_const, src)) && ! rtx_equal_p (sets[i].src_const, src))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment