re PR tree-optimization/87609 (miscompilation with restrict and loop)
authorRichard Biener <rguenther@suse.de>
Fri, 22 Feb 2019 17:56:59 +0000 (17:56 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 22 Feb 2019 17:56:59 +0000 (17:56 +0000)
2019-02-22  Richard Biener  <rguenther@suse.de>

PR tree-optimization/87609
* tree-cfg.c (gimple_duplicate_bb): Only remap inlined cliques.

From-SVN: r269127

gcc/ChangeLog
gcc/tree-cfg.c

index 64dcda2560f3deea241e84a4784d687bd60f1e20..8d5698750aba961e166d68ac8ecf6706cd395b82 100644 (file)
@@ -1,3 +1,8 @@
+2019-02-22  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/87609
+       * tree-cfg.c (gimple_duplicate_bb): Only remap inlined cliques.
+
 2019-02-22  Jeff Law  <law@redhat.com>
 
        PR rtl-optimization/87761
index eac70274c171cf3e25c7638666cf51e7464cad16..088fc7b47dfeb1c3e0e0f4d6c2a888e54997fb24 100644 (file)
@@ -6229,6 +6229,8 @@ gimple_duplicate_bb (basic_block bb, copy_bb_data *id)
            DECL_NONSHAREABLE (base) = 1;
        }
  
+      /* If requested remap dependence info of cliques brought in
+         via inlining.  */
       if (id)
        for (unsigned i = 0; i < gimple_num_ops (copy); ++i)
          {
@@ -6242,7 +6244,7 @@ gimple_duplicate_bb (basic_block bb, copy_bb_data *id)
              op = TREE_OPERAND (op, 0);
            if ((TREE_CODE (op) == MEM_REF
                 || TREE_CODE (op) == TARGET_MEM_REF)
-               && MR_DEPENDENCE_CLIQUE (op) != 0)
+               && MR_DEPENDENCE_CLIQUE (op) > 1)
              {
                if (!id->dependence_map)
                  id->dependence_map = new hash_map<dependence_hash,