diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2013-05-06 23:14:59 +0200 |
---|---|---|
committer | Marc Glisse <glisse@gcc.gnu.org> | 2013-05-06 21:14:59 +0000 |
commit | 9a0ee7b0286f1de2f05a5e4e41f8c3436053c975 (patch) | |
tree | 7d9d8b97ec358bd6267025f8446e73231ebbc98e /gcc/fold-const.c | |
parent | 6698175d1591c25041f3979a5c01ef5f81e2f4ff (diff) | |
download | gcc-9a0ee7b0286f1de2f05a5e4e41f8c3436053c975.zip gcc-9a0ee7b0286f1de2f05a5e4e41f8c3436053c975.tar.gz gcc-9a0ee7b0286f1de2f05a5e4e41f8c3436053c975.tar.bz2 |
tree.c (integer_all_onesp): Test that both components are all 1s.
2013-05-06 Marc Glisse <marc.glisse@inria.fr>
* tree.c (integer_all_onesp) <COMPLEX_CST>: Test that both
components are all 1s.
(integer_minus_onep): New function.
* tree.h (integer_minus_onep): Declare it.
* fold-const.c (fold_binary_loc) <MULT_EXPR>: Test
integer_minus_onep instead of integer_all_onesp.
From-SVN: r198649
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index f93ce8a..74b451e 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -10870,7 +10870,7 @@ fold_binary_loc (location_t loc, /* Transform x * -1 into -x. Make sure to do the negation on the original operand with conversions not stripped because we can only strip non-sign-changing conversions. */ - if (integer_all_onesp (arg1)) + if (integer_minus_onep (arg1)) return fold_convert_loc (loc, type, negate_expr (op0)); /* Transform x * -C into -x * C if x is easily negatable. */ if (TREE_CODE (arg1) == INTEGER_CST |