loop.c (strength_reduce): Fix sign of giv lifetime calculation for givs made from...
authorJ"orn Rennecke <amylaar@cygnus.co.uk>
Tue, 14 Dec 1999 19:18:50 +0000 (19:18 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Tue, 14 Dec 1999 19:18:50 +0000 (19:18 +0000)
* loop.c (strength_reduce): Fix sign of giv lifetime calculation
for givs made from biv increments.

From-SVN: r30927

gcc/ChangeLog
gcc/loop.c

index 72179e2e51e6aa446d5dfc108dc5f9b505ce1eea..9eefe70ad08ae0625ad14f101f1e6c1ec8ee00dc 100644 (file)
@@ -1,3 +1,8 @@
+Tue Dec 14 18:13:32 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
+
+       * loop.c (strength_reduce): Fix sign of giv lifetime calculation
+       for givs made from biv increments.
+
 Tue Dec 14 08:11:27 1999  Richard Henderson  <rth@cygnus.com>
 
        * configure.in (alpha-osf, alpha-linux): Handle ev6[78].
index 81b77ae8234162fb5682728b87b5252cbbbf9a06..9d55f815281efdc52405b590d853b2151184ab3b 100644 (file)
@@ -4480,7 +4480,7 @@ strength_reduce (scan_start, end, loop_top, insn_count,
                }
     
              v->last_use = last_use_insn;
-             v->lifetime = INSN_LUID (v->insn) - INSN_LUID (last_use_insn);
+             v->lifetime = INSN_LUID (last_use_insn) - INSN_LUID (v->insn);
              /* If the lifetime is zero, it means that this register is really
                 a dead store.  So mark this as a giv that can be ignored.
                 This will not prevent the biv from being eliminated.  */