From: Seongbae Park Date: Thu, 22 Mar 2007 06:18:33 +0000 (+0000) Subject: regmove.c (regmove_optimize): Use reg_mentioned_p instead of reg_overlap_mentioned_p... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e4c6dc5b92081004ecabe34f4e76c2a1e97cdce;p=gcc.git regmove.c (regmove_optimize): Use reg_mentioned_p instead of reg_overlap_mentioned_p for DST. 2007-03-21 Seongbae Park * regmove.c (regmove_optimize): Use reg_mentioned_p instead of reg_overlap_mentioned_p for DST. From-SVN: r123124 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 219b7131c5c..84cd54419c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2007-03-21 Seongbae Park + + * regmove.c (regmove_optimize): Use reg_mentioned_p + instead of reg_overlap_mentioned_p for DST. + 2007-03-21 Mike Stump * c.opt: Fixup for Objective-C/C++. 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