From d51283e36424d4c473746cb6bfbdcbfc38b83571 Mon Sep 17 00:00:00 2001 From: rguenth Date: Thu, 20 Jun 2013 10:22:33 +0000 Subject: 2013-06-20 Richard Biener 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@200237 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/tree-ssa-loop-niter.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'gcc/tree-ssa-loop-niter.c') diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index f5629306e4b..9d6f9efb089 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) -- cgit v1.2.3