This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/47167] Performance regression in numerical code
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Jan 2011 16:13:48 +0000
- Subject: [Bug other/47167] Performance regression in numerical code
- Auto-submitted: auto-generated
- References: <bug-47167-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47167
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu.org
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-01-19 16:13:31 UTC ---
Can you check if the following patch solves your problem?
Index: tree-ssa-copyrename.c
===================================================================
--- tree-ssa-copyrename.c (revision 168987)
+++ tree-ssa-copyrename.c (working copy)
@@ -226,8 +226,11 @@ copy_rename_partition_coalesce (var_map
ign2 = false;
}
- /* Don't coalesce if the two variables are not of the same type. */
- if (TREE_TYPE (root1) != TREE_TYPE (root2))
+ /* Don't coalesce if the two variables are not compatible . */
+ if (!types_compatible_p (TREE_TYPE (root1), TREE_TYPE (root2))
+ || ((TREE_CODE (TREE_TYPE (root1)) == ENUMERAL_TYPE
+ || TREE_CODE (TREE_TYPE (root2)) == ENUMERAL_TYPE)
+ && TREE_TYPE (root1) != TREE_TYPE (root2)))
{
if (debug)
fprintf (debug, " : Different types. No coalesce.\n");
The differences in GIMPLE of the patch do not explain the code-differences
though, so it might be just bad luck that the patch regressed things for
you. I can see other unwanted differences though.