aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtlanal.c
diff options
context:
space:
mode:
authorVladimir N. Makarov <vmakarov@cygnus.com>1998-07-28 12:54:04 +0000
committerVladimir Makarov <vmakarov@gcc.gnu.org>1998-07-28 12:54:04 +0000
commit1ed0205e3520f6f2b1d68ab3266e8afbc61695e6 (patch)
tree397ded5aa1d2ca77c11ef93e982306030a77bfa7 /gcc/rtlanal.c
parent4d17a06f32ff0fad8f8783e39ef34083174ba3e6 (diff)
downloadgcc-1ed0205e3520f6f2b1d68ab3266e8afbc61695e6.zip
gcc-1ed0205e3520f6f2b1d68ab3266e8afbc61695e6.tar.gz
gcc-1ed0205e3520f6f2b1d68ab3266e8afbc61695e6.tar.bz2
cse.c (cse_insn): Enable subsitution inside libcall only for REG, SUBREG, MEM.
� * cse.c (cse_insn): Enable subsitution inside libcall only for REG, SUBREG, MEM. * rtlanal.c (replace_rtx): Prohibit replaces in CONST_DOUBLE. From-SVN: r21435
Diffstat (limited to 'gcc/rtlanal.c')
-rw-r--r--gcc/rtlanal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 8f42391..221b3fa 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;