OSDN Git Service

2007-03-21 Seongbae Park <seongbae.park@gmail.com>
authorspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Mar 2007 06:18:33 +0000 (06:18 +0000)
committerspark <spark@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Mar 2007 06:18:33 +0000 (06:18 +0000)
* 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

gcc/ChangeLog
gcc/regmove.c

index 219b713..84cd544 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 2007-03-21  Mike Stump  <mrs@apple.com>
 
        * c.opt: Fixup for Objective-C/C++.
index 4bd5d1d..3c059f4 100644 (file)
@@ -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