diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-10 22:29:14 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-06-10 22:29:14 +0000 |
commit | e1ef2dde318ee17d247ec1b85998008b2c74b549 (patch) | |
tree | 5ded05ecd777bb0523f06bcb3e23afc6d34e4d19 /gcc/simplify-rtx.c | |
parent | 29deee354ac718a3da53ec8e27929f608f1a6e20 (diff) | |
download | gcc-e1ef2dde318ee17d247ec1b85998008b2c74b549.tar.gz |
* simplify-rtx.c (simplify_replace_rtx): Allow replacement
of matching registers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54476 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 5db501eccfc..5a4509c602c 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -349,14 +349,19 @@ 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; } |