Commit 63d59526 by Richard Kenner

(strength_reduce): Ignore initial value if it is the wrong mode.

(record_initial): Don't ignore any set of the register.

From-SVN: r6002
parent 4eae5fe1
...@@ -3410,7 +3410,8 @@ strength_reduce (scan_start, end, loop_top, insn_count, ...@@ -3410,7 +3410,8 @@ strength_reduce (scan_start, end, loop_top, insn_count,
"Biv %d initialized at insn %d: initial value ", "Biv %d initialized at insn %d: initial value ",
bl->regno, INSN_UID (bl->init_insn)); bl->regno, INSN_UID (bl->init_insn));
if (valid_initial_value_p (src, bl->init_insn, call_seen, loop_start)) if (GET_MODE (src) == GET_MODE (regno_reg_rtx[bl->regno])
&& valid_initial_value_p (src, bl->init_insn, call_seen, loop_start))
{ {
bl->initial_value = src; bl->initial_value = src;
...@@ -6239,9 +6240,7 @@ record_initial (dest, set) ...@@ -6239,9 +6240,7 @@ record_initial (dest, set)
if (GET_CODE (dest) != REG if (GET_CODE (dest) != REG
|| REGNO (dest) >= max_reg_before_loop || REGNO (dest) >= max_reg_before_loop
|| reg_iv_type[REGNO (dest)] != BASIC_INDUCT || reg_iv_type[REGNO (dest)] != BASIC_INDUCT)
/* Reject this insn if the source isn't valid for the mode of DEST. */
|| GET_MODE (dest) != GET_MODE (SET_DEST (set)))
return; return;
bl = reg_biv_class[REGNO (dest)]; bl = reg_biv_class[REGNO (dest)];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment