aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-04-14 10:53:30 +0200
committerRichard Biener <rguenther@suse.de>2021-04-23 13:05:45 +0200
commit35b2be219fc1934ae040d045e355680a83d839c4 (patch)
treefc0d9490569f66db1b5ff3668c7671b772529e7e /gcc/gimple.c
parent58ad6b2802592f1448eed48e8ad4e0e87985cecb (diff)
downloadgcc-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.c')
-rw-r--r--gcc/gimple.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c
index 87864f3..d067656 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -2158,9 +2158,12 @@ gimple_could_trap_p_1 (gimple *s, bool include_mem, bool include_stores)
case GIMPLE_ASSIGN:
op = gimple_assign_rhs_code (s);
- /* For COND_EXPR and VEC_COND_EXPR only the condition may trap. */
- if (op == COND_EXPR || op == VEC_COND_EXPR)
+ /* For COND_EXPR only the condition may trap. */
+ if (op == COND_EXPR)
return tree_could_trap_p (gimple_assign_rhs1 (s));
+ /* A VEC_COND_EXPR cannot trap. */
+ else if (op == VEC_COND_EXPR)
+ return false;
/* For comparisons we need to check rhs operand types instead of rhs type
(which is BOOLEAN_TYPE). */