aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2013-07-29 22:45:38 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2013-07-29 23:45:38 +0100
commitbba332115892c0ba2eb3748b9ea80c90a0e4a237 (patch)
tree94703f6d865b5c862c8f5aea9eefd59bc4d7e5dd
parente137912234fc9056a3898870f5e4826614df094a (diff)
downloadgcc-bba332115892c0ba2eb3748b9ea80c90a0e4a237.zip
gcc-bba332115892c0ba2eb3748b9ea80c90a0e4a237.tar.gz
gcc-bba332115892c0ba2eb3748b9ea80c90a0e4a237.tar.bz2
re PR rtl-optimization/58021 (MODE_EXIT switches at NOTE_INSN_DELETED)
PR rtl-optimization/58021 * mode-switching.c (create_pre_exit): Always split off preceding insns if we are not at the basic block head. From-SVN: r201321
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/mode-switching.c7
2 files changed, 7 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6d1fec8..2d01701 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -6,6 +6,10 @@
* predicates.md (float_operation): Allow patterns with three
basic sub-patterns.
+ 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-29 Maciej W. Rozycki <macro@codesourcery.com>
* config/mips/linux.h (GLIBC_DYNAMIC_LINKER): Handle `-mnan=2008'.
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index 8ea8ca3..0d112b1 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;