summaryrefslogtreecommitdiff
path: root/gcc/tree-complex.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-17 00:56:07 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-17 00:56:07 +0000
commit52966e98d94230ab4d201df34c473141e80f1cca (patch)
tree90d35f461b3e1c2cf5dbcd8e239a2a2aeb507817 /gcc/tree-complex.c
parentc4e602e73fdc694e0821d4e3bc1f542ab09e9e85 (diff)
downloadgcc-52966e98d94230ab4d201df34c473141e80f1cca.tar.gz
PR tree-opt/22022
* tree-complex.c (update_phi_components): Avoid no-op moves. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101121 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-complex.c')
-rw-r--r--gcc/tree-complex.c6
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);