summaryrefslogtreecommitdiff
path: root/gcc/tree-outof-ssa.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-14 20:05:48 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2004-12-14 20:05:48 +0000
commitedf453a8bb4dfd38204b0adcdc22a610304081af (patch)
tree150a2e887208245b695f1a1a1a7b62d90ddff90c /gcc/tree-outof-ssa.c
parent52f14b2c8c8f499152413584724589eb9c86bb20 (diff)
downloadgcc-edf453a8bb4dfd38204b0adcdc22a610304081af.tar.gz
* tree-outof-ssa.c (coalesce_abnormal_edges): Pass the correct target
partition to conflict_graph_merge_regs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@92157 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r--gcc/tree-outof-ssa.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index 621366b85ae..d61acbd0b1d 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -569,7 +569,7 @@ coalesce_abnormal_edges (var_map map, conflict_graph graph, root_var_p rv)
basic_block bb;
edge e;
tree phi, var, tmp;
- int x, y;
+ int x, y, z;
edge_iterator ei;
/* Code cannot be inserted on abnormal edges. Look for all abnormal
@@ -641,8 +641,9 @@ coalesce_abnormal_edges (var_map map, conflict_graph graph, root_var_p rv)
"ABNORMAL: Coalescing ",
var, " and ", tmp);
}
+ z = var_union (map, var, tmp);
#ifdef ENABLE_CHECKING
- if (var_union (map, var, tmp) == NO_PARTITION)
+ if (z == NO_PARTITION)
{
print_exprs_edge (stderr, e, "\nUnable to coalesce",
partition_to_var (map, x), " and ",
@@ -650,9 +651,13 @@ coalesce_abnormal_edges (var_map map, conflict_graph graph, root_var_p rv)
internal_error ("SSA corruption");
}
#else
- gcc_assert (var_union (map, var, tmp) != NO_PARTITION);
+ gcc_assert (z != NO_PARTITION);
#endif
- conflict_graph_merge_regs (graph, x, y);
+ gcc_assert (z == x || z == y);
+ if (z == x)
+ conflict_graph_merge_regs (graph, x, y);
+ else
+ conflict_graph_merge_regs (graph, y, x);
}
}
}