My previous change broke the usage of gather for strided loads.
The following fixes it.
2021-08-11 Richard Biener <rguenther@suse.de>
PR tree-optimization/101861
* tree-vect-stmts.c (vectorizable_load): Fix error in
previous change with regard to gather vectorization.
if (memory_access_type == VMAT_GATHER_SCATTER
&& gs_info.ifn != IFN_LAST)
{
- vec_offset = vec_offsets[j];
+ if (STMT_VINFO_GATHER_SCATTER_P (stmt_info))
+ vec_offset = vec_offsets[j];
tree zero = build_zero_cst (vectype);
tree scale = size_int (gs_info.scale);
gcall *call;