aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2023-06-14 17:08:03 +0100
committerKyrylo Tkachov <kyrylo.tkachov@arm.com>2023-06-14 17:08:03 +0100
commit5eeff09a74391add05f609761bdc62c98476017a (patch)
tree69d26cdba8046b68dd2af5e9f6dcdba272e16dcb /gcc
parent9ef1391d86be504226ed446b9c29024f2c1d5045 (diff)
downloadgcc-5eeff09a74391add05f609761bdc62c98476017a.zip
gcc-5eeff09a74391add05f609761bdc62c98476017a.tar.gz
gcc-5eeff09a74391add05f609761bdc62c98476017a.tar.bz2
aarch64: Fix -Werror=sign-compare bootstrap failure
Pushing to fix bootstrap. gcc/ChangeLog: * config/aarch64/aarch64-sve-builtins-base.cc (svlast_impl::fold): Fix signed comparison warning in loop from npats to enelts.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64-sve-builtins-base.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/config/aarch64/aarch64-sve-builtins-base.cc b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
index 9b766ff..95b4cb8 100644
--- a/gcc/config/aarch64/aarch64-sve-builtins-base.cc
+++ b/gcc/config/aarch64/aarch64-sve-builtins-base.cc
@@ -1088,7 +1088,7 @@ public:
int step = f.type_suffix (0).element_bytes;
int step_1 = gcd (step, VECTOR_CST_NPATTERNS (pred));
int npats = VECTOR_CST_NPATTERNS (pred);
- unsigned HOST_WIDE_INT enelts = vector_cst_encoded_nelts (pred);
+ unsigned enelts = vector_cst_encoded_nelts (pred);
tree b = NULL_TREE;
unsigned HOST_WIDE_INT nelts;
@@ -1130,13 +1130,13 @@ public:
/* Restrict the scope of search to NPATS if vector is
variable-length for linear search later. */
nelts = npats;
- for (i = npats; i < enelts; i += step_1)
+ for (unsigned j = npats; j < enelts; j += step_1)
{
/* If there are active elements in the repeated pattern of a
variable-length vector, then return NULL as there is no
way to be sure statically if this falls within the
Advanced SIMD range. */
- if (!integer_zerop (VECTOR_CST_ENCODED_ELT (pred, i)))
+ if (!integer_zerop (VECTOR_CST_ENCODED_ELT (pred, j)))
return NULL;
}
}