diff mbox

Add missing equivalence unwinding markers

Message ID 12a2bede-7cec-373d-3e09-bb5c3ce402a0@redhat.com
State New
Headers show

Commit Message

Jeff Law May 12, 2017, 5:35 p.m. UTC
This was just something I noted while poking around.  I forgot to push 
the table unwinding markers in the newly added VRP dominator walk for 
threading.

This never generates incorrect code, but can result in failing to catch 
some jump threads as seen by the change in ssa-dom-thread-4.c.

Bootstrapped and regression tested on x86_64.  I would not expect this 
to impact the expected results for this test on logical_op_short_circuit 
targets as they were already fully threading during VRP1.

Installing on the trunk.

Jeff
commit ea442cbcd5b2ac7a656d96052c19290e113ee335
Author: Jeff Law <law@redhat.com>
Date:   Fri May 12 11:30:58 2017 -0600

            * tree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding
            markers.
    
            * g++.dg/tree-ssa/ssa-dom-thread-4.c: Update expected output.
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 197c75b1ace..6cd066691b3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@ 
+2017-05-12  Jeff Law  <law@redhat.com>
+
+	* tree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding
+	markers.
+
 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
 
 	PR middle-end/80707
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 28664c78cdb..d3797eb21b4 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@ 
+2017-05-12  Jeff Law  <law@redhat.com>
+
+	* g++.dg/tree-ssa/ssa-dom-thread-4.c: Update expected output.
+
 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
 
 	PR middle-end/80707
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
index ed76e8119ad..e13eb8673dd 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
@@ -57,12 +57,8 @@  bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b,
    we should thread all three, but due to a bug in the threading
    code we missed the edge when the first conditional is false
    (b_elt is zero, which means the second conditional is always
-   zero.  
-
-   The first two are caught by VRP1, the last is caught by DOM
-   along with another jump thread.  */
-/* { dg-final { scan-tree-dump-times "Threaded" 2 "vrp1" { target { ! logical_op_short_circuit } } } } */
-/* { dg-final { scan-tree-dump-times "Threaded" 2 "dom2" { target { ! logical_op_short_circuit } } } } */
+   zero.  VRP1 catches all three.  */
+/* { dg-final { scan-tree-dump-times "Threaded" 3 "vrp1" { target { ! logical_op_short_circuit } } } } */
 
 /* On targets that define LOGICAL_OP_NON_SHORT_CIRCUIT to 0, we split both
    "a_elt || b_elt" and "b_elt && kill_elt" into two conditions each,
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 0db8a3c3969..b8cb887cb39 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -10540,6 +10540,8 @@  vrp_dom_walker::before_dom_children (basic_block bb)
 {
   gimple_stmt_iterator gsi;
 
+  m_avail_exprs_stack->push_marker ();
+  m_const_and_copies->push_marker ();
   for (gsi = gsi_start_nondebug_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
     {
       gimple *stmt = gsi_stmt (gsi);