This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28075] inliner introduces unnecessary type conversions
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2006 19:53:38 -0000
- Subject: [Bug middle-end/28075] inliner introduces unnecessary type conversions
- References: <bug-28075-10053@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-06-17 19:53 -------
Here is the patch:
Index: tree-inline.c
===================================================================
--- tree-inline.c (revision 114740)
+++ tree-inline.c (working copy)
@@ -1081,6 +1081,8 @@ setup_one_parameter (copy_body_data *id,
if (rhs == error_mark_node)
return;
+
+ STRIP_USELESS_TYPE_CONVERSION (rhs);
/* We want to use MODIFY_EXPR, not INIT_EXPR here so that we
keep our trees in gimple form. */
@@ -1267,6 +1269,8 @@ declare_return_variable (copy_body_data
use = var;
if (!lang_hooks.types_compatible_p (TREE_TYPE (var), caller_type))
use = fold_convert (caller_type, var);
+
+ STRIP_USELESS_TYPE_CONVERSION (use);
done:
/* Register the VAR_DECL as the equivalent for the RESULT_DECL; that
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO|28071 |
nThis| |
Summary|gimplifier introduces |inliner introduces
|unnecessary type conversions|unnecessary type conversions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28075