This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix PR53908
- From: Bernd Schmidt <bernds at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Wed, 11 Jul 2012 13:24:46 +0200
- Subject: Fix PR53908
We're moving a load across a call since we don't recognize calls as
memory-clobbering.
Bootstrapping and testing now on 4.7 x86_64-linux, ok everywhere?
Bernd
PR rtl-optimization/53908
* df-problems.c (can_move_insns_across): Calls can clobber memory.
Index: gcc/df-problems.c
===================================================================
--- gcc/df-problems.c (revision 189425)
+++ gcc/df-problems.c (working copy)
@@ -3961,6 +3961,11 @@ can_move_insns_across (rtx from, rtx to,
for (insn = across_to; ; insn = next)
{
+ if (CALL_P (insn))
+ {
+ memrefs_in_across |= MEMREF_VOLATILE;
+ mem_sets_in_across |= MEMREF_VOLATILE;
+ }
if (NONDEBUG_INSN_P (insn))
{
memrefs_in_across |= for_each_rtx (&PATTERN (insn), find_memory,