From 2ab771aa561538fc55a5d5b64e30ac30d580cb25 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Tue, 28 Jul 1998 15:27:12 -0600 Subject: [PATCH] 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 --- gcc/rtlanal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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; -- 2.47.2