summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-16 00:22:41 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1998-07-16 00:22:41 +0000
commit68e29b3d6e6749127efb6c120cb531132aa18de6 (patch)
tree7eae3c99f56b81f2c11a070c986c22daf8052e0c
parentc1027a47035055091a0ce7691249d51cc30b8491 (diff)
downloadgcc-68e29b3d6e6749127efb6c120cb531132aa18de6.tar.gz
8
* loop.c (emit_iv_add_mult): Scan the entire insn list generated for the sequence, recording base values. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21208 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/loop.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 1932bdeb5bc..0171741e22b 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