]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Backport a change to the 2.95 branch
authorBernd Schmidt <bernds@redhat.co.uk>
Thu, 30 Nov 2000 11:56:05 +0000 (11:56 +0000)
committerBernd Schmidt <bernds@gcc.gnu.org>
Thu, 30 Nov 2000 11:56:05 +0000 (11:56 +0000)
From-SVN: r37877

gcc/ChangeLog
gcc/combine.c

index 790e3575d1c3da43e89b9d04d1e5427a0223a838..6bfed8719ff6f624870edf4f7bdd50a058a5c025 100644 (file)
@@ -1,5 +1,9 @@
 2000-11-30  Bernd Schmidt  <bernds@redhat.co.uk>
 
+       1999-12-14  Bernd Schmidt  <bernds@cygnus.co.uk>
+       * combine.c (combine_simplify_rtx): Don't make shared rtl.
+       (simplify_logical): Likewise.
+
        Sat May 20 07:27:35 2000  Alexandre Oliva  <aoliva@cygnus.com>
        * fold-const.c (make_range): Handle degenerated intervals.
        Fixes c-torture/execute/991221-1.c
index 57b2e8619bc63b4b6f2a0205fe2fbe137c420afa..1f2375603f48cd9c2987364a273e5a4e78e44a32 100644 (file)
@@ -4015,7 +4015,8 @@ 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;
@@ -4954,7 +4955,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;
        }
@@ -4963,7 +4965,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))  */
@@ -4972,13 +4975,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:
@@ -5004,7 +5008,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;
@@ -5015,7 +5020,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;