diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 17 |
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5b4b671..8d45988 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 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. * gcse.c (bypass_conditional_jumps): Fix typo in setcc test. diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 5db501e..5a4509c 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; } |