slp_tree slp_node,
vec_load_store_type vls_type,
int group_size,
- vect_memory_access_type
- memory_access_type,
- const gather_scatter_info *gs_info,
+ vect_load_store_data *ls,
slp_tree mask_node,
vec<int> *elsvals = nullptr)
{
+ vect_memory_access_type memory_access_type = ls->memory_access_type;
+
/* Invariant loads need no special support. */
if (memory_access_type == VMAT_INVARIANT)
return;
internal_fn len_ifn = (is_load
? IFN_MASK_LEN_GATHER_LOAD
: IFN_MASK_LEN_SCATTER_STORE);
+ stmt_vec_info repr = SLP_TREE_REPRESENTATIVE (slp_node);
+ tree off_vectype = (STMT_VINFO_GATHER_SCATTER_P (repr)
+ ? SLP_TREE_VECTYPE (SLP_TREE_CHILDREN (slp_node)[0])
+ : ls->strided_offset_vectype);
+ tree memory_type = TREE_TYPE (DR_REF (STMT_VINFO_DR_INFO (repr)->dr));
+ int scale = SLP_TREE_GS_SCALE (slp_node);
if (internal_gather_scatter_fn_supported_p (len_ifn, vectype,
- gs_info->memory_type,
- gs_info->offset_vectype,
- gs_info->scale,
+ memory_type,
+ off_vectype, scale,
elsvals))
vect_record_loop_len (loop_vinfo, lens, nvectors, vectype, 1);
else if (internal_gather_scatter_fn_supported_p (ifn, vectype,
- gs_info->memory_type,
- gs_info->offset_vectype,
- gs_info->scale,
+ memory_type,
+ off_vectype, scale,
elsvals)
|| memory_access_type == VMAT_GATHER_SCATTER_LEGACY)
vect_record_loop_mask (loop_vinfo, masks, nvectors, vectype,
get_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
tree vectype, slp_tree slp_node,
bool masked_p, vec_load_store_type vls_type,
- vect_memory_access_type *memory_access_type,
- poly_int64 *poffset,
- dr_alignment_support *alignment_support_scheme,
- int *misalignment,
- gather_scatter_info *gs_info,
- internal_fn *lanes_ifn,
- vec<int> *elsvals = nullptr)
+ vect_load_store_data *ls)
{
+ vect_memory_access_type *memory_access_type = &ls->memory_access_type;
+ poly_int64 *poffset = &ls->poffset;
+ dr_alignment_support *alignment_support_scheme
+ = &ls->alignment_support_scheme;
+ int *misalignment = &ls->misalignment;
+ internal_fn *lanes_ifn = &ls->lanes_ifn;
+ vec<int> *elsvals = &ls->elsvals;
loop_vec_info loop_vinfo = dyn_cast <loop_vec_info> (vinfo);
poly_uint64 nunits = TYPE_VECTOR_SUBPARTS (vectype);
class loop *loop = loop_vinfo ? LOOP_VINFO_LOOP (loop_vinfo) : NULL;
{
slp_tree offset_node = SLP_TREE_CHILDREN (slp_node)[0];
tree offset_vectype = SLP_TREE_VECTYPE (offset_node);
- memset (gs_info, 0, sizeof (gather_scatter_info));
- gs_info->offset_vectype = offset_vectype;
- gs_info->scale = SLP_TREE_GS_SCALE (slp_node);
- gs_info->base = SLP_TREE_GS_BASE (slp_node);
- gs_info->memory_type = TREE_TYPE (DR_REF (first_dr_info->dr));
- gs_info->decl = NULL_TREE;
- gs_info->ifn = IFN_LAST;
+ int scale = SLP_TREE_GS_SCALE (slp_node);
+ tree memory_type = TREE_TYPE (DR_REF (first_dr_info->dr));
tree tem;
if (vect_gather_scatter_fn_p (loop_vinfo, vls_type == VLS_LOAD,
masked_p, vectype,
- gs_info->memory_type,
- offset_vectype, gs_info->scale,
- &gs_info->ifn, &tem,
+ memory_type,
+ offset_vectype, scale,
+ &ls->gs.ifn, &tem,
elsvals))
*memory_access_type = VMAT_GATHER_SCATTER_IFN;
else if (vls_type == VLS_LOAD
? (targetm.vectorize.builtin_gather
- && (gs_info->decl
+ && (ls->gs.decl
= targetm.vectorize.builtin_gather (vectype,
TREE_TYPE
(offset_vectype),
- gs_info->scale)))
+ scale)))
: (targetm.vectorize.builtin_scatter
- && (gs_info->decl
+ && (ls->gs.decl
= targetm.vectorize.builtin_scatter (vectype,
TREE_TYPE
(offset_vectype),
- gs_info->scale))))
+ scale))))
*memory_access_type = VMAT_GATHER_SCATTER_LEGACY;
else
{
|| *memory_access_type == VMAT_STRIDED_SLP)
&& !STMT_VINFO_GATHER_SCATTER_P (stmt_info)
&& SLP_TREE_LANES (slp_node) == 1
- && loop_vinfo
- && vect_use_strided_gather_scatters_p (stmt_info, vectype, loop_vinfo,
- masked_p, gs_info, elsvals,
- group_size, single_element_p))
- *memory_access_type = VMAT_GATHER_SCATTER_IFN;
+ && loop_vinfo)
+ {
+ gather_scatter_info gs_info;
+ if (vect_use_strided_gather_scatters_p (stmt_info, vectype, loop_vinfo,
+ masked_p, &gs_info, elsvals,
+ group_size, single_element_p))
+ {
+ SLP_TREE_GS_SCALE (slp_node) = gs_info.scale;
+ SLP_TREE_GS_BASE (slp_node) = error_mark_node;
+ ls->gs.ifn = gs_info.ifn;
+ ls->strided_offset_vectype = gs_info.offset_vectype;
+ *memory_access_type = VMAT_GATHER_SCATTER_IFN;
+ }
+ }
if (*memory_access_type == VMAT_CONTIGUOUS_DOWN
|| *memory_access_type == VMAT_CONTIGUOUS_REVERSE)
static gimple *
vect_build_one_gather_load_call (vec_info *vinfo, stmt_vec_info stmt_info,
- tree vectype,
- gimple_stmt_iterator *gsi,
- const gather_scatter_info *gs_info,
+ slp_tree slp_node, tree vectype,
+ gimple_stmt_iterator *gsi, tree decl,
tree ptr, tree offset, tree mask)
{
- tree arglist = TYPE_ARG_TYPES (TREE_TYPE (gs_info->decl));
- tree rettype = TREE_TYPE (TREE_TYPE (gs_info->decl));
+ tree arglist = TYPE_ARG_TYPES (TREE_TYPE (decl));
+ tree rettype = TREE_TYPE (TREE_TYPE (decl));
tree srctype = TREE_VALUE (arglist); arglist = TREE_CHAIN (arglist);
/* ptrtype */ arglist = TREE_CHAIN (arglist);
tree idxtype = TREE_VALUE (arglist); arglist = TREE_CHAIN (arglist);
mask_op = vect_build_all_ones_mask (vinfo, stmt_info, masktype);
}
- tree scale = build_int_cst (scaletype, gs_info->scale);
- gimple *new_stmt = gimple_build_call (gs_info->decl, 5, src_op, ptr, op,
+ tree scale = build_int_cst (scaletype, SLP_TREE_GS_SCALE (slp_node));
+ gimple *new_stmt = gimple_build_call (decl, 5, src_op, ptr, op,
mask_op, scale);
if (!useless_type_conversion_p (vectype, rettype))
static gimple *
vect_build_one_scatter_store_call (vec_info *vinfo, stmt_vec_info stmt_info,
+ slp_tree slp_node,
gimple_stmt_iterator *gsi,
- const gather_scatter_info *gs_info,
+ tree decl,
tree ptr, tree offset, tree oprnd, tree mask)
{
- tree rettype = TREE_TYPE (TREE_TYPE (gs_info->decl));
- tree arglist = TYPE_ARG_TYPES (TREE_TYPE (gs_info->decl));
+ tree rettype = TREE_TYPE (TREE_TYPE (decl));
+ tree arglist = TYPE_ARG_TYPES (TREE_TYPE (decl));
/* tree ptrtype = TREE_VALUE (arglist); */ arglist = TREE_CHAIN (arglist);
tree masktype = TREE_VALUE (arglist); arglist = TREE_CHAIN (arglist);
tree idxtype = TREE_VALUE (arglist); arglist = TREE_CHAIN (arglist);
op = var;
}
- tree scale = build_int_cst (scaletype, gs_info->scale);
+ tree scale = build_int_cst (scaletype, SLP_TREE_GS_SCALE (slp_node));
gcall *new_stmt
- = gimple_build_call (gs_info->decl, 5, ptr, mask_arg, op, src, scale);
+ = gimple_build_call (decl, 5, ptr, mask_arg, op, src, scale);
return new_stmt;
}
static void
vect_get_gather_scatter_ops (class loop *loop, slp_tree slp_node,
- const gather_scatter_info *gs_info,
tree *dataref_ptr, vec<tree> *vec_offset)
{
gimple_seq stmts = NULL;
- *dataref_ptr = force_gimple_operand (gs_info->base, &stmts, true, NULL_TREE);
+ *dataref_ptr = force_gimple_operand (SLP_TREE_GS_BASE (slp_node),
+ &stmts, true, NULL_TREE);
if (stmts != NULL)
{
basic_block new_bb;
I * DR_STEP / SCALE. */
static void
-vect_get_strided_load_store_ops (stmt_vec_info stmt_info, tree vectype,
+vect_get_strided_load_store_ops (stmt_vec_info stmt_info, slp_tree node,
+ tree vectype, tree offset_vectype,
loop_vec_info loop_vinfo,
gimple_stmt_iterator *gsi,
- const gather_scatter_info *gs_info,
tree *dataref_bump, tree *vec_offset,
vec_loop_lens *loop_lens)
{
/* The offset given in GS_INFO can have pointer type, so use the element
type of the vector instead. */
- tree offset_type = TREE_TYPE (gs_info->offset_vectype);
+ tree offset_type = TREE_TYPE (offset_vectype);
/* Calculate X = DR_STEP / SCALE and convert it to the appropriate type. */
tree step = size_binop (EXACT_DIV_EXPR, unshare_expr (DR_STEP (dr)),
- ssize_int (gs_info->scale));
+ ssize_int (SLP_TREE_GS_SCALE (node)));
step = fold_convert (offset_type, step);
/* Create {0, X, X*2, X*3, ...}. */
- tree offset = fold_build2 (VEC_SERIES_EXPR, gs_info->offset_vectype,
+ tree offset = fold_build2 (VEC_SERIES_EXPR, offset_vectype,
build_zero_cst (offset_type), step);
*vec_offset = cse_and_gimplify_to_preheader (loop_vinfo, offset);
}
unsigned int vec_num;
bb_vec_info bb_vinfo = dyn_cast <bb_vec_info> (vinfo);
tree aggr_type;
- gather_scatter_info gs_info;
poly_uint64 vf;
vec_load_store_type vls_type;
tree ref_type;
if (!STMT_VINFO_DATA_REF (stmt_info))
return false;
- vect_memory_access_type memory_access_type;
- enum dr_alignment_support alignment_support_scheme;
- int misalignment;
- poly_int64 poffset;
- internal_fn lanes_ifn;
- if (!get_load_store_type (vinfo, stmt_info, vectype, slp_node, mask_node,
- vls_type, &memory_access_type, &poffset,
- &alignment_support_scheme, &misalignment, &gs_info,
- &lanes_ifn))
+ vect_load_store_data _ls_data;
+ vect_load_store_data &ls = slp_node->get_data (_ls_data);
+ if (cost_vec
+ && !get_load_store_type (vinfo, stmt_info, vectype, slp_node, mask_node,
+ vls_type, &_ls_data))
return false;
+ /* Temporary aliases to analysis data, should not be modified through
+ these. */
+ const vect_memory_access_type memory_access_type = ls.memory_access_type;
+ const dr_alignment_support alignment_support_scheme
+ = ls.alignment_support_scheme;
+ const int misalignment = ls.misalignment;
+ const poly_int64 poffset = ls.poffset;
+ const internal_fn lanes_ifn = ls.lanes_ifn;
if (slp_node->ldst_lanes
&& memory_access_type != VMAT_LOAD_STORE_LANES)
bool costing_p = cost_vec;
if (costing_p) /* transformation not required. */
{
- SLP_TREE_MEMORY_ACCESS_TYPE (slp_node) = memory_access_type;
-
if (loop_vinfo
&& LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
check_load_store_for_partial_vectors (loop_vinfo, vectype, slp_node,
- vls_type, group_size,
- memory_access_type, &gs_info,
+ vls_type, group_size, &ls,
mask_node);
if (!vect_maybe_update_slp_op_vectype (op_node, vectype)
"Vectorizing an unaligned access.\n");
SLP_TREE_TYPE (slp_node) = store_vec_info_type;
+ slp_node->data = new vect_load_store_data (std::move (ls));
}
- gcc_assert (memory_access_type == SLP_TREE_MEMORY_ACCESS_TYPE (slp_node));
/* Transform. */
...
*/
+ /* ??? Modify local copies of alignment_support_scheme and
+ misalignment, but this part of analysis should be done
+ earlier and remembered, likewise the chosen load mode. */
+ const dr_alignment_support tem = alignment_support_scheme;
+ dr_alignment_support alignment_support_scheme = tem;
+ const int tem2 = misalignment;
+ int misalignment = tem2;
+
unsigned nstores = const_nunits;
unsigned lnel = 1;
tree ltype = elem_type;
{
aggr_type = elem_type;
if (!costing_p)
- vect_get_strided_load_store_ops (stmt_info, vectype, loop_vinfo,
- gsi, &gs_info,
+ vect_get_strided_load_store_ops (stmt_info, slp_node, vectype,
+ ls.strided_offset_vectype,
+ loop_vinfo, gsi,
&bump, &vec_offset, loop_lens);
}
else
vect_get_slp_defs (mask_node, &vec_masks);
if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
- vect_get_gather_scatter_ops (loop, slp_node, &gs_info,
+ vect_get_gather_scatter_ops (loop, slp_node,
&dataref_ptr, &vec_offsets);
else
dataref_ptr
if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
vec_offset = vec_offsets[j];
- tree scale = size_int (gs_info.scale);
+ tree scale = size_int (SLP_TREE_GS_SCALE (slp_node));
- if (gs_info.ifn == IFN_MASK_LEN_SCATTER_STORE)
+ if (ls.gs.ifn == IFN_MASK_LEN_SCATTER_STORE)
{
if (loop_lens)
final_len = vect_get_loop_len (loop_vinfo, gsi,
continue;
}
+ tree offset_vectype = TREE_TYPE (vec_offsets[0]);
poly_uint64 offset_nunits
- = TYPE_VECTOR_SUBPARTS (gs_info.offset_vectype);
+ = TYPE_VECTOR_SUBPARTS (offset_vectype);
if (known_eq (nunits, offset_nunits))
{
new_stmt = vect_build_one_scatter_store_call
- (vinfo, stmt_info, gsi, &gs_info,
- dataref_ptr, vec_offsets[j],
+ (vinfo, stmt_info, slp_node, gsi,
+ ls.gs.decl, dataref_ptr, vec_offsets[j],
vec_oprnd, final_mask);
vect_finish_stmt_generation (vinfo, stmt_info,
new_stmt, gsi);
lanes but the builtins will store full vectype
data from the lower lanes. */
new_stmt = vect_build_one_scatter_store_call
- (vinfo, stmt_info, gsi, &gs_info,
+ (vinfo, stmt_info, slp_node, gsi, ls.gs.decl,
dataref_ptr, vec_offsets[2 * j],
vec_oprnd, final_mask);
vect_finish_stmt_generation (vinfo, stmt_info,
VEC_UNPACK_HI_EXPR,
final_mask);
final_mask = make_ssa_name
- (truth_type_for (gs_info.offset_vectype));
+ (truth_type_for (offset_vectype));
gimple_set_lhs (new_stmt, final_mask);
vect_finish_stmt_generation (vinfo, stmt_info,
new_stmt, gsi);
}
new_stmt = vect_build_one_scatter_store_call
- (vinfo, stmt_info, gsi, &gs_info,
+ (vinfo, stmt_info, slp_node, gsi, ls.gs.decl,
dataref_ptr, vec_offsets[2 * j + 1],
vec_oprnd, final_mask);
vect_finish_stmt_generation (vinfo, stmt_info,
}
new_stmt = vect_build_one_scatter_store_call
- (vinfo, stmt_info, gsi, &gs_info,
- dataref_ptr, vec_offset,
+ (vinfo, stmt_info, slp_node, gsi,
+ ls.gs.decl, dataref_ptr, vec_offset,
vec_oprnd, final_mask);
vect_finish_stmt_generation (vinfo, stmt_info,
new_stmt, gsi);
continue;
}
+ tree offset_vectype = TREE_TYPE (vec_offsets[0]);
unsigned HOST_WIDE_INT const_nunits = nunits.to_constant ();
unsigned HOST_WIDE_INT const_offset_nunits
- = TYPE_VECTOR_SUBPARTS (gs_info.offset_vectype).to_constant ();
+ = TYPE_VECTOR_SUBPARTS (offset_vectype).to_constant ();
vec<constructor_elt, va_gc> *ctor_elts;
vec_alloc (ctor_elts, const_nunits);
gimple_seq stmts = NULL;
unsigned elt_offset
= (j % factor) * const_nunits;
tree idx_type = TREE_TYPE (TREE_TYPE (vec_offset));
- tree scale = size_int (gs_info.scale);
+ tree scale = size_int (SLP_TREE_GS_SCALE (slp_node));
tree ltype = build_aligned_type (TREE_TYPE (vectype), align);
for (unsigned k = 0; k < const_nunits; ++k)
{
bb_vec_info bb_vinfo = dyn_cast <bb_vec_info> (vinfo);
poly_uint64 vf;
tree aggr_type;
- gather_scatter_info gs_info;
tree ref_type;
enum vect_def_type mask_dt = vect_unknown_def_type;
enum vect_def_type els_dt = vect_unknown_def_type;
else
group_size = 1;
- vect_memory_access_type memory_access_type;
- enum dr_alignment_support alignment_support_scheme;
- int misalignment;
- poly_int64 poffset;
- internal_fn lanes_ifn;
- auto_vec<int> elsvals;
- int maskload_elsval = 0;
- bool need_zeroing = false;
- if (!get_load_store_type (vinfo, stmt_info, vectype, slp_node, mask_node,
- VLS_LOAD, &memory_access_type, &poffset,
- &alignment_support_scheme, &misalignment, &gs_info,
- &lanes_ifn, &elsvals))
+ vect_load_store_data _ls_data;
+ vect_load_store_data &ls = slp_node->get_data (_ls_data);
+ if (cost_vec
+ && !get_load_store_type (vinfo, stmt_info, vectype, slp_node, mask_node,
+ VLS_LOAD, &ls))
return false;
+ /* Temporary aliases to analysis data, should not be modified through
+ these. */
+ const vect_memory_access_type memory_access_type = ls.memory_access_type;
+ const dr_alignment_support alignment_support_scheme
+ = ls.alignment_support_scheme;
+ const int misalignment = ls.misalignment;
+ const poly_int64 poffset = ls.poffset;
+ const internal_fn lanes_ifn = ls.lanes_ifn;
+ const vec<int> &elsvals = ls.elsvals;
+ int maskload_elsval = 0;
+ bool need_zeroing = false;
/* We might need to explicitly zero inactive elements if there are
padding bits in the type that might leak otherwise.
if (!VECTOR_MODE_P (vec_mode)
|| !can_vec_mask_load_store_p (vec_mode,
TYPE_MODE (mask_vectype),
- true, NULL, &elsvals))
+ true, NULL, &ls.elsvals))
return false;
}
else if (memory_access_type != VMAT_LOAD_STORE_LANES
return false;
}
- SLP_TREE_MEMORY_ACCESS_TYPE (slp_node) = memory_access_type;
-
if (loop_vinfo
&& LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
check_load_store_for_partial_vectors (loop_vinfo, vectype, slp_node,
- VLS_LOAD, group_size,
- memory_access_type, &gs_info,
- mask_node, &elsvals);
+ VLS_LOAD, group_size, &ls,
+ mask_node, &ls.elsvals);
if (dump_enabled_p ()
&& memory_access_type != VMAT_ELEMENTWISE
vinfo->any_known_not_updated_vssa = true;
SLP_TREE_TYPE (slp_node) = load_vec_info_type;
- }
- else
- {
- /* Here just get the else values. */
- if (loop_vinfo
- && LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P (loop_vinfo))
- check_load_store_for_partial_vectors (loop_vinfo, vectype, slp_node,
- VLS_LOAD, group_size,
- memory_access_type, &gs_info,
- mask_node, &elsvals);
+ slp_node->data = new vect_load_store_data (std::move (ls));
}
/* If the type needs padding we must zero inactive elements.
if (elsvals.length ())
maskload_elsval = *elsvals.begin ();
- gcc_assert (memory_access_type == SLP_TREE_MEMORY_ACCESS_TYPE (slp_node));
-
if (dump_enabled_p () && !costing_p)
dump_printf_loc (MSG_NOTE, vect_location, "transform load.\n");
tree ltype = TREE_TYPE (vectype);
tree lvectype = vectype;
auto_vec<tree> dr_chain;
+ /* ??? Modify local copies of alignment_support_scheme and
+ misalignment, but this part of analysis should be done
+ earlier and remembered, likewise the chosen load mode. */
+ const dr_alignment_support tem = alignment_support_scheme;
+ dr_alignment_support alignment_support_scheme = tem;
+ const int tem2 = misalignment;
+ int misalignment = tem2;
if (memory_access_type == VMAT_STRIDED_SLP)
{
HOST_WIDE_INT n = gcd (group_size, const_nunits);
aggr_type = NULL_TREE;
bump = NULL_TREE;
if (!costing_p)
- vect_get_gather_scatter_ops (loop, slp_node, &gs_info, &dataref_ptr,
+ vect_get_gather_scatter_ops (loop, slp_node, &dataref_ptr,
&vec_offsets);
}
else
aggr_type = elem_type;
if (!costing_p)
{
- vect_get_strided_load_store_ops (stmt_info, vectype, loop_vinfo,
- gsi, &gs_info,
+ vect_get_strided_load_store_ops (stmt_info, slp_node, vectype,
+ ls.strided_offset_vectype,
+ loop_vinfo, gsi,
&bump, &vec_offset, loop_lens);
dataref_ptr
= vect_create_data_ref_ptr (vinfo, first_stmt_info, aggr_type,
if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
vec_offset = vec_offsets[i];
tree zero = build_zero_cst (vectype);
- tree scale = size_int (gs_info.scale);
+ tree scale = size_int (SLP_TREE_GS_SCALE (slp_node));
- if (gs_info.ifn == IFN_MASK_LEN_GATHER_LOAD)
+ if (ls.gs.ifn == IFN_MASK_LEN_GATHER_LOAD)
{
if (loop_lens)
final_len = vect_get_loop_len (loop_vinfo, gsi, loop_lens,
slp_node, 0, vect_body);
continue;
}
- poly_uint64 offset_nunits
- = TYPE_VECTOR_SUBPARTS (gs_info.offset_vectype);
+ tree offset_vectype = TREE_TYPE (vec_offsets[0]);
+ poly_uint64 offset_nunits = TYPE_VECTOR_SUBPARTS (offset_vectype);
if (known_eq (nunits, offset_nunits))
{
new_stmt = vect_build_one_gather_load_call
- (vinfo, stmt_info, vectype, gsi, &gs_info,
- dataref_ptr, vec_offsets[i], final_mask);
+ (vinfo, stmt_info, slp_node, vectype, gsi,
+ ls.gs.decl, dataref_ptr, vec_offsets[i],
+ final_mask);
data_ref = NULL_TREE;
}
else if (known_eq (nunits, offset_nunits * 2))
lanes but the builtins will produce full vectype
data with just the lower lanes filled. */
new_stmt = vect_build_one_gather_load_call
- (vinfo, stmt_info, vectype, gsi, &gs_info,
- dataref_ptr, vec_offsets[2 * i], final_mask);
+ (vinfo, stmt_info, slp_node, vectype, gsi,
+ ls.gs.decl, dataref_ptr, vec_offsets[2 * i],
+ final_mask);
tree low = make_ssa_name (vectype);
gimple_set_lhs (new_stmt, low);
vect_finish_stmt_generation (vinfo, stmt_info, new_stmt, gsi);
VEC_UNPACK_HI_EXPR,
final_mask);
final_mask = make_ssa_name
- (truth_type_for (gs_info.offset_vectype));
+ (truth_type_for (offset_vectype));
gimple_set_lhs (new_stmt, final_mask);
vect_finish_stmt_generation (vinfo, stmt_info,
new_stmt, gsi);
}
new_stmt = vect_build_one_gather_load_call
- (vinfo, stmt_info, vectype, gsi, &gs_info,
- dataref_ptr,
+ (vinfo, stmt_info, slp_node, vectype, gsi,
+ ls.gs.decl, dataref_ptr,
vec_offsets[2 * i + 1], final_mask);
tree high = make_ssa_name (vectype);
gimple_set_lhs (new_stmt, high);
new_stmt, gsi);
}
new_stmt = vect_build_one_gather_load_call
- (vinfo, stmt_info, vectype, gsi, &gs_info,
+ (vinfo, stmt_info, slp_node, vectype, gsi,
+ ls.gs.decl,
dataref_ptr, vec_offset, final_mask);
data_ref = NULL_TREE;
}
slp_node, 0, vect_body);
continue;
}
+ tree offset_vectype = TREE_TYPE (vec_offsets[0]);
unsigned HOST_WIDE_INT const_offset_nunits
- = TYPE_VECTOR_SUBPARTS (gs_info.offset_vectype) .to_constant ();
+ = TYPE_VECTOR_SUBPARTS (offset_vectype).to_constant ();
vec<constructor_elt, va_gc> *ctor_elts;
vec_alloc (ctor_elts, const_nunits);
gimple_seq stmts = NULL;
vec_offset = vec_offsets[i / factor];
unsigned elt_offset = (i % factor) * const_nunits;
tree idx_type = TREE_TYPE (TREE_TYPE (vec_offset));
- tree scale = size_int (gs_info.scale);
+ tree scale = size_int (SLP_TREE_GS_SCALE (slp_node));
tree ltype = build_aligned_type (TREE_TYPE (vectype), align);
for (unsigned k = 0; k < const_nunits; ++k)
{