web.c (union_defs): use all defs of an instruction to create a union with a read...
authorRoman Zippel <zippel@linux-m68k.org>
Tue, 29 Jun 2004 23:19:20 +0000 (23:19 +0000)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 29 Jun 2004 23:19:20 +0000 (16:19 -0700)
        * web.c (union_defs): use all defs of an instruction to create a
        union with a read/write use

From-SVN: r83882

gcc/ChangeLog
gcc/web.c

index a8fe360..2851a5d 100644 (file)
@@ -1,3 +1,8 @@
+2004-06-29  Roman Zippel <zippel@linux-m68k.org>
+
+       * web.c (union_defs): use all defs of an instruction to create a
+       union with a read/write use
+
 2004-06-29  Richard Henderson  <rth@redhat.com>
 
        PR middle-end/16216
index 11f2caa..91dbb90 100644 (file)
--- a/gcc/web.c
+++ b/gcc/web.c
@@ -160,11 +160,13 @@ union_defs (struct df *df, struct ref *use, struct web_entry *def_entry,
     {
       struct df_link *link = DF_INSN_DEFS (df, DF_REF_INSN (use));
 
-      while (DF_REF_REAL_REG (link->ref) != DF_REF_REAL_REG (use))
-       link = link->next;
-
-      unionfind_union (use_entry + DF_REF_ID (use),
-                      def_entry + DF_REF_ID (link->ref));
+      while (link)
+       {
+         if (DF_REF_REAL_REG (link->ref) == DF_REF_REAL_REG (use))
+           unionfind_union (use_entry + DF_REF_ID (use),
+                            def_entry + DF_REF_ID (link->ref));
+         link = link->next;
+       }
     }
 }