On Fri, Nov 7, 2025 at 7:41 PM Robin Dapp <[email protected]> wrote:
>
> Hi,
>
> vect_gather_scatter_fn_p currently ICEs if offset_vectype is NULL.  This is an
> oversight in the patches that relax the gather/scatter detection.  Catch this.
>
> Bootstrapped and regtested on x86 and power10.  Regtested on aarch64 and
> riscv64.

OK.

> Regards
>  Robin
>
> gcc/ChangeLog:
>
>         * tree-vect-data-refs.cc (vect_gather_scatter_fn_p): Bail if
>         offset_vectype is NULL.
> ---
>  gcc/tree-vect-data-refs.cc | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
> index 9c87cc1de6d..b880a6f0566 100644
> --- a/gcc/tree-vect-data-refs.cc
> +++ b/gcc/tree-vect-data-refs.cc
> @@ -4631,6 +4631,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 related vectype, bail.  */
> +  if (!offset_vectype)
> +    return false;
> +
>    offset_type = TREE_TYPE (offset_vectype);
>
>    /* Get all supported configurations for this data vector type.  */
> --
> 2.51.0
>

Reply via email to