From 8d1473958808fe4714ec24991ac83ee6cbf45397 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Mon, 21 Oct 2019 06:41:31 +0000 Subject: [PATCH] Pass a vec_info to vect_double_mask_nunits 2019-10-21 Richard Sandiford gcc/ * tree-vectorizer.h (vect_double_mask_nunits): Take a vec_info. * tree-vect-loop.c (vect_double_mask_nunits): Likewise. * tree-vect-stmts.c (supportable_narrowing_operation): Update call accordingly. From-SVN: r277234 --- gcc/ChangeLog | 7 +++++++ gcc/tree-vect-loop.c | 2 +- gcc/tree-vect-stmts.c | 4 ++-- gcc/tree-vectorizer.h | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ae719252d3..dc092c50fcb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2019-10-21 Richard Sandiford + + * tree-vectorizer.h (vect_double_mask_nunits): Take a vec_info. + * tree-vect-loop.c (vect_double_mask_nunits): Likewise. + * tree-vect-stmts.c (supportable_narrowing_operation): Update call + accordingly. + 2019-10-21 Richard Sandiford * tree-vectorizer.h (vect_halve_mask_nunits): Take a vec_info. diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 5c29084d687..f6101f350ce 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -7754,7 +7754,7 @@ vect_halve_mask_nunits (vec_info *, tree type) /* Return a mask type with twice as many elements as TYPE. */ tree -vect_double_mask_nunits (tree type) +vect_double_mask_nunits (vec_info *, tree type) { poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (type) * 2; return build_truth_vector_type (nunits, current_vector_size); diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 690e2c4012e..c8f158278b2 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -11650,7 +11650,7 @@ supportable_widening_operation (enum tree_code code, stmt_vec_info stmt_info, narrowing operation (short in the above example). */ bool -supportable_narrowing_operation (vec_info *, enum tree_code code, +supportable_narrowing_operation (vec_info *vinfo, enum tree_code code, tree vectype_out, tree vectype_in, enum tree_code *code1, int *multi_step_cvt, vec *interm_types) @@ -11759,7 +11759,7 @@ supportable_narrowing_operation (vec_info *, enum tree_code code, intermediate_mode = insn_data[icode1].operand[0].mode; if (VECTOR_BOOLEAN_TYPE_P (prev_type)) { - intermediate_type = vect_double_mask_nunits (prev_type); + intermediate_type = vect_double_mask_nunits (vinfo, prev_type); if (intermediate_mode != TYPE_MODE (intermediate_type)) return false; } diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index 4199b7cb8ac..67d4894be57 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -1706,7 +1706,7 @@ extern tree vect_build_loop_niters (loop_vec_info, bool * = NULL); extern void vect_gen_vector_loop_niters (loop_vec_info, tree, tree *, tree *, bool); extern tree vect_halve_mask_nunits (vec_info *, tree); -extern tree vect_double_mask_nunits (tree); +extern tree vect_double_mask_nunits (vec_info *, tree); extern void vect_record_loop_mask (loop_vec_info, vec_loop_masks *, unsigned int, tree, tree); extern tree vect_get_loop_mask (gimple_stmt_iterator *, vec_loop_masks *, -- 2.30.2