aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-inline.c
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gcc.gnu.org>2006-06-19 19:09:57 -0700
committerAndrew Pinski <pinskia@gcc.gnu.org>2006-06-19 19:09:57 -0700
commit73dab33bce6cc186f05ac0cf45e42c58f9086b3c (patch)
tree70fce683565be251ca9b5d49fd3d814bfcf5a973 /gcc/tree-inline.c
parent48e2909e4a9d520a083d213999c926bf135ebed2 (diff)
downloadgcc-73dab33bce6cc186f05ac0cf45e42c58f9086b3c.zip
gcc-73dab33bce6cc186f05ac0cf45e42c58f9086b3c.tar.gz
gcc-73dab33bce6cc186f05ac0cf45e42c58f9086b3c.tar.bz2
re PR middle-end/28075 (inliner introduces unnecessary type conversions)
2006-06-19 Andrew Pinski <pinskia@gmail.com> PR middle-end/28075 * tree-inline.c (setup_one_parameter): Strip useless type conversion before adding it to the IR. (declare_return_variable): Likewise. 2006-06-19 Andrew Pinski <pinskia@gmail.com> PR middle-end/28075 * gcc.dg/tree-ssa/inline-1.c: New test. From-SVN: r114801
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r--gcc/tree-inline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 3aeb7b6..4749be5 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -1081,6 +1081,8 @@ setup_one_parameter (copy_body_data *id, tree p, tree value, tree fn,
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 *id, tree return_slot_addr,
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