From: Roger Sayle Date: Sun, 4 Apr 2004 21:44:41 +0000 (+0000) Subject: cse.c (cse_insn): Correct usage of simplify_replace_rtx when updating the REG_EQUAL... X-Git-Tag: releases/gcc-4.0.0~9056 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d8b7ec41b57618f6a7e9d02942ac36b309cbeac9;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index acf8454abf12..fcfbfdccee9b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-04-04 Roger Sayle + + * cse.c (cse_insn): Correct usage of simplify_replace_rtx when + updating the REG_EQUAL note on an insn's libcall_insn. + 2004-04-04 Roger Sayle * df.h: Tidy up whitespace in the definitions of the DF_ flags. diff --git a/gcc/cse.c b/gcc/cse.c index 38f6ef060046..0a7281ecc426 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. */