From: Richard Henderson Date: Thu, 16 Jul 1998 00:27:23 +0000 (-0600) Subject: loop.c (emit_iv_add_mult): Scan the entire insn list generated for the sequence,... X-Git-Tag: prereleases/egcs-1.1-prerelease~224 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b926413b7589c3850cdee9d0a050178ff57fa13f;p=thirdparty%2Fgcc.git loop.c (emit_iv_add_mult): Scan the entire insn list generated for the sequence, recording base values. 8 * loop.c (emit_iv_add_mult): Scan the entire insn list generated for the sequence, recording base values. From-SVN: r21210 --- diff --git a/gcc/loop.c b/gcc/loop.c index 1932bdeb5bcc..0171741e22b7 100644 --- a/gcc/loop.c +++ b/gcc/loop.c @@ -6005,7 +6005,23 @@ emit_iv_add_mult (b, m, a, reg, insert_before) emit_insn_before (seq, insert_before); - record_base_value (REGNO (reg), b, 0); + /* It is entirely possible that the expansion created lots of new + registers. Iterate over the sequence we just created and + record them all. */ + + if (GET_CODE (seq) == SEQUENCE) + { + int i; + for (i = 0; i < XVECLEN (seq, 0); ++i) + { + rtx set = single_set (XVECEXP (seq, 0, i)); + if (set && GET_CODE (SET_DEST (set)) == REG) + record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0); + } + } + else if (GET_CODE (seq) == SET + && GET_CODE (SET_DEST (seq)) == REG) + record_base_value (REGNO (SET_DEST (seq)), SET_SRC (seq), 0); } /* Test whether A * B can be computed without