tree-optimization/94266 - aovid propagating addresses of TARGET_MEM_REFs
authorRichard Biener <rguenther@suse.de>
Mon, 23 Mar 2020 09:38:57 +0000 (10:38 +0100)
committerRichard Biener <rguenther@suse.de>
Mon, 23 Mar 2020 09:39:33 +0000 (10:39 +0100)
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

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

index 6ba82946a50a032faf924c9bf21bfeff621380a6..5df915d78003bb645be62c4ac11a6245f8e7b765 100644 (file)
@@ -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
index 61b4eec271b3557f2edc58fb9c12ee6e4fa3966e..234c1f7dd7d519c97eade5bd09ee93deaa041bcd 100644 (file)
@@ -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))
                {