diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2002-03-06 23:07:08 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@gcc.gnu.org> | 2002-03-06 23:07:08 +0000 |
commit | e16e32914a3fc97be5b420a92281207d37c3d22a (patch) | |
tree | 2cde44acc5fa8132dc2f6b4d74e224267af6c0f6 /gcc/simplify-rtx.c | |
parent | 348c9efcd3341f49e593a51983a594a7fb764386 (diff) | |
download | gcc-e16e32914a3fc97be5b420a92281207d37c3d22a.tar.gz |
reload1.c (reload): Unshare all rtl after reload is done.
* reload1.c (reload): Unshare all rtl after reload is done.
* simplify-rtx.c (simplify_plus_minus): Do not abort,
but simply fail if the expression is too complex to simplify.
(simplify_gen_binary): Handle simplify_plus_minus failures.
From-SVN: r50380
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 5596e0c1e0a..b50a3392f7b 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -143,9 +143,13 @@ simplify_gen_binary (code, mode, op0, op1) the operation. */ if (code == PLUS || code == MINUS) - return simplify_plus_minus (code, mode, op0, op1, 1); - else - return gen_rtx_fmt_ee (code, mode, op0, op1); + { + tem = simplify_plus_minus (code, mode, op0, op1, 1); + if (tem) + return tem; + } + + return gen_rtx_fmt_ee (code, mode, op0, op1); } /* If X is a MEM referencing the constant pool, return the real value. @@ -1649,7 +1653,9 @@ simplify_binary_operation (code, mode, op0, op1) we rebuild the operation. If FORCE is true, then always generate the rtx. This is used to - canonicalize stuff emitted from simplify_gen_binary. */ + canonicalize stuff emitted from simplify_gen_binary. Note that this + can still fail if the rtx is too complex. It won't fail just because + the result is not 'simpler' than the input, however. */ struct simplify_plus_minus_op_data { @@ -1708,11 +1714,7 @@ simplify_plus_minus (code, mode, op0, op1, force) case PLUS: case MINUS: if (n_ops == 7) - { - if (force) - abort (); - return NULL_RTX; - } + return NULL_RTX; ops[n_ops].op = XEXP (this_op, 1); ops[n_ops].neg = (this_code == MINUS) ^ this_neg; |