diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-11 11:13:54 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-04-11 11:13:54 +0000 |
commit | 516aa37deb121650b6787d53cb1831119cff3e60 (patch) | |
tree | e7ddfba612149002d6ac430dad00a6d93b024c88 | |
parent | 2b8e874ff4dd8b23f4c16a4b6c8684ec910888ca (diff) | |
download | gcc-516aa37deb121650b6787d53cb1831119cff3e60.tar.gz |
2007-04-11 Richard Guenther <rguenther@suse.de>
PR middle-end/31530
* simplify-rtx.c (simplify_binary_operation_1): Do not simplify
a * -b + c as c - a * b if we honor sign dependent rounding.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123715 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 9 |
2 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 31b0174c9b9..7d85c96bd31 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2007-04-11 Richard Guenther <rguenther@suse.de> + + PR middle-end/31530 + * simplify-rtx.c (simplify_binary_operation_1): Do not simplify + a * -b + c as c - a * b if we honor sign dependent rounding. + 2007-04-11 Bernd Schmidt <bernd.schmidt@analog.com> * config/bfin/bfin-protos.h (bfin_expand_movmem): Renamed from diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index e4af34d7adf..cb79aa93d70 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -1688,7 +1688,8 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, XEXP (op0, 1))); /* Canonicalize (plus (mult (neg B) C) A) to (minus A (mult B C)). */ - if (GET_CODE (op0) == MULT + if (!HONOR_SIGN_DEPENDENT_ROUNDING (mode) + && GET_CODE (op0) == MULT && GET_CODE (XEXP (op0, 0)) == NEG) { rtx in1, in2; @@ -1916,7 +1917,8 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, return reversed; /* Canonicalize (minus A (mult (neg B) C)) to (plus (mult B C) A). */ - if (GET_CODE (op1) == MULT + if (!HONOR_SIGN_DEPENDENT_ROUNDING (mode) + && GET_CODE (op1) == MULT && GET_CODE (XEXP (op1, 0)) == NEG) { rtx in1, in2; @@ -1931,7 +1933,8 @@ simplify_binary_operation_1 (enum rtx_code code, enum machine_mode mode, /* Canonicalize (minus (neg A) (mult B C)) to (minus (mult (neg B) C) A). */ - if (GET_CODE (op1) == MULT + if (!HONOR_SIGN_DEPENDENT_ROUNDING (mode) + && GET_CODE (op1) == MULT && GET_CODE (op0) == NEG) { rtx in1, in2; |