diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2013-03-04 17:41:32 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2013-03-04 17:41:32 +0000 |
commit | 02a8b6cb2163533493719c8e14427dde8d560af0 (patch) | |
tree | c430041e9450edc881a1c1f7ab9daed21e93d52f /gcc/ipa-split.c | |
parent | 7561f651ceb1798a07b62b6ad540af17ba0184b0 (diff) |
PR tree-optimization/56424
* ipa-split.c (split_function): Do not set the RSO flag if result is
not by reference and its type is a register type.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@196439 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-split.c')
-rw-r--r-- | gcc/ipa-split.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c index e3db78f5c05..e7d469d7442 100644 --- a/gcc/ipa-split.c +++ b/gcc/ipa-split.c @@ -1309,7 +1309,9 @@ split_function (struct split_point *split_point) so return slot optimization is always possible. Moreover this is required to make DECL_BY_REFERENCE work. */ if (aggregate_value_p (DECL_RESULT (current_function_decl), - TREE_TYPE (current_function_decl))) + TREE_TYPE (current_function_decl)) + && (!is_gimple_reg_type (TREE_TYPE (DECL_RESULT (current_function_decl))) + || DECL_BY_REFERENCE (DECL_RESULT (current_function_decl)))) gimple_call_set_return_slot_opt (call, true); /* Update return value. This is bit tricky. When we do not return, |