diff options
author | Jakub Jelinek <jakub@redhat.com> | 2001-10-19 21:28:03 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2001-10-19 21:28:03 +0200 |
commit | 4768dbddcd8b626899574a5d10651e68d27f9328 (patch) | |
tree | 3cdc907694d60933dafc3af4b4dd4296d6a692a8 /gcc/simplify-rtx.c | |
parent | c5adc06afa348edfb16727209b685707d4daa9ad (diff) | |
download | gcc-4768dbddcd8b626899574a5d10651e68d27f9328.zip gcc-4768dbddcd8b626899574a5d10651e68d27f9328.tar.gz gcc-4768dbddcd8b626899574a5d10651e68d27f9328.tar.bz2 |
simplify-rtx.c (simplify_plus_minus): Negate constant iff its neg field is different to previous argument's neg field.
* simplify-rtx.c (simplify_plus_minus): Negate constant iff its neg
field is different to previous argument's neg field.
* gcc.c-torture/execute/20011019-1.c: New test.
From-SVN: r46356
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 2b7e3a2..bdeb265 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1882,7 +1882,7 @@ simplify_plus_minus (code, mode, op0, op1) && CONSTANT_P (ops[n_ops - 2].op)) { HOST_WIDE_INT value = INTVAL (ops[n_ops - 1].op); - if (ops[n_ops - 1].neg) + if (ops[n_ops - 1].neg ^ ops[n_ops - 2].neg) value = -value; ops[n_ops - 2].op = plus_constant (ops[n_ops - 2].op, value); n_ops--; |