diff options
author | Richard Biener <rguenther@suse.de> | 2013-06-20 10:22:33 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2013-06-20 10:22:33 +0000 |
commit | c3a9b91b4ac1f8304b2ad8b026dc378be662b597 (patch) | |
tree | a318aa77a02219a41545ed33d2b1c50c54ba881a /gcc/tree-ssa-loop-niter.c | |
parent | dd28cdaabf8c87874c9d6722402bd74b641ed38a (diff) | |
download | gcc-c3a9b91b4ac1f8304b2ad8b026dc378be662b597.zip gcc-c3a9b91b4ac1f8304b2ad8b026dc378be662b597.tar.gz gcc-c3a9b91b4ac1f8304b2ad8b026dc378be662b597.tar.bz2 |
re PR tree-optimization/57584 (ice: SSA corruption: Unable to coalesce ssa_names)
2013-06-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/57584
* tree-ssa-loop-niter.c (expand_simple_operations): Avoid including
SSA names into the expanded expression that take part in
abnormal coalescing.
* gcc.dg/torture/pr57584.c: New testcase.
From-SVN: r200237
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index f562930..9d6f9ef 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -1514,6 +1514,13 @@ expand_simple_operations (tree expr) if (gimple_code (stmt) != GIMPLE_ASSIGN) return expr; + /* Avoid expanding to expressions that contain SSA names that need + to take part in abnormal coalescing. */ + ssa_op_iter iter; + FOR_EACH_SSA_TREE_OPERAND (e, stmt, iter, SSA_OP_USE) + if (SSA_NAME_OCCURS_IN_ABNORMAL_PHI (e)) + return expr; + e = gimple_assign_rhs1 (stmt); code = gimple_assign_rhs_code (stmt); if (get_gimple_rhs_class (code) == GIMPLE_SINGLE_RHS) |