* loop.c (strength_reduce): Fix sign of giv lifetime calculation
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Dec 1999 19:18:50 +0000 (19:18 +0000)
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Dec 1999 19:18:50 +0000 (19:18 +0000)
for givs made from biv increments.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30927 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/loop.c

index 72179e2..9eefe70 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 81b77ae..9d55f81 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.  */