summaryrefslogtreecommitdiff
path: root/gcc/simplify-rtx.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-12 17:47:23 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-12 17:47:23 +0000
commitfb754572ac5c1a0231033e64ed2836c570f79a5a (patch)
treeda0bb5304769685c4a8ebc749d05dcdc5035a828 /gcc/simplify-rtx.c
parent27e0321aadb8c2c656af795612836cf896f0557d (diff)
downloadgcc-fb754572ac5c1a0231033e64ed2836c570f79a5a.tar.gz
2009-10-12 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 152672 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@152678 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r--gcc/simplify-rtx.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 0450ea083f4..4e87d04abaf 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -365,8 +365,8 @@ simplify_replace_rtx (rtx x, const_rtx old_rtx, rtx new_rtx)
to build a new expression substituting recursively. If we can't do
anything, return our input. */
- if (x == old_rtx)
- return new_rtx;
+ if (rtx_equal_p (x, old_rtx))
+ return copy_rtx (new_rtx);
switch (GET_RTX_CLASS (code))
{
@@ -445,11 +445,6 @@ simplify_replace_rtx (rtx x, const_rtx old_rtx, rtx new_rtx)
return x;
return gen_rtx_LO_SUM (mode, op0, op1);
}
- else if (code == REG)
- {
- if (rtx_equal_p (x, old_rtx))
- return new_rtx;
- }
break;
default: