From: Jeff Law Date: Tue, 28 Jul 1998 21:27:12 +0000 (-0600) Subject: cse.c (cse_insn): Enable subsitution inside libcall only for REG, SUBREG, MEM. X-Git-Tag: prereleases/egcs-1.1-prerelease~154 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ab771aa561538fc55a5d5b64e30ac30d580cb25;p=thirdparty%2Fgcc.git cse.c (cse_insn): Enable subsitution inside libcall only for REG, SUBREG, MEM. p * cse.c (cse_insn): Enable subsitution inside libcall only for REG, SUBREG, MEM. * rtlanal.c (replace_rtx): Prohibit replaces in CONST_DOUBLE. From-SVN: r21447 --- diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c index 8f423915b15a..221b3fae4c13 100644 --- a/gcc/rtlanal.c +++ b/gcc/rtlanal.c @@ -1765,7 +1765,8 @@ inequality_comparisons_p (x) return 0; } -/* Replace any occurrence of FROM in X with TO. +/* Replace any occurrence of FROM in X with TO. The function does + not enter into CONST_DOUBLE for the replace. Note that copying is not done so X must not be shared unless all copies are to be modified. */ @@ -1777,6 +1778,11 @@ replace_rtx (x, from, to) register int i, j; register char *fmt; + /* The following prevents loops occurrence when we change MEM in + CONST_DOUBLE onto the same CONST_DOUBLE. */ + if (x != 0 && GET_CODE (x) == CONST_DOUBLE) + return x; + if (x == from) return to;