From 00cd57389767b9a81125f999d33d509cba0ebaaf Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 28 May 2020 12:26:21 +0200 Subject: [PATCH] remove obsolete code from SLP invariant costing This removes handling of !SLP_TREE_VECTYPE from invariant costing. The single caller guards against this case already. 2020-05-28 Richard Biener * tree-vect-slp.c (vect_prologue_cost_for_slp): Remove case for !SLP_TREE_VECTYPE. (vect_slp_analyze_node_operations): Adjust. --- gcc/tree-vect-slp.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c index aa95c0a7f75..5976e91cf62 100644 --- a/gcc/tree-vect-slp.c +++ b/gcc/tree-vect-slp.c @@ -2739,19 +2739,13 @@ vect_slp_convert_to_external (vec_info *vinfo, slp_tree node, by NODE. */ static void -vect_prologue_cost_for_slp (vec_info *vinfo, - slp_tree node, +vect_prologue_cost_for_slp (slp_tree node, stmt_vector_for_cost *cost_vec) { /* Without looking at the actual initializer a vector of constants can be implemented as load from the constant pool. When all elements are the same we can use a splat. */ tree vectype = SLP_TREE_VECTYPE (node); - /* ??? Ideally we'd want all invariant nodes to have a vectype. */ - if (!vectype) - vectype = get_vectype_for_scalar_type (vinfo, - TREE_TYPE (SLP_TREE_SCALAR_OPS - (node)[0]), node); unsigned group_size = SLP_TREE_SCALAR_OPS (node).length (); unsigned num_vects_to_check; unsigned HOST_WIDE_INT const_nunits; @@ -2911,7 +2905,7 @@ vect_slp_analyze_node_operations (vec_info *vinfo, slp_tree node, SLP_TREE_NUMBER_OF_VEC_STMTS (child) = vect_get_num_vectors (vf * group_size, vector_type); /* And cost them. */ - vect_prologue_cost_for_slp (vinfo, child, cost_vec); + vect_prologue_cost_for_slp (child, cost_vec); } /* If this node can't be vectorized, try pruning the tree here rather -- 2.30.2