From: Dale Johannesen Date: Fri, 29 Mar 2002 22:36:56 +0000 (+0000) Subject: * loop.c (combine_movables): Do allow combination of pseudos. X-Git-Tag: releases/gcc-3.3.0~6030 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02a566dcf0d6b8055a34e7d771840c43fde3aba5;p=thirdparty%2Fgcc.git * loop.c (combine_movables): Do allow combination of pseudos. From-SVN: r51581 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5309a2c2742..3d0da3609b31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2002-03-29 Dale Johannesen + + * loop.c (combine_movables): Do allow combination of pseudos. + 2002-03-29 Loren J. Rittle * config.gcc (*-*-freebsd*): Enable creation of libgcc_s.so. diff --git a/gcc/loop.c b/gcc/loop.c index 6617608cfd30..99281d0dba40 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -1446,10 +1446,13 @@ combine_movables (movables, regs) /* Regs that are set more than once are not allowed to match or be matched. I'm no longer sure why not. */ + /* Only pseudo registers are allowed to match or be matched, + since move_movables does not validate the change. */ /* Perhaps testing m->consec_sets would be more appropriate here? */ for (m = movables->head; m; m = m->next) if (m->match == 0 && regs->array[m->regno].n_times_set == 1 + && m->regno >= FIRST_PSEUDO_REGISTER && !m->partial) { struct movable *m1; @@ -1461,11 +1464,9 @@ combine_movables (movables, regs) /* 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) - /* ??? HACK! move_movables does not verify that the replacement - is valid, which can have disasterous effects with hard regs - and match_dup. Turn combination off for now. */ - if (0 && m != m1 && m1->match == 0 + if (m != m1 && m1->match == 0 && regs->array[m1->regno].n_times_set == 1 + && m1->regno >= FIRST_PSEUDO_REGISTER /* A reg used outside the loop mustn't be eliminated. */ && !m1->global /* A reg used for zero-extending mustn't be eliminated. */