diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2012-12-16 10:02:37 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2012-12-16 10:02:37 +0000 |
commit | 5c26726432b6af8c9eb88440db3fd8aaf1b30fc6 (patch) | |
tree | 179de2976b53f6f09f786013b2b4078605c8459c /gcc/expr.c | |
parent | 794a718339b113e58c10302c63376c4cbe33d5eb (diff) |
PR rtl-optimization/55630
* expr.c (expand_assignment): Do not call copy_blkmode_to_reg to move
BLKmode return values to the return register.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@194530 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index 7e86983d755..9d9e5b9abf5 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -4947,7 +4947,12 @@ expand_assignment (tree to, tree from, bool nontemporal) rtx temp; push_temp_slots (); - if (REG_P (to_rtx) && TYPE_MODE (TREE_TYPE (from)) == BLKmode) + + /* If the source is itself a return value, it still is in a pseudo at + this point so we can move it back to the return register directly. */ + if (REG_P (to_rtx) + && TYPE_MODE (TREE_TYPE (from)) == BLKmode + && TREE_CODE (from) != CALL_EXPR) temp = copy_blkmode_to_reg (GET_MODE (to_rtx), from); else temp = expand_expr (from, NULL_RTX, GET_MODE (to_rtx), EXPAND_NORMAL); |