aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2017-12-18 22:04:55 -0700
committerJeff Law <law@gcc.gnu.org>2017-12-18 22:04:55 -0700
commit6e02c507cc780dc0902c2cdabb22519c20c8145d (patch)
treedb77f80368a798224438bbec0be608f935b85cf7 /gcc/tree-ssa-dom.c
parent129b5668f18f6d4bc40a21566f75bdc280c594ea (diff)
downloadgcc-6e02c507cc780dc0902c2cdabb22519c20c8145d.zip
gcc-6e02c507cc780dc0902c2cdabb22519c20c8145d.tar.gz
gcc-6e02c507cc780dc0902c2cdabb22519c20c8145d.tar.bz2
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
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 05bc807..663d07b 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)