]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Fix narrowing warning in aarch64_detect_vector_stmt_subtype
authorAndrew Pinski <quic_apinski@quicinc.com>
Sat, 10 May 2025 03:56:42 +0000 (20:56 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Fri, 16 May 2025 14:54:29 +0000 (07:54 -0700)
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 <quic_apinski@quicinc.com>
gcc/config/aarch64/aarch64-protos.h

index c935e7bcf33da74dd1b7355a1147546d8359cceb..b59eecf5bdffe5add0eacc4346e34d23941a4e98 100644 (file)
@@ -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