diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-08-21 07:52:57 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-08-21 07:52:57 -0400 |
commit | eeb43d32dbbddfdbccc863f6194093b64eef0f51 (patch) | |
tree | 9b626f7b5458c5ac875c97b11dccb78e2b49a1d1 /gcc/combine.c | |
parent | 4d6697ca225160f459ba1e0be1721d3e460a4b4e (diff) | |
download | gcc-eeb43d32dbbddfdbccc863f6194093b64eef0f51.zip gcc-eeb43d32dbbddfdbccc863f6194093b64eef0f51.tar.gz gcc-eeb43d32dbbddfdbccc863f6194093b64eef0f51.tar.bz2 |
(subst): Move up test for too many restarts.
If we restart, clear OP0_MODE since we don't know it.
From-SVN: r1926
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 75ef97a..5b9b9a4 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -2580,6 +2580,18 @@ subst (x, from, to, in_dest, unique_copy) restart: + /* If we have restarted more than 4 times, we are probably looping, so + give up. */ + if (++n_restarts > 4) + return x; + + /* If we are restarting at all, it means that we no longer know the + original mode of operand 0 (since we have probably changed the + form of X). */ + + if (n_restarts > 1) + op0_mode = VOIDmode; + code = GET_CODE (x); /* If this is a commutative operation, put a constant last and a complex @@ -2663,11 +2675,6 @@ subst (x, from, to, in_dest, unique_copy) if (temp) x = temp, code = GET_CODE (temp); - /* If we have restarted more than 4 times, we are probably looping, so - give up. */ - if (++n_restarts > 4) - return x; - /* First see if we can apply the inverse distributive law. */ if (code == PLUS || code == MINUS || code == IOR || code == XOR) { |