This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/47258] Extra instruction generated in 4.5.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47258

--- Comment #2 from Bingfeng Mei <bmei at broadcom dot com> 2011-01-11 16:16:28 UTC ---
After tried patches one-by-one, I believe the misoptimization is down to the
following patch.

Index: tree-ssa-copyrename.c
===================================================================
RCS file: /cvs/dev/tools/src/fp_gcc/gcc/tree-ssa-copyrename.c,v
retrieving revision 1.1.2.5.2.1
retrieving revision 1.1.2.5.2.2
diff -u -r1.1.2.5.2.1 -r1.1.2.5.2.2
--- tree-ssa-copyrename.c    12 Apr 2010 13:15:43 -0000    1.1.2.5.2.1
+++ tree-ssa-copyrename.c    13 Dec 2010 05:51:45 -0000    1.1.2.5.2.2
@@ -225,11 +225,11 @@
       ign2 = false;
     }

-  /* Don't coalesce if the two variables aren't type compatible.  */
-  if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2)))
+  /* Don't coalesce if the two variables are not of the same type.  */
+  if (TREE_TYPE (root1) != TREE_TYPE (root2))
     {
       if (debug)
-    fprintf (debug, " : Incompatible types.  No coalesce.\n");
+    fprintf (debug, " : Different types.  No coalesce.\n");
       return false;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]