diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-17 06:42:12 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-04-17 06:42:12 +0000 |
commit | bd356bb6d247b18723734d4d1d0b32191cfb1a9a (patch) | |
tree | 1882cabb94561f964beaa242d722700c4239ab25 /gcc/simplify-rtx.c | |
parent | c8aed844acdc89884d630c7e3266ecd8d4101847 (diff) | |
download | gcc-bd356bb6d247b18723734d4d1d0b32191cfb1a9a.tar.gz |
2016-04-17 Basile Starynkevitch <basile@starynkevitch.net>
{{merging with even more of GCC 6, using subversion 1.9
svn merge -r232606:233050 ^/trunk
}}
[gcc/]
2016-04-17 Basile Starynkevitch <basile@starynkevitch.net>
* melt/libmelt-ana-gimple.melt:
(gimple_transaction): Use gimple_transaction_label_norm.
Not sure that (gccif "6." ...) does what it should...
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@235078 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/simplify-rtx.c')
-rw-r--r-- | gcc/simplify-rtx.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 1e6e46daf7b..450fa8b0320 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -2277,8 +2277,11 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode, if (!HONOR_SIGNED_ZEROS (mode) && trueop0 == CONST0_RTX (mode)) return simplify_gen_unary (NEG, mode, op1, mode); - /* (-1 - a) is ~a. */ - if (trueop0 == constm1_rtx) + /* (-1 - a) is ~a, unless the expression contains symbolic + constants, in which case not retaining additions and + subtractions could cause invalid assembly to be produced. */ + if (trueop0 == constm1_rtx + && !contains_symbolic_reference_p (op1)) return simplify_gen_unary (NOT, mode, op1, mode); /* Subtracting 0 has no effect unless the mode has signed zeros |