]> gcc.gnu.org Git - gcc.git/commitdiff
re PR rtl-optimization/58021 (MODE_EXIT switches at NOTE_INSN_DELETED)
authorJoern Rennecke <joern.rennecke@embecosm.com>
Mon, 29 Jul 2013 22:45:38 +0000 (22:45 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Mon, 29 Jul 2013 22:45:38 +0000 (23:45 +0100)
        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

gcc/ChangeLog
gcc/mode-switching.c

index 6d1fec85f313aeed67d98817ec4f0ce7f3d3ddd3..2d01701c1bbc53dddd7d6ae06276e17c472c0f94 100644 (file)
@@ -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'.
index 8ea8ca35d3c8657278a710488e920c15836f90fb..0d112b19074989f966c457430ede23e7607e2467 100644 (file)
@@ -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;
This page took 0.082343 seconds and 5 git commands to generate.