OSDN Git Service

* regmove.c (regmove_optimize): Avoid setting a register twice in
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Aug 2001 01:05:24 +0000 (01:05 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 11 Aug 2001 01:05:24 +0000 (01:05 +0000)
        a parallel set.

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

gcc/ChangeLog
gcc/regmove.c

index 9d9bbe1..29440f5 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-10  Roman Zippel  <zippel@linux-m68k.org>
+           Richard Henderson  <rth@redhat.com>
+
+       * regmove.c (regmove_optimize): Avoid setting a register twice in
+       a parallel set.
+
 2001-08-10  Richard Henderson  <rth@redhat.com>
 
        * doc/extend.texi (Arrays and pointers implementation): Document
index 587acea..ac1675e 100644 (file)
@@ -1319,6 +1319,14 @@ regmove_optimize (f, nregs, regmove_dump_file)
              if (! set)
                continue;
 
+             /* Note that single_set ignores parts of a parallel set for
+                which one of the destinations is REG_UNUSED.  We can't
+                handle that here, since we can wind up rewriting things
+                such that a single register is set twice within a single
+                parallel.  */
+             if (reg_set_p (src, insn))
+               continue;
+
              /* match_no/dst must be a write-only operand, and
                 operand_operand/src must be a read-only operand.  */
              if (match.use[op_no] != READ