]> gcc.gnu.org Git - gcc.git/commitdiff
re PR rtl-optimization/57968 (MODE_EXIT switches inserted too early)
authorJoern Rennecke <joern.rennecke@embecosm.com>
Wed, 24 Jul 2013 20:12:49 +0000 (20:12 +0000)
committerJoern Rennecke <amylaar@gcc.gnu.org>
Wed, 24 Jul 2013 20:12:49 +0000 (21:12 +0100)
        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.

From-SVN: r201225

gcc/ChangeLog
gcc/mode-switching.c

index 11a48301cb1ce9493ce3a551387e012cd020e249..02770542687864f328053086ca8d8c6d903ed12a 100644 (file)
@@ -1,3 +1,9 @@
+2013-07-24  Joern Rennecke  <joern.rennecke@embecosm.com>
+
+       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.
+
 2013-07-24  Bill Schmidt  <wschmidt@vnet.linux.ibm.com>
            Anton Blanchard <anton@au1.ibm.com>
 
index 70a77d081a47cf89998d32f0cccbf250485d3194..8ea8ca35d3c8657278a710488e920c15836f90fb 100644 (file)
@@ -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)
This page took 0.083314 seconds and 5 git commands to generate.