From: Robin Dapp Date: Fri, 7 Nov 2025 16:18:02 +0000 (+0100) Subject: vect: Give up if there is no offset_vectype. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e8cc2f09de83dc203cd86573e39f2a3e9621d8a;p=thirdparty%2Fgcc.git vect: Give up if there is no offset_vectype. vect_gather_scatter_fn_p currently ICEs if offset_vectype is NULL. This is an oversight in the patches that relax gather/scatter detection. Catch this. gcc/ChangeLog: * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Bail if offset_vectype is NULL. --- diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc index e8cfb884c1d..b35ba05fd08 100644 --- a/gcc/tree-vect-data-refs.cc +++ b/gcc/tree-vect-data-refs.cc @@ -4630,6 +4630,10 @@ vect_gather_scatter_fn_p (vec_info *vinfo, bool read_p, bool masked_p, tree offset_vectype = VECTOR_TYPE_P (offset_type) ? offset_type : get_vectype_for_scalar_type (vinfo, offset_type); + /* If there is no offset vectype, bail. */ + if (!offset_vectype) + return false; + offset_type = TREE_TYPE (offset_vectype); /* Get all supported configurations for this data vector type. */