aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@cygnus.co.uk>1999-12-14 10:23:02 +0000
committerBernd Schmidt <crux@gcc.gnu.org>1999-12-14 10:23:02 +0000
commit3749f4ca8e76d2fbbf8156fc1bc9b4cf6fb28ae3 (patch)
tree5b25ce80639736ff67d68ae2e0056baae9571c98 /gcc/combine.c
parent956568cd6bd01c0207dafc5277b5fb830f9c5f76 (diff)
downloadgcc-3749f4ca8e76d2fbbf8156fc1bc9b4cf6fb28ae3.zip
gcc-3749f4ca8e76d2fbbf8156fc1bc9b4cf6fb28ae3.tar.gz
gcc-3749f4ca8e76d2fbbf8156fc1bc9b4cf6fb28ae3.tar.bz2
Avoid making shared rtl.
From-SVN: r30910
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 33de1bf..5dc4fc8 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -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;