From c87cc0c01e374c992d4085990bb0f65fbaf33128 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Fri, 22 Feb 2019 17:56:59 +0000 Subject: [PATCH] re PR tree-optimization/87609 (miscompilation with restrict and loop) 2019-02-22 Richard Biener PR tree-optimization/87609 * tree-cfg.c (gimple_duplicate_bb): Only remap inlined cliques. From-SVN: r269127 --- gcc/ChangeLog | 5 +++++ gcc/tree-cfg.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 64dcda2560f..8d5698750ab 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-02-22 Richard Biener + + PR tree-optimization/87609 + * tree-cfg.c (gimple_duplicate_bb): Only remap inlined cliques. + 2019-02-22 Jeff Law PR rtl-optimization/87761 diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index eac70274c17..088fc7b47df 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -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