aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2002-06-10 22:29:14 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2002-06-10 22:29:14 +0000
commit60c86d4ee9e3256c02296b8953c5416decac0e1c (patch)
tree5ded05ecd777bb0523f06bcb3e23afc6d34e4d19 /gcc
parent9543a9d2d4a1b40161b14b389c7b4f2c1208ec06 (diff)
downloadgcc-60c86d4ee9e3256c02296b8953c5416decac0e1c.zip
gcc-60c86d4ee9e3256c02296b8953c5416decac0e1c.tar.gz
gcc-60c86d4ee9e3256c02296b8953c5416decac0e1c.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/simplify-rtx.c17
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;
}