+Thu May 25 02:27:22 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * loop.c (basic_induction_var): Avoid double recording of an increment.
+
Thu May 25 02:19:27 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
* Back out this patch:
/* If this register is assigned in a previous insn, look at its
source, but don't go outside the loop or past a label. */
+ /* If this sets a register to itself, we would repeat any previous
+ biv increment if we applied this strategy blindly. */
+ if (rtx_equal_p (dest_reg, x))
+ return 0;
+
insn = p;
while (1)
{
if (insn)
set = single_set (insn);
- if (set && SET_DEST (set) == XEXP (x, 0)
+ if (! rtx_equal_p (dest_reg, XEXP (x, 0))
+ && set && SET_DEST (set) == XEXP (x, 0)
&& GET_CODE (XEXP (x, 1)) == CONST_INT
&& INTVAL (XEXP (x, 1)) >= 0
&& GET_CODE (SET_SRC (set)) == ASHIFT