aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1993-02-24 13:12:11 -0800
committerJim Wilson <wilson@gcc.gnu.org>1993-02-24 13:12:11 -0800
commit83d90aac53a56896a82887b0119544ca9a33af03 (patch)
tree313cd48b30cf4ea85d71294eff6b1e313122dd88 /gcc
parent034dabc92e9c18e2c2eac71396ed3aea79a81df5 (diff)
downloadgcc-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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 03458ee..d118768 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;
}