]> gcc.gnu.org Git - gcc.git/commitdiff
tree-ssa-dom.c (record_equivalences_from_phis): Do not record symbolic equivalences...
authorJeff Law <law@redhat.com>
Tue, 19 Dec 2017 05:04:55 +0000 (22:04 -0700)
committerJeff Law <law@gcc.gnu.org>
Tue, 19 Dec 2017 05:04:55 +0000 (22:04 -0700)
* tree-ssa-dom.c (record_equivalences_from_phis): Do not
record symbolic equivalences from backedges in the CFG.

From-SVN: r255803

gcc/ChangeLog
gcc/tree-ssa-dom.c

index b5854f7a67ce4c14c9a8444dbe4e17d2986e601b..96146e8934f54e21552ed8cb98979d241b6630bf 100644 (file)
@@ -1,5 +1,8 @@
 2017-12-18  Jeff Law  <law@redhat.com>
 
+       * tree-ssa-dom.c (record_equivalences_from_phis): Do not
+       record symbolic equivalences from backedges in the CFG.
+
        Revert
        2017-11-19  Jeff Law  <law@redhat.com>
 
index 05bc807071f8f0c8cf1832af72f02579cf852ec1..663d07b6fe90395b7133208576afe3dadb7051b0 100644 (file)
@@ -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)
This page took 0.102377 seconds and 5 git commands to generate.