(consec_sets_invariant_p): Correct REG_EQUAL note checks

to distinguish libcall case from ordinary insn case.

From-SVN: r3524
This commit is contained in:
Jim Wilson 1993-02-24 13:12:11 -08:00
parent 034dabc92e
commit 83d90aac53

View File

@ -2782,7 +2782,12 @@ consec_sets_invariant_p (reg, n_sets, insn)
value |= this;
else if (temp = find_reg_note (p, REG_EQUAL, NULL_RTX))
{
this = invariant_p (XEXP (temp, 0));
/* If this is a libcall, then any invariant REG_EQUAL note is OK.
If this is an ordinary insn, then only CONSTANT_P REG_EQUAL
notes are OK. */
this = (CONSTANT_P (XEXP (temp, 0))
|| (find_reg_note (p, REG_RETVAL, NULL_RTX)
&& invariant_p (XEXP (temp, 0))));
if (this != 0)
value |= this;
}