]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
cse.c (cse_insn): Enable subsitution inside libcall only for REG, SUBREG, MEM.
authorJeff Law <law@gcc.gnu.org>
Tue, 28 Jul 1998 21:27:12 +0000 (15:27 -0600)
committerJeff Law <law@gcc.gnu.org>
Tue, 28 Jul 1998 21:27:12 +0000 (15:27 -0600)
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

index 8f423915b15a443a9510e611d871bc532bae7937..221b3fae4c139ef9d9f98d857727cded06481263 100644 (file)
@@ -1765,7 +1765,8 @@ inequality_comparisons_p (x)
   return 0;
 }
 \f
-/* 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;