Commit 221df0b6 by Kai Tietz Committed by Kai Tietz

re PR middle-end/48984 (Many testsuite failures)

2011-05-13  Kai Tietz  <ktietz@redhat.com>

        PR middle-end/48984
        * gimplify.c (gimplify_expr): Check for boolean_type_node instead
        for BOOLEAN_TYPE for TRUTH-NOT/AND/OR/XOR.
        (gimple_boolify): Check for cast for boolean_type_node instead for
        BOOLEAN_TYPE.

From-SVN: r173726
parent 208cb8cb
2011-05-13 Kai Tietz <ktietz@redhat.com>
PR middle-end/48984
* gimplify.c (gimplify_expr): Check for boolean_type_node instead
for BOOLEAN_TYPE for TRUTH-NOT/AND/OR/XOR.
(gimple_boolify): Check for cast for boolean_type_node instead for
BOOLEAN_TYPE.
2011-05-13 Richard Guenther <rguenther@suse.de> 2011-05-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48172 PR tree-optimization/48172
......
...@@ -2848,7 +2848,7 @@ gimple_boolify (tree expr) ...@@ -2848,7 +2848,7 @@ gimple_boolify (tree expr)
default: default:
/* Other expressions that get here must have boolean values, but /* Other expressions that get here must have boolean values, but
might need to be converted to the appropriate mode. */ might need to be converted to the appropriate mode. */
if (TREE_CODE (type) == BOOLEAN_TYPE) if (type == boolean_type_node)
return expr; return expr;
return fold_convert_loc (loc, boolean_type_node, expr); return fold_convert_loc (loc, boolean_type_node, expr);
} }
...@@ -6754,7 +6754,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, ...@@ -6754,7 +6754,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
} }
case TRUTH_NOT_EXPR: case TRUTH_NOT_EXPR:
if (TREE_CODE (TREE_TYPE (*expr_p)) != BOOLEAN_TYPE) if (TREE_TYPE (*expr_p) != boolean_type_node)
{ {
tree type = TREE_TYPE (*expr_p); tree type = TREE_TYPE (*expr_p);
*expr_p = fold_convert (type, gimple_boolify (*expr_p)); *expr_p = fold_convert (type, gimple_boolify (*expr_p));
...@@ -7199,7 +7199,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, ...@@ -7199,7 +7199,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
fold_truth_not_expr) happily uses operand type and doesn't fold_truth_not_expr) happily uses operand type and doesn't
automatically uses boolean_type as result, we need to keep automatically uses boolean_type as result, we need to keep
orignal type. */ orignal type. */
if (TREE_CODE (org_type) != BOOLEAN_TYPE) if (org_type != boolean_type_node)
{ {
*expr_p = fold_convert (org_type, *expr_p); *expr_p = fold_convert (org_type, *expr_p);
ret = GS_OK; ret = GS_OK;
......
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