]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/61919 (FAIL: gfortran.dg/fmt_g0_6.f08 -O2 execution test)
authorRichard Sandiford <rdsandiford@googlemail.com>
Mon, 28 Jul 2014 08:41:34 +0000 (08:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 28 Jul 2014 08:41:34 +0000 (08:41 +0000)
gcc/
PR middle-end/61919
* tree-outof-ssa.c (insert_partition_copy_on_edge)
(insert_value_copy_on_edge, insert_rtx_to_part_on_edge)
(insert_part_to_rtx_on_edge): Copy partition_to_pseudo rtxes before
inserting them in the insn stream.

From-SVN: r213116

gcc/ChangeLog
gcc/tree-outof-ssa.c

index 2ad6f4be3f125e06d774b2a0db884ee65d2abf81..56d3b250a03163bad30ca7278c84edc2032c0df6 100644 (file)
@@ -1,3 +1,11 @@
+2014-07-28  Richard Sandiford  <rdsandiford@googlemail.com>
+
+       PR middle-end/61919
+       * tree-outof-ssa.c (insert_partition_copy_on_edge)
+       (insert_value_copy_on_edge, insert_rtx_to_part_on_edge)
+       (insert_part_to_rtx_on_edge): Copy partition_to_pseudo rtxes before
+       inserting them in the insn stream.
+
 2014-07-28  Marek Polacek  <polacek@redhat.com>
 
        PR middle-end/61913
index d5a635bc6233e262ceb18597ea6899ffbb635f3b..88aff5ca554d58cee8d86348c87ae1b57f91cca5 100644 (file)
@@ -260,8 +260,8 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
     set_curr_insn_location (locus);
 
   var = partition_to_var (SA.map, src);
-  seq = emit_partition_copy (SA.partition_to_pseudo[dest],
-                            SA.partition_to_pseudo[src],
+  seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
+                            copy_rtx (SA.partition_to_pseudo[src]),
                             TYPE_UNSIGNED (TREE_TYPE (var)),
                             var);
 
@@ -274,7 +274,7 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
 static void
 insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
 {
-  rtx seq, x;
+  rtx dest_rtx, seq, x;
   enum machine_mode dest_mode, src_mode;
   int unsignedp;
   tree var;
@@ -289,7 +289,8 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
       fprintf (dump_file, "\n");
     }
 
-  gcc_assert (SA.partition_to_pseudo[dest]);
+  dest_rtx = copy_rtx (SA.partition_to_pseudo[dest]);
+  gcc_assert (dest_rtx);
 
   set_location_for_edge (e);
   /* If a locus is provided, override the default.  */
@@ -300,9 +301,9 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
 
   var = SSA_NAME_VAR (partition_to_var (SA.map, dest));
   src_mode = TYPE_MODE (TREE_TYPE (src));
-  dest_mode = GET_MODE (SA.partition_to_pseudo[dest]);
+  dest_mode = GET_MODE (dest_rtx);
   gcc_assert (src_mode == TYPE_MODE (TREE_TYPE (var)));
-  gcc_assert (!REG_P (SA.partition_to_pseudo[dest])
+  gcc_assert (!REG_P (dest_rtx)
              || dest_mode == promote_decl_mode (var, &unsignedp));
 
   if (src_mode != dest_mode)
@@ -312,15 +313,14 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
     }
   else if (src_mode == BLKmode)
     {
-      x = SA.partition_to_pseudo[dest];
+      x = dest_rtx;
       store_expr (src, x, 0, false);
     }
   else
-    x = expand_expr (src, SA.partition_to_pseudo[dest],
-                    dest_mode, EXPAND_NORMAL);
+    x = expand_expr (src, dest_rtx, dest_mode, EXPAND_NORMAL);
 
-  if (x != SA.partition_to_pseudo[dest])
-    emit_move_insn (SA.partition_to_pseudo[dest], x);
+  if (x != dest_rtx)
+    emit_move_insn (dest_rtx, x);
   seq = get_insns ();
   end_sequence ();
 
@@ -356,7 +356,7 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
      mems.  Usually we give the source.  As we result from SSA names
      the left and right size should be the same (and no WITH_SIZE_EXPR
      involved), so it doesn't matter.  */
-  seq = emit_partition_copy (SA.partition_to_pseudo[dest],
+  seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
                             src, unsignedsrcp,
                             partition_to_var (SA.map, dest));
 
@@ -390,7 +390,7 @@ insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus)
 
   var = partition_to_var (SA.map, src);
   seq = emit_partition_copy (dest,
-                            SA.partition_to_pseudo[src],
+                            copy_rtx (SA.partition_to_pseudo[src]),
                             TYPE_UNSIGNED (TREE_TYPE (var)),
                             var);