]> 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:10 +0000 (15:27 -0600)
committerJeff Law <law@gcc.gnu.org>
Tue, 28 Jul 1998 21:27:10 +0000 (15:27 -0600)

        * cse.c (cse_insn): Enable subsitution inside libcall only for REG,
        SUBREG, MEM.
        * rtlanal.c (replace_rtx): Prohibit replaces in CONST_DOUBLE.

From-SVN: r21446

gcc/cse.c

index 19e809a52dc4b6b3702aa1b7d3fba544ca5b5612..5d121870afb0a7153c8e3249f880a335b2312cca 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -6117,8 +6117,9 @@ record_jump_cond (code, mode, op0, op1, reversed_nonequality)
    Then install the new sources and destinations in the table
    of available values. 
 
-   If IN_LIBCALL_BLOCK is nonzero, don't record any equivalence made in
-   the insn.  */
+   If LIBCALL_INSN is nonzero, don't record any equivalence made in
+   the insn.  It means that INSN is inside libcall block.  In this
+   case LIBCALL_INSN is the corresponding insn with REG_LIBCALL. */
 
 /* Data on one SET contained in the instruction.  */
 
@@ -6948,7 +6949,10 @@ cse_insn (insn, libcall_insn)
              /* If we just made a substitution inside a libcall, then we
                 need to make the same substitution in any notes attached
                 to the RETVAL insn.  */
-             if (libcall_insn)
+             if (libcall_insn
+                 && (GET_CODE (old_src) == REG
+                     || GET_CODE (old_src) == SUBREG
+                     ||  GET_CODE (old_src) == MEM))
                replace_rtx (REG_NOTES (libcall_insn), old_src, 
                             canon_reg (SET_SRC (sets[i].rtl), insn));