diff options
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r-- | gcc/tree-complex.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index a4c7329d3dd..a3470b1b7b6 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -577,6 +577,12 @@ update_phi_components (basic_block bb) tree arg = PHI_ARG_DEF (phi, i); tree r, i; + /* Avoid no-op assignments. This also prevents insertting stmts + onto abnormal edges, assuming the PHI isn't already broken. */ + if (TREE_CODE (arg) == SSA_NAME + && SSA_NAME_VAR (arg) == SSA_NAME_VAR (lhs)) + continue; + r = extract_component (NULL, arg, 0, false); i = extract_component (NULL, arg, 1, false); update_complex_components_on_edge (e, NULL, lhs, r, i); |