aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadbackward.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-03-04 22:10:58 -0700
committerJeff Law <law@gcc.gnu.org>2016-03-04 22:10:58 -0700
commit5c03c4211d2a631d568237c36689b3826e4ac5b7 (patch)
treee146733a0f01c7eb29a80464e14089f47bc727d2 /gcc/tree-ssa-threadbackward.c
parent640b7e74399b5875a0489281ea69a8779a2b1c29 (diff)
downloadgcc-5c03c4211d2a631d568237c36689b3826e4ac5b7.zip
gcc-5c03c4211d2a631d568237c36689b3826e4ac5b7.tar.gz
gcc-5c03c4211d2a631d568237c36689b3826e4ac5b7.tar.bz2
re PR tree-optimization/69196 (code size regression with jump threading at -O2)
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. From-SVN: r233999
Diffstat (limited to 'gcc/tree-ssa-threadbackward.c')
-rw-r--r--gcc/tree-ssa-threadbackward.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-ssa-threadbackward.c b/gcc/tree-ssa-threadbackward.c
index 747296b..6f1b757 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;
}