From: Andrew Pinski Date: Sat, 10 May 2025 03:56:42 +0000 (-0700) Subject: aarch64: Fix narrowing warning in aarch64_detect_vector_stmt_subtype X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=60e24acbcd7e7fb844d0e98885f20f3fb1f49f0b;p=thirdparty%2Fgcc.git aarch64: Fix narrowing warning in aarch64_detect_vector_stmt_subtype 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. 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 --- 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