diff options
author | Richard Biener <rguenth@gcc.gnu.org> | 2015-08-03 13:45:22 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-08-03 13:45:22 +0000 |
commit | 5030111533de53f866bff85cd045085e717c7bf6 (patch) | |
tree | 029b574d3fb17e189fbbcf47afaffe0e7a816102 | |
parent | d4b71b95fe4842753bc3b695862d2dc160ff2313 (diff) | |
download | gcc-5030111533de53f866bff85cd045085e717c7bf6.zip gcc-5030111533de53f866bff85cd045085e717c7bf6.tar.gz gcc-5030111533de53f866bff85cd045085e717c7bf6.tar.bz2 |
genmatch.c (simplify::for_subst_vec): New member.
2015-08-03 Richard Biener <rguenther@suse.de>
* genmatch.c (simplify::for_subst_vec): New member.
(binary_ok): New helper for for lowering.
(lower_for): Delay substituting operators into result expressions
if we can merge the results eventually again.
(capture_info::walk_result): Adjust for user_id appearing as
result expression operator.
(expr::gen_transform): Likewise.
(dt_simplify::gen_1): Likewise.
(dt_simplify::gen): Pass not substituted operators to tail
functions or initialize local variable with it.
(decision_tree::gen): Adjust function signature.
* match.pd: Fix tests against global code and add default
cases to switch stmts.
From-SVN: r226505
-rw-r--r-- | gcc/match.pd | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/match.pd b/gcc/match.pd index 80ada21..913a149 100644 --- a/gcc/match.pd +++ b/gcc/match.pd @@ -945,7 +945,7 @@ along with GCC; see the file COPYING3. If not see (if (low >= prec) (if (op == LROTATE_EXPR || op == RROTATE_EXPR) (op @0 { build_int_cst (TREE_TYPE (@1), low % prec); }) - (if (TYPE_UNSIGNED (type) || code == LSHIFT_EXPR) + (if (TYPE_UNSIGNED (type) || op == LSHIFT_EXPR) { build_zero_cst (type); } (op @0 { build_int_cst (TREE_TYPE (@1), prec - 1); }))) (op @0 { build_int_cst (TREE_TYPE (@1), low); }))))))) @@ -1955,7 +1955,7 @@ along with GCC; see the file COPYING3. If not see (cmp @0 REAL_CST@1) (if (REAL_VALUE_ISNAN (TREE_REAL_CST (@1)) && (cmp != LTGT_EXPR || ! flag_trapping_math)) - { constant_boolean_node (cmp == ORDERED_EXPR || code == LTGT_EXPR + { constant_boolean_node (cmp == ORDERED_EXPR || cmp == LTGT_EXPR ? false : true, type); }))) /* bool_var != 0 becomes bool_var. */ @@ -2020,6 +2020,8 @@ along with GCC; see the file COPYING3. If not see x = build_real (type, dconst10); } break; + default: + gcc_unreachable (); } } (mult (logs { x; }) @0)))) @@ -2042,6 +2044,8 @@ along with GCC; see the file COPYING3. If not see x = build_real (type, real_value_truncate (TYPE_MODE (type), dconst_third ())); break; + default: + gcc_unreachable (); } } (mult { x; } (logs @0))))) |