Ignore no-ops in cprop pass.
authorBernd Schmidt <bernds@cygnus.co.uk>
Thu, 26 Aug 1999 17:33:35 +0000 (17:33 +0000)
committerBernd Schmidt <crux@gcc.gnu.org>
Thu, 26 Aug 1999 17:33:35 +0000 (17:33 +0000)
From-SVN: r28901

gcc/ChangeLog
gcc/gcse.c

index b19980a6828c70aaee150f8cb6d3c392ba65c90a..3351ad0c76a4822cd5c50db58eb1cc9e1c920caa 100644 (file)
@@ -1,3 +1,7 @@
+Thu Aug 26 18:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
+
+       * gcse.c (hash_scan_insn): Don't scan obvious no-ops.
+
 1999-08-26 09:42 -0700  Zack Weinberg  <zack@bitmover.com>
 
        * tree.h: fancy_abort always takes three args.
index 7a484ab2be7624fe4e424d725eb328589d86842a..3fa620a9c293acb00d09a3fee3720b10f58642a6 100644 (file)
@@ -1919,7 +1919,11 @@ hash_scan_insn (insn, set_p, in_libcall_block)
      what's been modified.  */
 
   if (GET_CODE (pat) == SET && ! in_libcall_block)
-    hash_scan_set (pat, insn, set_p);
+    {
+      /* Ignore obvious no-ops.  */
+      if (SET_SRC (pat) != SET_DEST (pat))
+       hash_scan_set (pat, insn, set_p);
+    }
   else if (GET_CODE (pat) == PARALLEL)
     {
       int i;