aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Evans <dje@seba.cygnus.com>1997-08-27 16:43:23 +0000
committerJeff Law <law@gcc.gnu.org>1997-08-27 10:43:23 -0600
commit88016fb7ef61bcc40b7cf8b1d6c6511a8896f594 (patch)
tree944ee8d1d31c76cbfb94bdc0f34a28a931ceb050
parent33d2808ba7921908568d9b6d992d1626a3c6c840 (diff)
downloadgcc-88016fb7ef61bcc40b7cf8b1d6c6511a8896f594.zip
gcc-88016fb7ef61bcc40b7cf8b1d6c6511a8896f594.tar.gz
gcc-88016fb7ef61bcc40b7cf8b1d6c6511a8896f594.tar.bz2
loop.c (combine_movables): Earlier insns don't match later ones.
* loop.c (combine_movables): Earlier insns don't match later ones. Brought over from the fsf. From-SVN: r14966
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/loop.c4
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0483a4f..473e0e2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+Wed Aug 27 01:56:18 1997 Doug Evans <dje@seba.cygnus.com>
+
+ * loop.c (combine_movables): Earlier insns don't match later ones.
+
Wed Aug 27 01:24:25 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
* config/linux.h (CC1_SPEC): Define it only if not defined.
diff --git a/gcc/loop.c b/gcc/loop.c
index f924e2a..5e0d1d1 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -1342,7 +1342,9 @@ combine_movables (movables, nregs)
bzero (matched_regs, nregs);
matched_regs[regno] = 1;
- for (m1 = movables; m1; m1 = m1->next)
+ /* We want later insns to match the first one. Don't make the first
+ one match any later ones. So start this loop at m->next. */
+ for (m1 = m->next; m1; m1 = m1->next)
if (m != m1 && m1->match == 0 && n_times_used[m1->regno] == 1
/* A reg used outside the loop mustn't be eliminated. */
&& !m1->global