diff options
author | Richard Biener <rguenther@suse.de> | 2022-04-11 12:18:48 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2022-04-29 12:13:48 +0200 |
commit | c090743b2ae0095f792371c7cbeb3cf6e2978f5d (patch) | |
tree | 3526e923d4e83fd10ccb3f13dc23214b24203c86 /gcc/tree-vect-loop-manip.cc | |
parent | 4aa61e08ade43fa1e94dc0e951f11739bbd2ae40 (diff) | |
download | gcc-c090743b2ae0095f792371c7cbeb3cf6e2978f5d.zip gcc-c090743b2ae0095f792371c7cbeb3cf6e2978f5d.tar.gz gcc-c090743b2ae0095f792371c7cbeb3cf6e2978f5d.tar.bz2 |
Fix is_gimple_condexpr vs is_gimple_condexpr_for_cond
The following fixes wrongly used is_gimple_condexpr and makes
canonicalize_cond_expr_cond honor either, delaying final checking
to callers where all but two in ifcombine are doing the correct
thing already.
This fixes bugs but is now mainly in preparation for making
COND_EXPRs in GIMPLE assignments no longer have a GENERIC expression
as condition operand like we already transitioned VEC_COND_EXPR earlier.
2022-04-11 Richard Biener <rguenther@suse.de>
* gimple-expr.cc (is_gimple_condexpr): Adjust comment.
(canonicalize_cond_expr_cond): Move here from gimple.cc,
allow both COND_EXPR and GIMPLE_COND forms.
* gimple-expr.h (canonicalize_cond_expr_cond): Declare.
* gimple.cc (canonicalize_cond_expr_cond): Remove here.
* gimple.h (canonicalize_cond_expr_cond): Likewise.
* gimple-loop-versioning.cc (loop_versioning::version_loop):
Use is_gimple_condexpr_for_cond.
* tree-parloops.cc (gen_parallel_loop): Likewise.
* tree-ssa-ifcombine.cc (ifcombine_ifandif): Check for
a proper cond expr after canonicalize_cond_expr_cond.
Use is_gimple_condexpr_for_cond where appropriate.
* tree-ssa-loop-manip.cc (determine_exit_conditions): Likewise.
* tree-vect-loop-manip.cc (slpeel_add_loop_guard): Likewise.
Diffstat (limited to 'gcc/tree-vect-loop-manip.cc')
-rw-r--r-- | gcc/tree-vect-loop-manip.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/tree-vect-loop-manip.cc b/gcc/tree-vect-loop-manip.cc index 3eddda6..1d4337e 100644 --- a/gcc/tree-vect-loop-manip.cc +++ b/gcc/tree-vect-loop-manip.cc @@ -1260,8 +1260,8 @@ slpeel_add_loop_guard (basic_block guard_bb, tree cond, enter_e->flags |= EDGE_FALSE_VALUE; gsi = gsi_last_bb (guard_bb); - cond = force_gimple_operand_1 (cond, &gimplify_stmt_list, is_gimple_condexpr, - NULL_TREE); + cond = force_gimple_operand_1 (cond, &gimplify_stmt_list, + is_gimple_condexpr_for_cond, NULL_TREE); if (gimplify_stmt_list) gsi_insert_seq_after (&gsi, gimplify_stmt_list, GSI_NEW_STMT); @@ -3478,8 +3478,8 @@ vect_loop_versioning (loop_vec_info loop_vinfo, { gimple_seq tem = NULL; cond_expr = force_gimple_operand_1 (unshare_expr (cond_expr), - &tem, - is_gimple_condexpr, NULL_TREE); + &tem, is_gimple_condexpr_for_cond, + NULL_TREE); gimple_seq_add_seq (&cond_expr_stmt_list, tem); } @@ -3521,7 +3521,7 @@ vect_loop_versioning (loop_vec_info loop_vinfo, cond_expr = force_gimple_operand_1 (unshare_expr (cond_expr), &gimplify_stmt_list, - is_gimple_condexpr, NULL_TREE); + is_gimple_condexpr_for_cond, NULL_TREE); gimple_seq_add_seq (&cond_expr_stmt_list, gimplify_stmt_list); /* Compute the outermost loop cond_expr and cond_expr_stmt_list are |