summaryrefslogtreecommitdiff
path: root/gcc/ipa-split.c
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-04 17:41:32 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-04 17:41:32 +0000
commit8ad1eb69bfe232141bc7149e08cba0064d161b86 (patch)
treec430041e9450edc881a1c1f7ab9daed21e93d52f /gcc/ipa-split.c
parentaba080c1e7c65e3bcaad311ebc072ddf5e72cb58 (diff)
downloadgcc-8ad1eb69bfe232141bc7149e08cba0064d161b86.tar.gz
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: svn+ssh://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.c4
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,