Commit 8bce9e98 by Andrew Pinski Committed by Andrew Pinski

fold-const.c (negate_expr): Add break after the if.

2005-11-29  Andrew Pinski  <pinskia@physics.uc.edu>

        * fold-const.c (negate_expr) <case BIT_NOT_EXPR>: Add break after
        the if.

From-SVN: r107682
parent 9b4ca617
2005-11-29 Andrew Pinski <pinskia@physics.uc.edu> 2005-11-29 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (negate_expr) <case BIT_NOT_EXPR>: Add break after
the if.
2005-11-29 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (negate_expr_p): Return true for BIT_NOT_EXPR. * fold-const.c (negate_expr_p): Return true for BIT_NOT_EXPR.
(fold_unary) <case NEGATE_EXPR>: Move -(~a) transformation to ... (fold_unary) <case NEGATE_EXPR>: Move -(~a) transformation to ...
(negate_expr): Here. (negate_expr): Here.
......
...@@ -1059,6 +1059,7 @@ negate_expr (tree t) ...@@ -1059,6 +1059,7 @@ negate_expr (tree t)
if (INTEGRAL_TYPE_P (type)) if (INTEGRAL_TYPE_P (type))
return fold_build2 (PLUS_EXPR, type, TREE_OPERAND (t, 0), return fold_build2 (PLUS_EXPR, type, TREE_OPERAND (t, 0),
build_int_cst (type, 1)); build_int_cst (type, 1));
break;
case INTEGER_CST: case INTEGER_CST:
tem = fold_negate_const (t, type); tem = fold_negate_const (t, type);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment