From: Andrew Pinski Date: Wed, 7 Jul 2004 21:28:01 +0000 (+0000) Subject: re PR tree-optimization/15777 (Fold does not always fold sub trees) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5f7b21560685728b826f0702459292806ea8bbb8;p=gcc.git re PR tree-optimization/15777 (Fold does not always fold sub trees) 2004-07-07 Andrew Pinski PR tree-optimization/15777 * fold-const.c (fold_single_bit_test): Fold the x^1 expression. From-SVN: r84231 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 134e1ea2a60..af05838a934 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2004-07-07 Andrew Pinski + PR tree-optimization/15777 + * fold-const.c (fold_single_bit_test): Fold the x^1 expression. + * expr.c (expand_expr_real_1): Fix formating. BUFFER_REF and IN_EXPR are dead. * fold-const.c (non_lvalue): BUFFER_REF is dead. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index b68e4708798..ca042501590 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -5849,8 +5849,8 @@ fold_single_bit_test (enum tree_code code, tree arg0, tree arg1, inner, size_int (bitnum)); if (code == EQ_EXPR) - inner = build2 (BIT_XOR_EXPR, intermediate_type, - inner, integer_one_node); + inner = fold (build2 (BIT_XOR_EXPR, intermediate_type, + inner, integer_one_node)); /* Put the AND last so it can combine with more things. */ inner = build2 (BIT_AND_EXPR, intermediate_type,