diff options
author | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-29 22:45:38 +0000 |
---|---|---|
committer | amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-07-29 22:45:38 +0000 |
commit | 4da102b5e5f69789bdc01c8e1957bd6a226052b2 (patch) | |
tree | 94703f6d865b5c862c8f5aea9eefd59bc4d7e5dd /gcc/mode-switching.c | |
parent | b710b5a93c7658ee297c67896132bccc2d2d3e06 (diff) | |
download | gcc-4da102b5e5f69789bdc01c8e1957bd6a226052b2.tar.gz |
PR rtl-optimization/58021
* mode-switching.c (create_pre_exit): Always split off preceding
insns if we are not at the basic block head.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@201321 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mode-switching.c')
-rw-r--r-- | gcc/mode-switching.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c index 8ea8ca35d3c..0d112b19074 100644 --- a/gcc/mode-switching.c +++ b/gcc/mode-switching.c @@ -420,7 +420,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) || (GET_MODE_CLASS (GET_MODE (ret_reg)) != MODE_INT && nregs != 1)); - if (INSN_P (last_insn)) + if (!NOTE_INSN_BASIC_BLOCK_P (last_insn)) { before_return_copy = emit_note_before (NOTE_INSN_DELETED, last_insn); @@ -428,9 +428,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes) require a different mode than MODE_EXIT, so if we might have such instructions, keep them in a separate block from pre_exit. */ - if (last_insn != BB_HEAD (src_bb)) - src_bb = split_block (src_bb, - PREV_INSN (before_return_copy))->dest; + src_bb = split_block (src_bb, + PREV_INSN (before_return_copy))->dest; } else before_return_copy = last_insn; |