aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorJ"orn Rennecke <joern.rennecke@st.com>2005-09-23 12:05:56 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2005-09-23 13:05:56 +0100
commit9617ccfdc47aeb8e03f7c643df68bde7b06abcdd (patch)
tree23b5a8404a7780586596776a9272a0da25116014 /gcc/optabs.c
parenta9305dcbcbe36527b0d4213fd4e71b56d1c5105d (diff)
downloadgcc-9617ccfdc47aeb8e03f7c643df68bde7b06abcdd.zip
gcc-9617ccfdc47aeb8e03f7c643df68bde7b06abcdd.tar.gz
gcc-9617ccfdc47aeb8e03f7c643df68bde7b06abcdd.tar.bz2
re PR rtl-optimization/23837 (Wrong code with REG_NO_CONFLICT notes (caused by combine))
PR rtl-optimization/23837 * optabs.c (no_conflict_move_test): Don't set must_stay for a clobber / clobber match between dest and p->first. From-SVN: r104562
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index bcb11b5..5da604d 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3021,7 +3021,8 @@ no_conflict_move_test (rtx dest, rtx set, void *p0)
return;
/* If this insn sets / clobbers a register that feeds one of the insns
already in the list, this insn has to stay too. */
- else if (reg_mentioned_p (dest, PATTERN (p->first))
+ else if (reg_overlap_mentioned_p (dest, PATTERN (p->first))
+ || (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. */