]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
arm: [MVE intrinsics] fix binary_acca_int32 and binary_acca_int64 shapes
authorChristophe Lyon <christophe.lyon@linaro.org>
Thu, 10 Aug 2023 15:39:52 +0000 (15:39 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 28 Aug 2023 08:55:29 +0000 (08:55 +0000)
Fix these two shapes, where we were failing to check the last
non-predicate parameter.

2023-08-14  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm-mve-builtins-shapes.cc (binary_acca_int32): Fix loop bound.
(binary_acca_int64): Likewise.

gcc/config/arm/arm-mve-builtins-shapes.cc

index 1b4960f75cd2d65deb1d373f3f3ea81b9ec697db..ef50c661fcd114626ff2b1b8544fe62a28c45d55 100644 (file)
@@ -439,7 +439,7 @@ struct binary_acca_int32_def : public overloaded_base<0>
        || (type = r.infer_vector_type (1)) == NUM_TYPE_SUFFIXES)
       return error_mark_node;
 
-    unsigned int last_arg = i;
+    unsigned int last_arg = i + 1;
     for (i = 1; i < last_arg; i++)
       if (!r.require_matching_vector_type (i, type))
        return error_mark_node;
@@ -476,7 +476,7 @@ struct binary_acca_int64_def : public overloaded_base<0>
        || (type = r.infer_vector_type (1)) == NUM_TYPE_SUFFIXES)
       return error_mark_node;
 
-    unsigned int last_arg = i;
+    unsigned int last_arg = i + 1;
     for (i = 1; i < last_arg; i++)
       if (!r.require_matching_vector_type (i, type))
        return error_mark_node;