aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-04-20 19:56:58 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-04-20 19:56:58 -0700
commit9e52563514f58a902701416af51b5b8fa6ad8dc2 (patch)
treeee43740515805d79811046ebf9f421ef0f4e6367 /gcc/loop.c
parentc52fbf0f79f6e2079687c2bb12542a4e23bffd2f (diff)
downloadgcc-9e52563514f58a902701416af51b5b8fa6ad8dc2.zip
gcc-9e52563514f58a902701416af51b5b8fa6ad8dc2.tar.gz
gcc-9e52563514f58a902701416af51b5b8fa6ad8dc2.tar.bz2
* loop.c (emit_iv_add_mult): Revert last change.
From-SVN: r33302
Diffstat (limited to 'gcc/loop.c')
-rw-r--r--gcc/loop.c56
1 files changed, 5 insertions, 51 deletions
diff --git a/gcc/loop.c b/gcc/loop.c
index 7dd557d..1ff6a8c 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -7640,24 +7640,11 @@ emit_iv_add_mult (b, m, a, reg, insert_before)
{
rtx seq;
rtx result;
- rtx last;
- rtx set;
- rtx exp;
- enum machine_mode mode = GET_MODE (reg);
/* Prevent unexpected sharing of these rtx. */
a = copy_rtx (a);
b = copy_rtx (b);
- /* We may be faced to (plus (symbol_ref) (const_int)). We want to simplify
- this to CONST rtx. */
- exp = simplify_rtx (a);
- if (exp)
- a = exp;
- exp = simplify_rtx (b);
- if (exp)
- b = exp;
-
/* Increase the lifetime of any invariants moved further in code. */
update_reg_last_use (a, insert_before);
update_reg_last_use (b, insert_before);
@@ -7670,7 +7657,7 @@ emit_iv_add_mult (b, m, a, reg, insert_before)
seq = gen_sequence ();
end_sequence ();
- last = emit_insn_before (seq, insert_before);
+ emit_insn_before (seq, insert_before);
/* It is entirely possible that the expansion created lots of new
registers. Iterate over the sequence we just created and
@@ -7681,47 +7668,14 @@ emit_iv_add_mult (b, m, a, reg, insert_before)
int i;
for (i = 0; i < XVECLEN (seq, 0); ++i)
{
- set = single_set (XVECEXP (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);
}
- last = XVECEXP (seq, 0, i - 1);
}
- else
- {
- set = single_set (last);
- if (set && GET_CODE (SET_DEST (set)) == REG)
- record_base_value (REGNO (SET_DEST (set)), SET_SRC (set), 0);
- }
- if (!last)
- return;
- /* Sequence really ought to end by set storing final value to the register.
-
- Attach note indicating expression we've just calculated to it. This is
- important for second run of loop optimizer to understand strength reduced
- givs from the first run. */
- if (GET_CODE (last) != INSN)
- abort();
- set = single_set (last);
- if (!set)
- return;
- if (SET_DEST (set) != reg)
- abort();
-
- /* In case we start to emit some usefull notes to these insns, get abort
- here, since we need to decide what information is more important. */
- if (find_reg_note (last, REG_EQUIV, NULL_RTX)
- || find_reg_note (last, REG_EQUAL, NULL_RTX))
- abort();
-
- /* Expression we've just caluclated. */
- exp = simplify_gen_binary (PLUS, mode,
- simplify_gen_binary (MULT, mode, b, m),
- a);
- REG_NOTES (last)
- = gen_rtx_EXPR_LIST (REG_EQUAL,
- exp,
- REG_NOTES (last));
+ 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