diff options
author | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-04 06:24:09 +0000 |
---|---|---|
committer | pinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-03-04 06:24:09 +0000 |
commit | 3d577bfc01526c8ac818ff358a38ee3fb85d633a (patch) | |
tree | f56735cae147ea5b7f7fd4e20aaa0eed733555a6 /gcc/fold-const.c | |
parent | 447f65a93356c81229dd4a82f4f67b99954fefdb (diff) | |
download | gcc-3d577bfc01526c8ac818ff358a38ee3fb85d633a.tar.gz |
2005-03-04 Andrew Pinski <pinskia@physics.uc.edu>
Revert for now:
2005-03-03 James A. Morrison <phython@gcc.gnu.org>
PR tree-optimization/15784
* fold-const.c (fold): Fold ~A + 1 to -1. Fold -A - 1
and -1 - A to ~A.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95880 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index c494d4f8460..517c45d12c1 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7454,11 +7454,6 @@ fold (tree expr) if (TREE_CODE (arg0) == NEGATE_EXPR && reorder_operands_p (TREE_OPERAND (arg0, 0), arg1)) return fold (build2 (MINUS_EXPR, type, arg1, TREE_OPERAND (arg0, 0))); - /* Convert ~A + 1 to -A. */ - if (INTEGRAL_TYPE_P (type) - && TREE_CODE (arg0) == BIT_NOT_EXPR - && integer_onep (arg1)) - return fold (build1 (NEGATE_EXPR, type, TREE_OPERAND (arg0, 0))); if (TREE_CODE (type) == COMPLEX_TYPE) { @@ -7897,16 +7892,6 @@ fold (tree expr) && reorder_operands_p (arg0, arg1)) return fold (build2 (MINUS_EXPR, type, negate_expr (arg1), TREE_OPERAND (arg0, 0))); - /* Convert -A - 1 to ~A. */ - if (INTEGRAL_TYPE_P (type) - && TREE_CODE (arg0) == NEGATE_EXPR - && integer_onep (arg1)) - return fold (build1 (BIT_NOT_EXPR, type, TREE_OPERAND (arg0, 0))); - - /* Convert -1 - A to ~A. */ - if (INTEGRAL_TYPE_P (type) - && integer_all_onesp (arg0)) - return fold (build1 (BIT_NOT_EXPR, type, arg1)); if (TREE_CODE (type) == COMPLEX_TYPE) { |