arm: [MVE intrinsics] Remove dead check for float type in parse_element_type

Message ID 20230814181005.1905319-1-christophe.lyon@linaro.org
State Accepted
Headers
Series arm: [MVE intrinsics] Remove dead check for float type in parse_element_type |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

Christophe Lyon Aug. 14, 2023, 6:10 p.m. UTC
  Fix a likely copy/paste error, where we check if ch == 'f' after we
checked it's either 's' or 'u'.

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

	gcc/
	* config/arm/arm-mve-builtins-shapes.cc (parse_element_type):
	Remove dead check.
---
 gcc/config/arm/arm-mve-builtins-shapes.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
  

Comments

Kyrylo Tkachov Aug. 22, 2023, 10:02 a.m. UTC | #1
> -----Original Message-----
> From: Christophe Lyon <christophe.lyon@linaro.org>
> Sent: Monday, August 14, 2023 7:10 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] Remove dead check for float type in
> parse_element_type
> 
> Fix a likely copy/paste error, where we check if ch == 'f' after we
> checked it's either 's' or 'u'.

Ok.
Thanks,
Kyrill

> 
> 2023-08-14  Christophe Lyon  <christophe.lyon@linaro.org>
> 
> 	gcc/
> 	* config/arm/arm-mve-builtins-shapes.cc (parse_element_type):
> 	Remove dead check.
> ---
>  gcc/config/arm/arm-mve-builtins-shapes.cc | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-
> mve-builtins-shapes.cc
> index 1633084608e..23eb9d0e69b 100644
> --- a/gcc/config/arm/arm-mve-builtins-shapes.cc
> +++ b/gcc/config/arm/arm-mve-builtins-shapes.cc
> @@ -80,8 +80,7 @@ parse_element_type (const function_instance
> &instance, const char *&format)
> 
>    if (ch == 's' || ch == 'u')
>      {
> -      type_class_index tclass = (ch == 'f' ? TYPE_float
> -				 : ch == 's' ? TYPE_signed
> +      type_class_index tclass = (ch == 's' ? TYPE_signed
>  				 : TYPE_unsigned);
>        char *end;
>        unsigned int bits = strtol (format, &end, 10);
> --
> 2.34.1
  

Patch

diff --git a/gcc/config/arm/arm-mve-builtins-shapes.cc b/gcc/config/arm/arm-mve-builtins-shapes.cc
index 1633084608e..23eb9d0e69b 100644
--- a/gcc/config/arm/arm-mve-builtins-shapes.cc
+++ b/gcc/config/arm/arm-mve-builtins-shapes.cc
@@ -80,8 +80,7 @@  parse_element_type (const function_instance &instance, const char *&format)
 
   if (ch == 's' || ch == 'u')
     {
-      type_class_index tclass = (ch == 'f' ? TYPE_float
-				 : ch == 's' ? TYPE_signed
+      type_class_index tclass = (ch == 's' ? TYPE_signed
 				 : TYPE_unsigned);
       char *end;
       unsigned int bits = strtol (format, &end, 10);