Skip to content

Commit

Permalink
Merged from mainline:
Browse files Browse the repository at this point in the history
        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

Conflicts:
	gcc/ChangeLog
  • Loading branch information
amylaar authored and amylaar committed Jul 29, 2013
1 parent 8b7442b commit be9ae52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 4 additions & 0 deletions gcc/ChangeLog.epiphany
Expand Up @@ -10,6 +10,10 @@
testsuite:
* gcc.dg/tree-ssa/pr44258.c: Disable scan test for Epiphany.

PR rtl-optimization/58021
* mode-switching.c (create_pre_exit): Always split off
preceding insns if we are not at the basic block head.

2013-07-27 Joern Rennecke <joern.rennecke@embecosm.com>

merged from trunk:
Expand Down
7 changes: 3 additions & 4 deletions gcc/mode-switching.c
Expand Up @@ -420,17 +420,16 @@ 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);
/* Instructions preceding LAST_INSN in the same block might
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;
Expand Down

0 comments on commit be9ae52

Please sign in to comment.