aboutsummaryrefslogtreecommitdiff
path: root/gcc/cse.c
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-04-04 21:44:41 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-04-04 21:44:41 +0000
commitd8b7ec41b57618f6a7e9d02942ac36b309cbeac9 (patch)
tree80230eaf8180e7da392b456e733302e1bce34852 /gcc/cse.c
parent4012b7db1e8fd64e72dfaec3a9fcbc73deb2ec42 (diff)
downloadgcc-d8b7ec41b57618f6a7e9d02942ac36b309cbeac9.zip
gcc-d8b7ec41b57618f6a7e9d02942ac36b309cbeac9.tar.gz
gcc-d8b7ec41b57618f6a7e9d02942ac36b309cbeac9.tar.bz2
cse.c (cse_insn): Correct usage of simplify_replace_rtx when updating the REG_EQUAL note on an...
* cse.c (cse_insn): Correct usage of simplify_replace_rtx when updating the REG_EQUAL note on an insn's libcall_insn. From-SVN: r80400
Diffstat (limited to 'gcc/cse.c')
-rw-r--r--gcc/cse.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cse.c b/gcc/cse.c
index 38f6ef0..0a7281e 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5402,8 +5402,13 @@ cse_insn (rtx insn, rtx libcall_insn)
&& (GET_CODE (sets[i].orig_src) == REG
|| GET_CODE (sets[i].orig_src) == SUBREG
|| GET_CODE (sets[i].orig_src) == MEM))
- simplify_replace_rtx (REG_NOTES (libcall_insn),
- sets[i].orig_src, copy_rtx (new));
+ {
+ rtx note = find_reg_equal_equiv_note (libcall_insn);
+ if (note != 0)
+ XEXP (note, 0) = simplify_replace_rtx (XEXP (note, 0),
+ sets[i].orig_src,
+ copy_rtx (new));
+ }
/* The result of apply_change_group can be ignored; see
canon_reg. */