diff options
author | Richard Biener <rguenther@suse.de> | 2021-04-14 10:53:30 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-04-23 13:05:45 +0200 |
commit | 35b2be219fc1934ae040d045e355680a83d839c4 (patch) | |
tree | fc0d9490569f66db1b5ff3668c7671b772529e7e /gcc/gimple-match-head.c | |
parent | 58ad6b2802592f1448eed48e8ad4e0e87985cecb (diff) | |
download | gcc-35b2be219fc1934ae040d045e355680a83d839c4.zip gcc-35b2be219fc1934ae040d045e355680a83d839c4.tar.gz gcc-35b2be219fc1934ae040d045e355680a83d839c4.tar.bz2 |
VEC_COND_EXPR code cleanup
This removes now unnecessary special-casings of VEC_COND_EXPRs after
making its first operand a gimple value.
2021-04-14 Richard Biener <rguenther@suse.de>
* genmatch.c (lower_cond): Remove VEC_COND_EXPR special-casing.
(capture_info::capture_info): Likewise.
(capture_info::walk_match): Likewise.
(expr::gen_transform): Likewise.
(dt_simplify::gen_1): Likewise.
* gimple-match-head.c (maybe_resimplify_conditional_op):
Remove VEC_COND_EXPR special-casing.
(gimple_simplify): Likewise.
* gimple.c (gimple_could_trap_p_1): Adjust.
* tree-ssa-pre.c (compute_avail): Allow VEC_COND_EXPR
to participate in PRE.
Diffstat (limited to 'gcc/gimple-match-head.c')
-rw-r--r-- | gcc/gimple-match-head.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/gimple-match-head.c b/gcc/gimple-match-head.c index d941b8b..84fbaef 100644 --- a/gcc/gimple-match-head.c +++ b/gcc/gimple-match-head.c @@ -147,10 +147,10 @@ maybe_resimplify_conditional_op (gimple_seq *seq, gimple_match_op *res_op, tree_code op_code = (tree_code) res_op->code; bool op_could_trap; - /* COND_EXPR and VEC_COND_EXPR will trap if, and only if, the condition + /* COND_EXPR will trap if, and only if, the condition traps and hence we have to check this. For all other operations, we don't need to consider the operands. */ - if (op_code == COND_EXPR || op_code == VEC_COND_EXPR) + if (op_code == COND_EXPR) op_could_trap = generic_expr_could_trap_p (res_op->ops[0]); else op_could_trap = operation_could_trap_p ((tree_code) res_op->code, @@ -961,10 +961,9 @@ gimple_simplify (gimple *stmt, gimple_match_op *res_op, gimple_seq *seq, { bool valueized = false; tree rhs1 = gimple_assign_rhs1 (stmt); - /* If this is a [VEC_]COND_EXPR first try to simplify an + /* If this is a COND_EXPR first try to simplify an embedded GENERIC condition. */ - if (code == COND_EXPR - || code == VEC_COND_EXPR) + if (code == COND_EXPR) { if (COMPARISON_CLASS_P (rhs1)) { |