diff options
author | Richard Guenther <rguenther@suse.de> | 2009-03-04 23:00:25 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-03-04 23:00:25 +0000 |
commit | b505e785a352b4defd89de198aeeb98d3399a0b1 (patch) | |
tree | 066d9de6b7fa0bee916159c53075b2cc54197628 /gcc/tree-ssa-sccvn.c | |
parent | b78ef3ee2247a1953a4fd6d578613952f572dab7 (diff) | |
download | gcc-b505e785a352b4defd89de198aeeb98d3399a0b1.zip gcc-b505e785a352b4defd89de198aeeb98d3399a0b1.tar.gz gcc-b505e785a352b4defd89de198aeeb98d3399a0b1.tar.bz2 |
re PR tree-optimization/39362 (ICE failing to coalesce ab SSA names)
2009-03-04 Richard Guenther <rguenther@suse.de>
PR tree-optimization/39362
* tree-ssa-sccvn.c (visit_use): Stores and copies from SSA_NAMEs
that occur in abnormal PHIs should be varying.
* g++.dg/torture/pr39362.C: New testcase.
From-SVN: r144626
Diffstat (limited to 'gcc/tree-ssa-sccvn.c')
-rw-r--r-- | gcc/tree-ssa-sccvn.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/gcc/tree-ssa-sccvn.c b/gcc/tree-ssa-sccvn.c index bc4fd7c..dc55676 100644 --- a/gcc/tree-ssa-sccvn.c +++ b/gcc/tree-ssa-sccvn.c @@ -2367,14 +2367,19 @@ visit_use (tree use) VN_INFO (lhs)->expr = NULL_TREE; } - if (TREE_CODE (lhs) == SSA_NAME - /* We can substitute SSA_NAMEs that are live over - abnormal edges with their constant value. */ - && !(gimple_assign_copy_p (stmt) - && is_gimple_min_invariant (gimple_assign_rhs1 (stmt))) - && !(simplified - && is_gimple_min_invariant (simplified)) - && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) + if ((TREE_CODE (lhs) == SSA_NAME + /* We can substitute SSA_NAMEs that are live over + abnormal edges with their constant value. */ + && !(gimple_assign_copy_p (stmt) + && is_gimple_min_invariant (gimple_assign_rhs1 (stmt))) + && !(simplified + && is_gimple_min_invariant (simplified)) + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (lhs)) + /* Stores or copies from SSA_NAMEs that are live over + abnormal edges are a problem. */ + || (gimple_assign_single_p (stmt) + && TREE_CODE (gimple_assign_rhs1 (stmt)) == SSA_NAME + && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (gimple_assign_rhs1 (stmt)))) changed = defs_to_varying (stmt); else if (REFERENCE_CLASS_P (lhs) || DECL_P (lhs)) { |