diff options
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 49225d09b20..4ef5b3dbd1c 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -261,6 +261,18 @@ copy_rename_partition_coalesce (var_map map, tree var1, tree var2, FILE *debug) return; } + /* Don't coalesce if the aliasing sets of the types are different. */ + if (POINTER_TYPE_P (TREE_TYPE (root1)) + && POINTER_TYPE_P (TREE_TYPE (root2)) + && get_alias_set (TREE_TYPE (TREE_TYPE (root1))) + != get_alias_set (TREE_TYPE (TREE_TYPE (root2)))) + { + if (debug) + fprintf (debug, " : 2 different alasing sets. No coalesce.\n"); + return; + } + + /* Merge the two partitions. */ p3 = partition_union (map->var_partition, p1, p2); |