diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-24 20:12:49 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-24 20:12:49 +0000 |
commit | 39be9d2659c4cb800238d2df235abe77e6ebc472 (patch) | |
tree | c672dee8f414becb468719cea9403139841a25d1 /gcc/mode-switching.c | |
parent | 5194c57d38c69d0ef64e8d5e701e4c302901af93 (diff) | |
download | gcc-39be9d2659c4cb800238d2df235abe77e6ebc472.tar.gz |
PR rtl-optimization/57968
* mode-switching.c (create_pre_exit): Allow instructions that
don't set a return register to need a non-exit mode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201225 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mode-switching.c')
-rw-r--r-- | gcc/mode-switching.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index 70a77d081a4..8ea8ca35d3c 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -330,12 +330,10 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) break; } if (!targetm.calls.function_value_regno_p (copy_start)) - { - last_insn = return_copy; - continue; - } - copy_num - = hard_regno_nregs[copy_start][GET_MODE (copy_reg)]; + copy_num = 0; + else + copy_num + = hard_regno_nregs[copy_start][GET_MODE (copy_reg)]; /* If the return register is not likely spilled, - as is the case for floating point on SH4 - then it might @@ -372,6 +370,11 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) forced_late_switch = 1; break; } + if (copy_num == 0) + { + last_insn = return_copy; + continue; + } if (copy_start >= ret_start && copy_start + copy_num <= ret_end) |