* simplify-rtx.c (simplify_replace_rtx): Do not blindly replace
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Dec 2004 19:19:04 +0000 (19:19 +0000)
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Dec 2004 19:19:04 +0000 (19:19 +0000)
hard registers.

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

gcc/ChangeLog
gcc/simplify-rtx.c

index b5afd17..24d534b 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-16  Richard Henderson  <rth@redhat.com>
+           Aldy Hernandez  <aldyh@redhat.com>
+
+       * simplify-rtx.c (simplify_replace_rtx): Do not blindly replace
+       hard registers.
+
 2004-12-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR other/18508
index 3685bbf..5feeb65 100644 (file)
@@ -337,7 +337,7 @@ simplify_replace_rtx (rtx x, rtx old_rtx, rtx new_rtx)
        }
       else if (code == REG)
        {
-         if (REG_P (old_rtx) && REGNO (x) == REGNO (old_rtx))
+         if (rtx_equal_p (x, old_rtx))
            return new_rtx;
        }
       break;