]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vect: Give up if there is no offset_vectype.
authorRobin Dapp <rdapp@ventanamicro.com>
Fri, 7 Nov 2025 16:18:02 +0000 (17:18 +0100)
committerRobin Dapp <rdapp@ventanamicro.com>
Mon, 10 Nov 2025 12:50:26 +0000 (13:50 +0100)
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.

gcc/tree-vect-data-refs.cc

index e8cfb884c1d0888fea86124e085b0bcc252280d3..b35ba05fd08b983a99a14e0ce50b6a6febf55909 100644 (file)
@@ -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.  */