> On 10 May 2025, at 05:59, Andrew Pinski <quic_apin...@quicinc.com> wrote:
>
> There is a narrowing warning in aarch64_detect_vector_stmt_subtype
> about gather_load_x32_cost and gather_load_x64_cost converting from int to
> unsigned.
> These fields are always unsigned and even the constructor for sve_vec_cost
> takes
> an unsigned. So let's just move the fields over to unsigned.
>
> Build and tested for aarch64-linux-gnu.
Ok, I had noticed that annoying warning too.
Thanks,
Kyrill
>
> gcc/ChangeLog:
>
> * config/aarch64/aarch64-protos.h (struct sve_vec_cost): Change
> gather_load_x32_cost
> and gather_load_x64_cost fields to unsigned.
>
> Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>
> ---
> gcc/config/aarch64/aarch64-protos.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/aarch64/aarch64-protos.h
> b/gcc/config/aarch64/aarch64-protos.h
> index c935e7bcf33..b59eecf5bdf 100644
> --- a/gcc/config/aarch64/aarch64-protos.h
> +++ b/gcc/config/aarch64/aarch64-protos.h
> @@ -290,8 +290,8 @@ struct sve_vec_cost : simd_vec_cost
>
> /* The cost of a gather load instruction. The x32 value is for loads
> of 32-bit elements and the x64 value is for loads of 64-bit elements. */
> - const int gather_load_x32_cost;
> - const int gather_load_x64_cost;
> + const unsigned int gather_load_x32_cost;
> + const unsigned int gather_load_x64_cost;
>
> /* Additional loop initialization cost of using a gather load instruction.
> The x32
> value is for loads of 32-bit elements and the x64 value is for loads of
> --
> 2.43.0
>