summaryrefslogtreecommitdiff
path: root/gcc/df-problems.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-08 18:00:10 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-01-08 18:00:10 +0000
commitbbfdbc02709342c0048d73be7c5d8110c576cb2b (patch)
treefb756f10444e5e6416cb8b94e292ce75b17b24f4 /gcc/df-problems.c
parent501336f7ede14521a9ce947f4dd924acf455446c (diff)
downloadgcc-bbfdbc02709342c0048d73be7c5d8110c576cb2b.tar.gz
PR rtl-optimization/55845
* df-problems.c (can_move_insns_across): Stop scanning at volatile_insn_p source instruction or give up if across_from .. across_to range contains any volatile_insn_p instructions. * gcc.target/i386/pr55845.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@195028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df-problems.c')
-rw-r--r--gcc/df-problems.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/df-problems.c b/gcc/df-problems.c
index 89a6189325f..0af593d6c97 100644
--- a/gcc/df-problems.c
+++ b/gcc/df-problems.c
@@ -1,6 +1,6 @@
/* Standard problems for dataflow support routines.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc.
Originally contributed by Michael P. Hayes
(m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
Major rewrite contributed by Danny Berlin (dberlin@dberlin.org)
@@ -3858,6 +3858,8 @@ can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to,
}
if (NONDEBUG_INSN_P (insn))
{
+ if (volatile_insn_p (PATTERN (insn)))
+ return false;
memrefs_in_across |= for_each_rtx (&PATTERN (insn), find_memory,
NULL);
note_stores (PATTERN (insn), find_memory_stores,
@@ -3917,7 +3919,9 @@ can_move_insns_across (rtx from, rtx to, rtx across_from, rtx across_to,
if (NONDEBUG_INSN_P (insn))
{
if (may_trap_or_fault_p (PATTERN (insn))
- && (trapping_insns_in_across || other_branch_live != NULL))
+ && (trapping_insns_in_across
+ || other_branch_live != NULL
+ || volatile_insn_p (PATTERN (insn))))
break;
/* We cannot move memory stores past each other, or move memory