From 6e02c507cc780dc0902c2cdabb22519c20c8145d Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Mon, 18 Dec 2017 22:04:55 -0700 Subject: [PATCH] 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 --- gcc/ChangeLog | 3 +++ gcc/tree-ssa-dom.c | 6 ++++++ 2 files changed, 9 insertions(+) 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) -- 2.30.2