summaryrefslogtreecommitdiff
path: root/gcc/regclass.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-11-03 20:36:59 +0000
committerRichard Stallman <rms@gnu.org>1993-11-03 20:36:59 +0000
commitcc4c133a3646b53c5b77bdd55d1efb896a19b161 (patch)
tree326a882f749c6ed72b434e251f68f885d032a56b /gcc/regclass.c
parent937aa51bbad438b069d7a6219bfecd5c344c922e (diff)
downloadgcc-cc4c133a3646b53c5b77bdd55d1efb896a19b161.tar.gz
(regclass): Consider commutativity even when
one arg is a constant. From-SVN: r5985
Diffstat (limited to 'gcc/regclass.c')
-rw-r--r--gcc/regclass.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gcc/regclass.c b/gcc/regclass.c
index 3a488fc1a00..1453d0e9175 100644
--- a/gcc/regclass.c
+++ b/gcc/regclass.c
@@ -757,13 +757,11 @@ regclass (f, nregs)
}
/* Check for commutative in a separate loop so everything will
- have been initialized. Don't bother doing anything if the
- second operand is a constant since that is the case
- for which the constraints should have been written. */
+ have been initialized. We must do this even if one operand
+ is a constant--see addsi3 in m68k.md. */
for (i = 0; i < noperands - 1; i++)
- if (constraints[i][0] == '%'
- && ! CONSTANT_P (recog_operand[i+1]))
+ if (constraints[i][0] == '%')
{
char *xconstraints[MAX_RECOG_OPERANDS];
int j;