Pass a vec_info to vect_double_mask_nunits
authorRichard Sandiford <richard.sandiford@arm.com>
Mon, 21 Oct 2019 06:41:31 +0000 (06:41 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Mon, 21 Oct 2019 06:41:31 +0000 (06:41 +0000)
2019-10-21  Richard Sandiford  <richard.sandiford@arm.com>

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
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c
gcc/tree-vectorizer.h

index 8ae719252d398821391b0b533f5c29ae829f9873..dc092c50fcb3772cc46b2da81a18c6c1216edd33 100644 (file)
@@ -1,3 +1,10 @@
+2019-10-21  Richard Sandiford  <richard.sandiford@arm.com>
+
+       * 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  <richard.sandiford@arm.com>
 
        * tree-vectorizer.h (vect_halve_mask_nunits): Take a vec_info.
index 5c29084d6878e632509f27a2c35adfba3cc992ea..f6101f350ce160dd58ff2316c4febb0f867aed97 100644 (file)
@@ -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);
index 690e2c4012e33f83609563d3553cba809daff961..c8f158278b2223eb87c165f5ef755b7dc274033d 100644 (file)
@@ -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<tree> *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;
        }
index 4199b7cb8ac9c32cf63decc12503192c8c4c80a5..67d4894be57c12dce4476e30dad227c708e90cf3 100644 (file)
@@ -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 *,