+2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
+
+ * tree-vectorizer.h (vect_supportable_shift): Take a vec_info.
+ * tree-vect-stmts.c (vect_supportable_shift): Likewise.
+ * tree-vect-patterns.c (vect_synth_mult_by_constant): Update call
+ accordingly.
+
2019-10-21 Richard Sandiford <richard.sandiford@arm.com>
* tree-vectorizer.c (get_vec_alignment_for_array_type): Use
vect_synth_mult_by_constant (tree op, tree val,
stmt_vec_info stmt_vinfo)
{
+ vec_info *vinfo = stmt_vinfo->vinfo;
tree itype = TREE_TYPE (op);
machine_mode mode = TYPE_MODE (itype);
struct algorithm alg;
/* Targets that don't support vector shifts but support vector additions
can synthesize shifts that way. */
- bool synth_shift_p = !vect_supportable_shift (LSHIFT_EXPR, multtype);
+ bool synth_shift_p = !vect_supportable_shift (vinfo, LSHIFT_EXPR, multtype);
HOST_WIDE_INT hwval = tree_to_shwi (val);
/* Use MAX_COST here as we don't want to limit the sequence on rtx costs.
either as shift by a scalar or by a vector. */
bool
-vect_supportable_shift (enum tree_code code, tree scalar_type)
+vect_supportable_shift (vec_info *, enum tree_code code, tree scalar_type)
{
machine_mode vec_mode;
stmt_vector_for_cost *, bool);
extern void vect_get_store_cost (stmt_vec_info, int,
unsigned int *, stmt_vector_for_cost *);
-extern bool vect_supportable_shift (enum tree_code, tree);
+extern bool vect_supportable_shift (vec_info *, enum tree_code, tree);
extern tree vect_gen_perm_mask_any (tree, const vec_perm_indices &);
extern tree vect_gen_perm_mask_checked (tree, const vec_perm_indices &);
extern void optimize_mask_stores (class loop*);