From: Jim Wilson Date: Wed, 24 Feb 1993 21:12:11 +0000 (-0800) Subject: (consec_sets_invariant_p): Correct REG_EQUAL note checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=83d90aac53a56896a82887b0119544ca9a33af03;p=gcc.git (consec_sets_invariant_p): Correct REG_EQUAL note checks to distinguish libcall case from ordinary insn case. From-SVN: r3524 --- diff --git a/gcc/loop.c b/gcc/loop.c index 03458ee5959..d1187680644 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -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; }