diff options
Diffstat (limited to 'gcc/tree-ssa-copyrename.c')
-rw-r--r-- | gcc/tree-ssa-copyrename.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gcc/tree-ssa-copyrename.c b/gcc/tree-ssa-copyrename.c index 4cde3d4bccd..ed95b5bebd3 100644 --- a/gcc/tree-ssa-copyrename.c +++ b/gcc/tree-ssa-copyrename.c @@ -354,9 +354,8 @@ rename_ssa_copies (void) for (i = 0; i < gimple_phi_num_args (phi); i++) { GimpleValue arg = PHI_ARG_DEF (phi, i); - if (arg.code () == SSA_NAME) - copy_rename_partition_coalesce (map, res, arg, - debug); + if (SSADecl name = arg.as_a<SSADecl>()) + copy_rename_partition_coalesce (map, res, name, debug); } /* Else if all arguments are in the same partition try to merge it with the result. */ @@ -367,14 +366,8 @@ rename_ssa_copies (void) for (i = 0; i < gimple_phi_num_args (phi); i++) { GimpleValue arg = PHI_ARG_DEF (phi, i); - if (arg.code() != SSA_NAME) + if (SSADecl name = arg.as_a<SSADecl>()) { - all_p_same = 0; - break; - } - else - { - SSADecl name = arg; if (all_p_same == -1) { p = partition_find (map->var_partition, @@ -389,6 +382,11 @@ rename_ssa_copies (void) break; } } + else + { + all_p_same = 0; + break; + } } if (all_p_same == 1) copy_rename_partition_coalesce (map, res, |