]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
loop.c (count_one_set): Fix detection of registers set in more than one basic block.
authorZdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
Sun, 29 Jun 2003 20:42:42 +0000 (22:42 +0200)
committerZdenek Dvorak <rakdver@gcc.gnu.org>
Sun, 29 Jun 2003 20:42:42 +0000 (20:42 +0000)
* loop.c (count_one_set): Fix detection of registers set in more
than one basic block.

From-SVN: r68680

gcc/ChangeLog
gcc/loop.c

index 5318c9a4dfb4bd763aec7da3fa18dd9c631ee211..784d3b050783f5d92702e2ffa993c159fb7f75fa 100644 (file)
@@ -1,3 +1,8 @@
+2003-06-29  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
+
+       * loop.c (count_one_set): Fix detection of registers set in more
+       than one basic block.   
+
 2003-06-29  Andreas Jaeger  <aj@suse.de>
 
        * target-def.h: Remove usage of OBJECT_FORMAT_ROSE.
index ae7edab06d5a3c7ee824b8e8d27e27c6bba26525..8c6a0e501a1b270666ab806709001b342b121e59 100644 (file)
@@ -3617,7 +3617,7 @@ count_one_set (regs, insn, x, last_set)
                 it must be set in two basic blocks, so it cannot
                 be moved out of the loop.  */
              if (regs->array[regno].set_in_loop > 0
-                 && last_set == 0)
+                 && last_set[regno] == 0)
                regs->array[regno+i].may_not_optimize = 1;
              /* If this is not first setting in current basic block,
                 see if reg was used in between previous one and this.