cfgcleanup.c (insns_match_p): Do not do EQUIV substitution after reload.
authorRichard Henderson <rth@redhat.com>
Sun, 23 Mar 2003 01:40:04 +0000 (17:40 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 23 Mar 2003 01:40:04 +0000 (17:40 -0800)
        * cfgcleanup.c (insns_match_p): Do not do EQUIV substitution
        after reload.

From-SVN: r64738

gcc/ChangeLog
gcc/cfgcleanup.c

index 791e5b9e51d945b4d56e7f89444b92cd11c909f1..cf3c258ce61ae18ab2c2cc965eb19dd07ff44e50 100644 (file)
@@ -1,3 +1,8 @@
+2003-03-22  Richard Henderson <rth@redhat.com>
+
+       * cfgcleanup.c (insns_match_p): Do not do EQUIV substitution
+       after reload.
+
 2003-03-22  DJ Delorie  <dj at redhat dot com>,
        Bruce Korb  <bkorb at gnu dot org>
 
index 76aebc47034414d74be44d06d1217d6526fdff9a..42dc0a9e4c5f508d826113da24ef61d7bbc9cb47 100644 (file)
@@ -967,7 +967,15 @@ insns_match_p (mode, i1, i2)
 #endif
 
   if (reload_completed
-      ? ! rtx_renumbered_equal_p (p1, p2) : ! rtx_equal_p (p1, p2))
+      ? rtx_renumbered_equal_p (p1, p2) : rtx_equal_p (p1, p2))
+    return true;
+
+  /* Do not do EQUIV substitution after reload.  First, we're undoing the
+     work of reload_cse.  Second, we may be undoing the work of the post-
+     reload splitting pass.  */
+  /* ??? Possibly add a new phase switch variable that can be used by
+     targets to disallow the troublesome insns after splitting.  */
+  if (!reload_completed)
     {
       /* The following code helps take care of G++ cleanups.  */
       rtx equiv1 = find_reg_equal_equiv_note (i1);
@@ -994,11 +1002,9 @@ insns_match_p (mode, i1, i2)
                return true;
            }
        }
-
-      return false;
     }
 
-  return true;
+  return false;
 }
 \f
 /* Look through the insns at the end of BB1 and BB2 and find the longest