simplify-rtx.c (simplify_replace_rtx): Allow replacement of matching registers.

* simplify-rtx.c (simplify_replace_rtx): Allow replacement
	of matching registers.

From-SVN: r54476
This commit is contained in:
Roger Sayle 2002-06-10 22:29:14 +00:00 committed by Roger Sayle
parent 9543a9d2d4
commit 60c86d4ee9
2 changed files with 16 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2002-06-10 Roger Sayle <roger@eyesopen.com>
* simplify-rtx.c (simplify_replace_rtx): Allow replacement
of matching registers.
2002-06-10 Roger Sayle <roger@eyesopen.com>
* toplev.c (rest_of_compilation): Disable early if-conversion pass.

View File

@ -349,13 +349,18 @@ simplify_replace_rtx (x, old, new)
}
return x;
default:
if (GET_CODE (x) == MEM)
return
replace_equiv_address_nv (x,
simplify_replace_rtx (XEXP (x, 0),
old, new));
case 'o':
if (code == MEM)
return replace_equiv_address_nv (x,
simplify_replace_rtx (XEXP (x, 0),
old, new));
if (REG_P (x) && REG_P (old) && REGNO (x) == REGNO (old))
return new;
return x;
default:
return x;
}
return x;