Avoid making shared rtl.
authorcrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Dec 1999 10:23:02 +0000 (10:23 +0000)
committercrux <crux@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Dec 1999 10:23:02 +0000 (10:23 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30910 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/combine.c

index fa64aa6..793005e 100644 (file)
@@ -1,3 +1,8 @@
+1999-12-14  Bernd Schmidt  <bernds@cygnus.co.uk>
+
+       * combine.c (combine_simplify_rtx): Don't make shared rtl.
+       (simplify_logical): Likewise.
+
 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
 
        * cccp.c (INO_T_EQ): Disable inode-based optimization for Cygwin.
index 33de1bf..5dc4fc8 100644 (file)
@@ -4190,7 +4190,8 @@ combine_simplify_rtx (x, op0_mode, last, in_dest)
                         gen_binary (MULT, mode,
                                     XEXP (XEXP (x, 0), 0), XEXP (x, 1)),
                         gen_binary (MULT, mode,
-                                    XEXP (XEXP (x, 0), 1), XEXP (x, 1))));
+                                    XEXP (XEXP (x, 0), 1),
+                                    copy_rtx (XEXP (x, 1)))));
 
          if (GET_CODE (x) != MULT)
            return x;
@@ -5199,7 +5200,8 @@ simplify_logical (x, last)
          x = apply_distributive_law
            (gen_binary (GET_CODE (op0), mode,
                         gen_binary (AND, mode, XEXP (op0, 0), op1),
-                        gen_binary (AND, mode, XEXP (op0, 1), op1)));
+                        gen_binary (AND, mode, XEXP (op0, 1),
+                                    copy_rtx (op1))));
          if (GET_CODE (x) != AND)
            return x;
        }
@@ -5208,7 +5210,8 @@ simplify_logical (x, last)
        return apply_distributive_law
          (gen_binary (GET_CODE (op1), mode,
                       gen_binary (AND, mode, XEXP (op1, 0), op0),
-                      gen_binary (AND, mode, XEXP (op1, 1), op0)));
+                      gen_binary (AND, mode, XEXP (op1, 1),
+                                  copy_rtx (op0))));
 
       /* Similarly, taking advantage of the fact that
         (and (not A) (xor B C)) == (xor (ior A B) (ior A C))  */
@@ -5217,13 +5220,14 @@ simplify_logical (x, last)
        return apply_distributive_law
          (gen_binary (XOR, mode,
                       gen_binary (IOR, mode, XEXP (op0, 0), XEXP (op1, 0)),
-                      gen_binary (IOR, mode, XEXP (op0, 0), XEXP (op1, 1))));
+                      gen_binary (IOR, mode, copy_rtx (XEXP (op0, 0)),
+                                  XEXP (op1, 1))));
                                                            
       else if (GET_CODE (op1) == NOT && GET_CODE (op0) == XOR)
        return apply_distributive_law
          (gen_binary (XOR, mode,
                       gen_binary (IOR, mode, XEXP (op1, 0), XEXP (op0, 0)),
-                      gen_binary (IOR, mode, XEXP (op1, 0), XEXP (op0, 1))));
+                      gen_binary (IOR, mode, copy_rtx (XEXP (op1, 0)), XEXP (op0, 1))));
       break;
 
     case IOR:
@@ -5249,7 +5253,8 @@ simplify_logical (x, last)
          x = apply_distributive_law
            (gen_binary (AND, mode,
                         gen_binary (IOR, mode, XEXP (op0, 0), op1),
-                        gen_binary (IOR, mode, XEXP (op0, 1), op1)));
+                        gen_binary (IOR, mode, XEXP (op0, 1),
+                                    copy_rtx (op1))));
 
          if (GET_CODE (x) != IOR)
            return x;
@@ -5260,7 +5265,8 @@ simplify_logical (x, last)
          x = apply_distributive_law
            (gen_binary (AND, mode,
                         gen_binary (IOR, mode, XEXP (op1, 0), op0),
-                        gen_binary (IOR, mode, XEXP (op1, 1), op0)));
+                        gen_binary (IOR, mode, XEXP (op1, 1),
+                                    copy_rtx (op0))));
 
          if (GET_CODE (x) != IOR)
            return x;