The following fixes an error in the SLP of emulated gathers,
discovered by x86 specific tests when enabling single-lane SLP.
* tree-vect-stmts.cc (vectorizable_load): Adjust offset
vector gathering for SLP of emulated gathers.
than the data vector for now. */
unsigned HOST_WIDE_INT factor
= const_offset_nunits / const_nunits;
- vec_offset = vec_offsets[j / factor];
+ vec_offset = vec_offsets[(vec_num * j + i) / factor];
unsigned elt_offset = (j % factor) * const_nunits;
tree idx_type = TREE_TYPE (TREE_TYPE (vec_offset));
tree scale = size_int (gs_info.scale);