From bc36c711daea959554c32389a1b28da682257b38 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 29 Apr 2017 18:17:13 +0200 Subject: [PATCH] re PR rtl-optimization/80491 (Compiler regression for long-add case.) PR rtl-optimization/80491 * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs. From-SVN: r247409 --- gcc/ChangeLog | 5 +++++ gcc/alias.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e3474701d5..9a9d192d01a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-04-29 Jakub Jelinek + + PR rtl-optimization/80491 + * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs. + 2017-04-29 Marc Glisse PR tree-optimization/80487 diff --git a/gcc/alias.c b/gcc/alias.c index e16e3501522..cff4fac26ed 100644 --- a/gcc/alias.c +++ b/gcc/alias.c @@ -3221,6 +3221,10 @@ memory_modified_in_insn_p (const_rtx mem, const_rtx insn) { if (!INSN_P (insn)) return false; + /* Conservatively assume all non-readonly MEMs might be modified in + calls. */ + if (CALL_P (insn)) + return true; memory_modified = false; note_stores (PATTERN (insn), memory_modified_1, CONST_CAST_RTX(mem)); return memory_modified; -- 2.30.2