]> gcc.gnu.org Git - gcc.git/commitdiff
loop.c (strength_reduce): When doing biv->giv conversion, update reg note of NEXT...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Thu, 17 Jun 1999 13:35:59 +0000 (13:35 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Thu, 17 Jun 1999 13:35:59 +0000 (14:35 +0100)
* loop.c (strength_reduce): When doing biv->giv conversion, update
reg note of NEXT->insn.

From-SVN: r27574

gcc/ChangeLog
gcc/loop.c

index dabee24bdee5a2fa62e37d9abdf0e0af2e5636fa..fe6a60cd30759772c6c759ccc2ea162364703f49 100644 (file)
@@ -1,3 +1,8 @@
+Thu Jun 17 21:34:24 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * loop.c (strength_reduce): When doing biv->giv conversion, update
+       reg note of NEXT->insn.
+
 Thu Jun 17 14:25:08 1999  Jeffrey A Law  (law@cygnus.com)
 
        * loop.c (move_movables): Note issues with replacing REGs with
index dcddba681b4ff5c40a99257282461eca7ad14695..7bd014786f03f4db005d818f8442e5d066f9980e 100644 (file)
@@ -4198,7 +4198,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
          for (vp = &bl->biv, next = *vp; v = next, next = v->next_iv;)
            {
              HOST_WIDE_INT offset;
-             rtx set, add_val, old_reg, dest_reg, last_use_insn;
+             rtx set, add_val, old_reg, dest_reg, last_use_insn, note;
              int old_regno, new_regno;
 
              if (! v->always_executed
@@ -4304,7 +4304,13 @@ strength_reduce (scan_start, end, loop_top, insn_count,
     
              REG_IV_TYPE (new_regno) = GENERAL_INDUCT;
              REG_IV_INFO (new_regno) = v;
-    
+
+             /* If next_insn has a REG_EQUAL note that mentiones OLD_REG,
+                it must be replaced.  */
+             note = find_reg_note (next->insn, REG_EQUAL, NULL_RTX);
+             if (note && reg_mentioned_p (old_reg, XEXP (note, 0)))
+               XEXP (note, 0) = copy_rtx (SET_SRC (single_set (next->insn)));
+
              /* Remove the increment from the list of biv increments,
                 and record it as a giv.  */
              *vp = next;
This page took 0.073126 seconds and 5 git commands to generate.