diff options
author | Richard Guenther <rguenther@suse.de> | 2011-07-19 10:57:15 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-07-19 10:57:15 +0000 |
commit | 530206482667dd180acc4ca1e339389308f0736b (patch) | |
tree | fd9ee6dcb0f9d2b3d7aaed6a958cf751208c3602 /gcc/tree-cfg.c | |
parent | b8b2b0094a9047a1ad476d96f0d20d4b56fca625 (diff) | |
download | gcc-530206482667dd180acc4ca1e339389308f0736b.zip gcc-530206482667dd180acc4ca1e339389308f0736b.tar.gz gcc-530206482667dd180acc4ca1e339389308f0736b.tar.bz2 |
gimplify.c (gimplify_expr): Gimplify TRUTH_NOT_EXPR as BIT_XOR_EXPR, same as the RTL expander does.
2011-07-19 Richard Guenther <rguenther@suse.de>
* gimplify.c (gimplify_expr): Gimplify TRUTH_NOT_EXPR as
BIT_XOR_EXPR, same as the RTL expander does.
* tree-cfg.c (verify_expr): Disallow TRUTH_NOT_EXPR in the gimple IL.
(verify_gimple_assign_unary): Likewise.
* tree-ssa-propagate.c (valid_gimple_rhs_p): Disallow TRUTH_*_EXPR.
* tree-ssa-forwprop.c (forward_propagate_comparison): Handle
BIT_NOT_EXPR and BIT_XOR_EXPR instead of TRUTH_NOT_EXPR.
* gcc.dg/tree-ssa/bool-10.c: Adjust expected pattern.
* gcc.dg/tree-ssa/bool-11.c: Likewise.
* gcc.dg/torture/20110719-1.c: New testcase.
From-SVN: r176442
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 12d8fb4..cd13472 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2680,7 +2680,8 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) break; case NON_LVALUE_EXPR: - gcc_unreachable (); + case TRUTH_NOT_EXPR: + gcc_unreachable (); CASE_CONVERT: case FIX_TRUNC_EXPR: @@ -2688,7 +2689,6 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) case NEGATE_EXPR: case ABS_EXPR: case BIT_NOT_EXPR: - case TRUTH_NOT_EXPR: CHECK_OP (0, "invalid operand to unary operator"); break; @@ -3344,19 +3344,6 @@ verify_gimple_assign_unary (gimple stmt) /* FIXME. */ return false; - case TRUTH_NOT_EXPR: - /* We require two-valued operand types. */ - if (!(TREE_CODE (rhs1_type) == BOOLEAN_TYPE - || (INTEGRAL_TYPE_P (rhs1_type) - && TYPE_PRECISION (rhs1_type) == 1))) - { - error ("invalid types in truth not"); - debug_generic_expr (lhs_type); - debug_generic_expr (rhs1_type); - return true; - } - break; - case NEGATE_EXPR: case ABS_EXPR: case BIT_NOT_EXPR: |