summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-27 21:09:28 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2005-09-27 21:09:28 +0000
commitc0edfcc4dff63bcbbfdb726a7e1f36fd42c53c3c (patch)
tree0c91c9696e61dce79382b8d1c685a31b922c6dda /gcc
parentf812daaa13b06de601680b2246bfc021458d7cac (diff)
downloadgcc-c0edfcc4dff63bcbbfdb726a7e1f36fd42c53c3c.tar.gz
* optabs.c (no_conflict_move_test): Check if a result of a
to-be-moved insn would be clobbered by an originally preceding insn. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104709 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/optabs.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index fd231baa496..d1db15ee091 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-09-27 J"orn Rennecke <joern.rennecke@st.com>
+
+ * optabs.c (no_conflict_move_test): Check if a result of a
+ to-be-moved insn would be clobbered by an originally
+ preceding insn.
+
2005-09-27 Jeff Law <law@redhat.com>
* passes.c (init_optimization_passes): Replace copy propagation
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 7ca39167390..31212cbc007 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3026,10 +3026,16 @@ no_conflict_move_test (rtx dest, rtx set, void *p0)
|| (CALL_P (p->first) && (find_reg_fusage (p->first, USE, dest)))
|| reg_used_between_p (dest, p->first, p->insn)
/* Likewise if this insn depends on a register set by a previous
- insn in the list. */
+ insn in the list, or if it sets a result (presumably a hard
+ register) that is set or clobbered by a previous insn.
+ N.B. the modified_*_p (SET_DEST...) tests applied to a MEM
+ SET_DEST perform the former check on the address, and the latter
+ check on the MEM. */
|| (GET_CODE (set) == SET
&& (modified_in_p (SET_SRC (set), p->first)
- || modified_between_p (SET_SRC (set), p->first, p->insn))))
+ || modified_in_p (SET_DEST (set), p->first)
+ || modified_between_p (SET_SRC (set), p->first, p->insn)
+ || modified_between_p (SET_DEST (set), p->first, p->insn))))
p->must_stay = true;
}