summaryrefslogtreecommitdiff
path: root/gcc/regmove.c
diff options
context:
space:
mode:
authorspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-22 06:18:33 +0000
committerspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-22 06:18:33 +0000
commit02f07e876bbbb086765d8dae9e509b082af46018 (patch)
tree403ae4e99ca1f42ff11e7679dee90462b345a543 /gcc/regmove.c
parent0fd26eebeb4bfcd59e0219d40aac8204248f0566 (diff)
downloadgcc-02f07e876bbbb086765d8dae9e509b082af46018.tar.gz
2007-03-21 Seongbae Park <seongbae.park@gmail.com>
* regmove.c (regmove_optimize): Use reg_mentioned_p instead of reg_overlap_mentioned_p for DST. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123124 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/regmove.c')
-rw-r--r--gcc/regmove.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/regmove.c b/gcc/regmove.c
index 4bd5d1da991..3c059f44a78 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -1429,8 +1429,13 @@ regmove_optimize (rtx f, int nregs)
break;
}
+ /* We can't make this change if SRC is read or
+ partially written in P, since we are going to
+ eliminate SRC. We can't make this change
+ if DST is mentioned at all in P,
+ since we are going to change its value. */
if (reg_overlap_mentioned_p (src, PATTERN (p))
- || reg_overlap_mentioned_p (dst, PATTERN (p)))
+ || reg_mentioned_p (dst, PATTERN (p)))
break;
/* If we have passed a call instruction, and the