]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2008-10-15 Jan Hubicka <jh@suse.cz>
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 2008 01:29:14 +0000 (01:29 +0000)
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Oct 2008 01:29:14 +0000 (01:29 +0000)
* ira-emit.c (change_regs): Return false when replacing reg by
itself.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141163 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/ira-emit.c

index ccdc92ed986748a96a34939419f058e2226ef915..c3d2d9f1d453b71f33546fefeffa87ef6133703f 100644 (file)
@@ -1,3 +1,8 @@
+2008-10-15  Jan Hubicka  <jh@suse.cz>
+
+       * ira-emit.c (change_regs): Return false when replacing reg by
+       itself.
+
 2008-10-14  Vladimir Makarov  <vmakarov@redhat.com>
 
        PR target/37633
index 7fdaefb52e54d0dde5907fdcd01e6314e3347ef5..a6a7582f519a83edb49d54819a3db1934494566e 100644 (file)
@@ -137,6 +137,7 @@ change_regs (rtx *loc)
   int i, regno, result = false;
   const char *fmt;
   enum rtx_code code;
+  rtx reg;
 
   if (*loc == NULL_RTX)
     return false;
@@ -151,7 +152,10 @@ change_regs (rtx *loc)
        return false;
       if (ira_curr_regno_allocno_map[regno] == NULL)
        return false;
-      *loc = ALLOCNO_REG (ira_curr_regno_allocno_map[regno]);
+      reg = ALLOCNO_REG (ira_curr_regno_allocno_map[regno]);
+      if (reg == *loc)
+       return false;
+      *loc = reg;
       return true;
     }