cse.c (cse_insn): Copy SRC_CONST before putting it in the REG_EQUAL note.
authorAndreas Schwab <schwab@issan.cs.uni-dortmund.de>
Mon, 17 May 1999 00:36:36 +0000 (00:36 +0000)
committerJeff Law <law@gcc.gnu.org>
Mon, 17 May 1999 00:36:36 +0000 (18:36 -0600)
        * cse.c (cse_insn): Copy SRC_CONST before putting it in the
        REG_EQUAL note.

From-SVN: r26958

gcc/ChangeLog
gcc/cse.c

index 8fe370bc9540a23368e40153a1b8afa2b7f943f3..6f6f6668031eb6fabee1a143c7424ec1abf7b398 100644 (file)
@@ -1,3 +1,8 @@
+1999-05-17  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
+
+       * cse.c (cse_insn): Copy SRC_CONST before putting it in the
+       REG_EQUAL note.
+
 1999-05-17  Mike Stump  <mrs@wrs.com>
 
        * rs6000/vxppc.h (CPP_SPEC): Fix support for vararg functions.
index 72a1ff63c3d200826ec3e7a4d2272bef4a0ea5a4..5fc6c7889a24b8294ef93f5edaa290359640f072 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -7323,6 +7323,9 @@ cse_insn (insn, libcall_insn)
        {
          tem = find_reg_note (insn, REG_EQUAL, NULL_RTX);
          
+         /* Make sure that the rtx is not shared with any other insn.  */
+         src_const = copy_rtx (src_const);
+
          /* Record the actual constant value in a REG_EQUAL note, making
             a new one if one does not already exist.  */
          if (tem)