From 6a5a318da5e1fd349e672984d9f284fd9c56db7f Mon Sep 17 00:00:00 2001 From: law Date: Sat, 5 Mar 2016 05:10:58 +0000 Subject: [PATCH] PR tree-optimization/69196 * tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths): If the both SSA_NAMEs are anonymous, then consider them unassociated and include the PHI in the statement count. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233999 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/tree-ssa-threadbackward.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5c238366354c..09a2714c06a9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2016-03-04 Jeff Law + + PR tree-optimization/69196 + * tree-ssa-threadbackward.c (fsm_find_control_statement_thread_paths): + If the both SSA_NAMEs are anonymous, then consider them unassociated + and include the PHI in the statement count. + 2016-03-05 Tom de Vries * omp-low.c (check_omp_nesting_restrictions): Check for non-oacc diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c index 747296bff364..6f1b7573e5d1 100644 --- a/gcc/tree-ssa-threadbackward.c +++ b/gcc/tree-ssa-threadbackward.c @@ -311,7 +311,11 @@ fsm_find_control_statement_thread_paths (tree name, gphi *phi = gsip.phi (); tree dst = gimple_phi_result (phi); - if (SSA_NAME_VAR (dst) != SSA_NAME_VAR (name) + /* Note that if both NAME and DST are anonymous + SSA_NAMEs, then we do not have enough information + to consider them associated. */ + if ((SSA_NAME_VAR (dst) != SSA_NAME_VAR (name) + || !SSA_NAME_VAR (dst)) && !virtual_operand_p (dst)) ++n_insns; } -- 2.47.3