diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-10-09 21:01:53 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-10-09 21:01:53 +0200 |
commit | 78441afbc88a084f88d821c88635966414fda3b2 (patch) | |
tree | 0a14cb990a496d2509e552e0f78dbea2f1b1fecd /gcc/calls.c | |
parent | aabf6a0372105ce6deb5780e39d648e92a491a37 (diff) | |
download | gcc-78441afbc88a084f88d821c88635966414fda3b2.zip gcc-78441afbc88a084f88d821c88635966414fda3b2.tar.gz gcc-78441afbc88a084f88d821c88635966414fda3b2.tar.bz2 |
re PR rtl-optimization/41646 (Reload ICE due to combiner extending life time of a hard register)
PR rtl-optimization/41646
* calls.c (expand_call): For BLKmode types returned in registers
avoid likely spilled hard regs in copy_blkmode_from_reg generated
insns.
* gcc.c-torture/compile/pr41646.c: New test.
From-SVN: r152597
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index 49e576e..13167a6 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -3020,7 +3020,10 @@ expand_call (tree exp, rtx target, int ignore) } else if (TYPE_MODE (rettype) == BLKmode) { - target = copy_blkmode_from_reg (target, valreg, rettype); + rtx val = valreg; + if (GET_MODE (val) != BLKmode) + val = avoid_likely_spilled_reg (val); + target = copy_blkmode_from_reg (target, val, rettype); /* We can not support sibling calls for this case. */ sibcall_failure = 1; |