diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-02-24 13:12:11 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-02-24 13:12:11 -0800 |
commit | 83d90aac53a56896a82887b0119544ca9a33af03 (patch) | |
tree | 313cd48b30cf4ea85d71294eff6b1e313122dd88 /gcc | |
parent | 034dabc92e9c18e2c2eac71396ed3aea79a81df5 (diff) | |
download | gcc-83d90aac53a56896a82887b0119544ca9a33af03.zip gcc-83d90aac53a56896a82887b0119544ca9a33af03.tar.gz gcc-83d90aac53a56896a82887b0119544ca9a33af03.tar.bz2 |
(consec_sets_invariant_p): Correct REG_EQUAL note checks
to distinguish libcall case from ordinary insn case.
From-SVN: r3524
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/loop.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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; } |