Per Richi's request use OEP_ADDRESS_OF in the call to operand_equal_p. Bootstrapped and regression tested on x86_64-linux-gnu. Installed on the trunk.

jeff
commit 9715bea8d2c2a8332acca572afdd6c0403e677a9
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Feb 23 21:43:03 2017 +0000

        PR tree-optimization/79578
        * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
        in call to operand_equal_p.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245688 
138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d003ab1..37ae06a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2017-02-23  Jeff Law  <l...@redhat.com>
+
+       PR tree-optimization/79578
+       * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
+       in call to operand_equal_p.
+
 2017-01-23  Dominique d'Humieres  <domi...@lps.ens.fr>
 
        PR target/71017
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index a82e164..53feaf3 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -176,7 +176,7 @@ clear_bytes_written_by (sbitmap live_bytes, gimple *stmt, 
ao_ref *ref)
   /* Verify we have the same base memory address, the write
      has a known size and overlaps with REF.  */
   if (valid_ao_ref_for_dse (&write)
-      && operand_equal_p (write.base, ref->base, 0)
+      && operand_equal_p (write.base, ref->base, OEP_ADDRESS_OF)
       && write.size == write.max_size
       && ((write.offset < ref->offset
           && write.offset + write.size > ref->offset)

Reply via email to