From: Jeff Law Date: Tue, 19 Dec 2017 05:04:55 +0000 (-0700) Subject: tree-ssa-dom.c (record_equivalences_from_phis): Do not record symbolic equivalences... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6e02c507cc780dc0902c2cdabb22519c20c8145d;p=gcc.git tree-ssa-dom.c (record_equivalences_from_phis): Do not record symbolic equivalences from backedges in the CFG. * tree-ssa-dom.c (record_equivalences_from_phis): Do not record symbolic equivalences from backedges in the CFG. From-SVN: r255803 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b5854f7a67c..96146e8934f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2017-12-18 Jeff Law + * tree-ssa-dom.c (record_equivalences_from_phis): Do not + record symbolic equivalences from backedges in the CFG. + Revert 2017-11-19 Jeff Law diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c index 05bc807071f..663d07b6fe9 100644 --- a/gcc/tree-ssa-dom.c +++ b/gcc/tree-ssa-dom.c @@ -1126,6 +1126,12 @@ record_equivalences_from_phis (basic_block bb) t = dom_valueize (t); + /* If T is an SSA_NAME and its associated edge is a backedge, + then quit as we can not utilize this equivalence. */ + if (TREE_CODE (t) == SSA_NAME + && (gimple_phi_arg_edge (phi, i)->flags & EDGE_DFS_BACK)) + break; + /* If we have not processed an alternative yet, then set RHS to this alternative. */ if (rhs == NULL)