projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
034dabc
)
(consec_sets_invariant_p): Correct REG_EQUAL note checks
author
Jim Wilson
<wilson@gcc.gnu.org>
Wed, 24 Feb 1993 21:12:11 +0000
(13:12 -0800)
committer
Jim Wilson
<wilson@gcc.gnu.org>
Wed, 24 Feb 1993 21:12:11 +0000
(13:12 -0800)
to distinguish libcall case from ordinary insn case.
From-SVN: r3524
gcc/loop.c
patch
|
blob
|
history
diff --git
a/gcc/loop.c
b/gcc/loop.c
index 03458ee59598eb9af69e1a46047fae3adfb03622..d11876806447613a77d25067c5734dbc398aec90 100644
(file)
--- 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;
}