diff mbox series

arm: [MVE intrinsics] fix binary_acca_int32 and binary_acca_int64 shapes

Message ID 20230814180105.1812551-1-christophe.lyon@linaro.org
State New
Headers show
Series arm: [MVE intrinsics] fix binary_acca_int32 and binary_acca_int64 shapes | expand

Commit Message

Christophe Lyon Aug. 14, 2023, 6:01 p.m. UTC
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 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Kyrylo Tkachov Aug. 22, 2023, 10:01 a.m. UTC | #1
Hi Christophe,

> -----Original Message-----
> From: Christophe Lyon <christophe.lyon@linaro.org>
> Sent: Monday, August 14, 2023 7:01 PM
> To: gcc-patches@gcc.gnu.org; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>;
> Richard Earnshaw <Richard.Earnshaw@arm.com>; Richard Sandiford
> <Richard.Sandiford@arm.com>
> Cc: Christophe Lyon <christophe.lyon@linaro.org>
> Subject: [PATCH] arm: [MVE intrinsics] fix binary_acca_int32 and
> binary_acca_int64 shapes
> 
> Fix these two shapes, where we were failing to check the last
> non-predicate parameter.

Ok.
Thanks,
Kyrill

> 
> 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 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-
> mve-builtins-shapes.cc
> index 6d477a84330..1633084608e 100644
> --- a/gcc/config/arm/arm-mve-builtins-shapes.cc
> +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc
> @@ -455,7 +455,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;
> @@ -492,7 +492,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;
> --
> 2.34.1
diff mbox series

Patch

diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc
index 6d477a84330..1633084608e 100644
--- a/gcc/config/arm/arm-mve-builtins-shapes.cc
+++ b/gcc/config/arm/arm-mve-builtins-shapes.cc
@@ -455,7 +455,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;
@@ -492,7 +492,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;