aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-vect-loop-manip.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-07-15 11:41:12 +0200
committerRichard Biener <rguenther@suse.de>2021-07-15 14:55:28 +0200
commit92acae5047e4b8c5be035f067099942a93e55d0c (patch)
tree1e3b72352d3239a11fdb26534aaf149d44fd7259 /gcc/tree-vect-loop-manip.c
parent79f71ec6fca0e093d27cb238d7c75dccb3a55d65 (diff)
downloadgcc-92acae5047e4b8c5be035f067099942a93e55d0c.zip
gcc-92acae5047e4b8c5be035f067099942a93e55d0c.tar.gz
gcc-92acae5047e4b8c5be035f067099942a93e55d0c.tar.bz2
Streamline vect_gen_while
This adjusts the vect_gen_while API to match that of vect_gen_while_not allowing further patches to generate more than one stmt for the while case. 2021-07-15 Richard Biener <rguenther@suse.de> * tree-vectorizer.h (vect_gen_while): Match up with vect_gen_while_not. * tree-vect-stmts.c (vect_gen_while): Adjust API to that of vect_gen_while_not. (vect_gen_while_not): Adjust. * tree-vect-loop-manip.c (vect_set_loop_controls_directly): Likewise.
Diffstat (limited to 'gcc/tree-vect-loop-manip.c')
-rw-r--r--gcc/tree-vect-loop-manip.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c
index c29ffb3..1f3d661 100644
--- a/gcc/tree-vect-loop-manip.c
+++ b/gcc/tree-vect-loop-manip.c
@@ -609,11 +609,8 @@ vect_set_loop_controls_directly (class loop *loop, loop_vec_info loop_vinfo,
}
if (use_masks_p)
- {
- init_ctrl = make_temp_ssa_name (ctrl_type, NULL, "max_mask");
- gimple *tmp_stmt = vect_gen_while (init_ctrl, start, end);
- gimple_seq_add_stmt (preheader_seq, tmp_stmt);
- }
+ init_ctrl = vect_gen_while (preheader_seq, ctrl_type,
+ start, end, "max_mask");
else
{
init_ctrl = make_temp_ssa_name (compare_type, NULL, "max_len");
@@ -652,9 +649,10 @@ vect_set_loop_controls_directly (class loop *loop, loop_vec_info loop_vinfo,
/* Get the control value for the next iteration of the loop. */
if (use_masks_p)
{
- next_ctrl = make_temp_ssa_name (ctrl_type, NULL, "next_mask");
- gcall *call = vect_gen_while (next_ctrl, test_index, this_test_limit);
- gsi_insert_before (test_gsi, call, GSI_SAME_STMT);
+ gimple_seq stmts = NULL;
+ next_ctrl = vect_gen_while (&stmts, ctrl_type, test_index,
+ this_test_limit, "next_mask");
+ gsi_insert_seq_before (test_gsi, stmts, GSI_SAME_STMT);
}
else
{