diff options
Diffstat (limited to 'gcc/tree-ssa-dce.c')
-rw-r--r-- | gcc/tree-ssa-dce.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dce.c b/gcc/tree-ssa-dce.c index 4fd3cd8ad24..22ae50b791c 100644 --- a/gcc/tree-ssa-dce.c +++ b/gcc/tree-ssa-dce.c @@ -574,6 +574,11 @@ mark_aliased_reaching_defs_necessary_1 (ao_ref *ref, tree vdef, void *data) in the references (gcc.c-torture/execute/pr42142.c). The simplest way is to check if the kill dominates the use. */ + /* But when both are in the same block we cannot + easily tell whether we came from a backedge + unless we decide to compute stmt UIDs + (see PR58246). */ + && (basic_block) data != gimple_bb (def_stmt) && dominated_by_p (CDI_DOMINATORS, (basic_block) data, gimple_bb (def_stmt)) && operand_equal_p (ref->ref, lhs, 0)) |