[gcc(refs/users/rguenth/heads/slp-reorg)] tree-optimization/94266 - aovid propagating addresses of TARGET_MEM_REFs

Richard Biener rguenth@gcc.gnu.org
Mon Mar 23 16:00:13 GMT 2020


https://gcc.gnu.org/g:263ee1260bc4017465a8ef722889ccc59fcee0d2

commit 263ee1260bc4017465a8ef722889ccc59fcee0d2
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Mar 23 10:38:57 2020 +0100

    tree-optimization/94266 - aovid propagating addresses of TARGET_MEM_REFs
    
    2020-03-23  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/94266
            * tree-ssa-forwprop.c (pass_forwprop::execute): Do not propagate
            addresses of TARGET_MEM_REFs.
     Please enter the commit message for your changes. Lines starting

Diff:
---
 gcc/ChangeLog           | 6 ++++++
 gcc/tree-ssa-forwprop.c | 1 +
 2 files changed, 7 insertions(+)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 6ba82946a50..5df915d7800 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2020-03-23  Richard Biener  <rguenther@suse.de>
+
+	PR tree-optimization/94266
+	* tree-ssa-forwprop.c (pass_forwprop::execute): Do not propagate
+	addresses of TARGET_MEM_REFs.
+
 2020-03-23  Martin Liska  <mliska@suse.cz>
 
 	PR ipa/94250
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 61b4eec271b..234c1f7dd7d 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -2712,6 +2712,7 @@ pass_forwprop::execute (function *fun)
 	      if ((!base
 		   || !DECL_P (base)
 		   || decl_address_invariant_p (base))
+		  && TREE_CODE (base) != TARGET_MEM_REF
 		  && !stmt_references_abnormal_ssa_name (stmt)
 		  && forward_propagate_addr_expr (lhs, rhs, true))
 		{


More information about the Gcc-cvs mailing list