re PR tree-optimization/15777 (Fold does not always fold sub trees)
authorAndrew Pinski <apinski@apple.com>
Wed, 7 Jul 2004 21:28:01 +0000 (21:28 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Wed, 7 Jul 2004 21:28:01 +0000 (14:28 -0700)
2004-07-07  Andrew Pinski  <apinski@apple.com>

        PR tree-optimization/15777
        * fold-const.c (fold_single_bit_test): Fold the x^1 expression.

From-SVN: r84231

gcc/ChangeLog
gcc/fold-const.c

index 134e1ea2a60704cf083e1a7df440a039b7fa7401..af05838a9343146966b5a54a14145bb26e2a161b 100644 (file)
@@ -1,5 +1,8 @@
 2004-07-07  Andrew Pinski  <apinski@apple.com>
 
+       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.
index b68e47087981ba384609ce9ac3b70625be1782ac..ca042501590df8c52e4284f535313c308ee5ba38 100644 (file)
@@ -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,