rtlanal.c (find_reg_equal_equiv_note): Do not find REG_EQ* notes on an insn with multiple sets...

* rtlanal.c (find_reg_equal_equiv_note): Do not find REG_EQ*
	notes on an insn with multiple sets, even if single_set returns
	non-NULL for that insn.

From-SVN: r122177
This commit is contained in:
Steven Bosscher 2007-02-20 22:11:52 +00:00
parent b241831b6d
commit ea8f106d4c
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2007-02-20 Steven Bosscher <steven@gcc.gnu.org>
* rtlanal.c (find_reg_equal_equiv_note): Do not find REG_EQ*
notes on an insn with multiple sets, even if single_set returns
non-NULL for that insn.
2007-02-20 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* fold-const.c (tree_expr_nonnegative_warnv_p): Handle scalb,

View File

@ -1676,11 +1676,18 @@ find_reg_equal_equiv_note (rtx insn)
if (!INSN_P (insn))
return 0;
for (link = REG_NOTES (insn); link; link = XEXP (link, 1))
if (REG_NOTE_KIND (link) == REG_EQUAL
|| REG_NOTE_KIND (link) == REG_EQUIV)
{
if (single_set (insn) == 0)
/* FIXME: We should never have REG_EQUAL/REG_EQUIV notes on
insns that have multiple sets. Checking single_set to
make sure of this is not the proper check, as explained
in the comment in set_unique_reg_note.
This should be changed into an assert. */
if (GET_CODE (PATTERN (insn)) == PARALLEL && multiple_sets (insn))
return 0;
return link;
}