diff options
author | Richard Biener <rguenther@suse.de> | 2014-12-01 13:08:10 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-12-01 13:08:10 +0000 |
commit | e19740aef3f3c7c07c67e59560ef96e31e9bff96 (patch) | |
tree | c3503f339e15ee5b38b97e471ef1351b57ae324d /gcc/fold-const.c | |
parent | 9df0192130fd054a9edf84884ca7bbccf8f7679a (diff) | |
download | gcc-e19740aef3f3c7c07c67e59560ef96e31e9bff96.zip gcc-e19740aef3f3c7c07c67e59560ef96e31e9bff96.tar.gz gcc-e19740aef3f3c7c07c67e59560ef96e31e9bff96.tar.bz2 |
re PR tree-optimization/64126 (FAIL: gcc.dg/pr37289.c scan-tree-dump original "-\\(long unsigned int\\) x")
2014-12-01 Richard Biener <rguenther@suse.de>
PR middle-end/64126
* match.pd: Allow conversions in ~A + 1 -> -A, add -A - 1 -> ~A
and -1 - A -> ~A.
* fold-const.c (fold_binary_loc): Remove transforms here.
From-SVN: r218210
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 486ca19a..51f3e2f 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -10391,19 +10391,6 @@ fold_binary_loc (location_t loc, negate_expr (arg1)), fold_convert_loc (loc, type, TREE_OPERAND (arg0, 0))); - /* Convert -A - 1 to ~A. */ - if (TREE_CODE (arg0) == NEGATE_EXPR - && integer_each_onep (arg1) - && !TYPE_OVERFLOW_TRAPS (type)) - return fold_build1_loc (loc, BIT_NOT_EXPR, type, - fold_convert_loc (loc, type, - TREE_OPERAND (arg0, 0))); - - /* Convert -1 - A to ~A. */ - if (TREE_CODE (type) != COMPLEX_TYPE - && integer_all_onesp (arg0)) - return fold_build1_loc (loc, BIT_NOT_EXPR, type, op1); - /* X - (X / Y) * Y is X % Y. */ if ((INTEGRAL_TYPE_P (type) || VECTOR_INTEGER_TYPE_P (type)) |