arm: Fix unwanted fall-throughs in arm.c

Message ID gkry2pc8li2.fsf@arm.com
State New
Headers show
Series
  • arm: Fix unwanted fall-throughs in arm.c
Related show

Commit Message

Andrea Corallo May 28, 2020, 9:19 a.m.
Hi all,

this small patch fix some unintentional fall-throughs in
`mve_vector_mem_operand'.

Regtested and bootstraped on arm-linux-gnueabihf.

Okay for trunk?

Regards

  Andrea

gcc/ChangeLog

2020-05-28  Andrea Corallo  <andrea.corallo@arm.com>

	* config/arm/arm.c (mve_vector_mem_operand): Fix unwanted
	fall-throughs.

Comments

Kyrylo Tkachov May 28, 2020, 9:20 a.m. | #1
> -----Original Message-----

> From: Andrea Corallo <Andrea.Corallo@arm.com>

> Sent: 28 May 2020 10:20

> To: gcc Patches <gcc-patches@gcc.gnu.org>

> Cc: nd <nd@arm.com>; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; Richard

> Earnshaw <Richard.Earnshaw@arm.com>

> Subject: [PATCH] arm: Fix unwanted fall-throughs in arm.c

> 

> Hi all,

> 

> this small patch fix some unintentional fall-throughs in

> `mve_vector_mem_operand'.

> 

> Regtested and bootstraped on arm-linux-gnueabihf.

> 

> Okay for trunk?


Oops.
Ok.
Thanks,
Kyrill

> 

> Regards

> 

>   Andrea

> 

> gcc/ChangeLog

> 

> 2020-05-28  Andrea Corallo  <andrea.corallo@arm.com>

> 

> 	* config/arm/arm.c (mve_vector_mem_operand): Fix unwanted

> 	fall-throughs.

>
Andrea Corallo May 28, 2020, 9:32 a.m. | #2
Kyrylo Tkachov <Kyrylo.Tkachov@arm.com> writes:

>> -----Original Message-----

>> From: Andrea Corallo <Andrea.Corallo@arm.com>

>> Sent: 28 May 2020 10:20

>> To: gcc Patches <gcc-patches@gcc.gnu.org>

>> Cc: nd <nd@arm.com>; Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; Richard

>> Earnshaw <Richard.Earnshaw@arm.com>

>> Subject: [PATCH] arm: Fix unwanted fall-throughs in arm.c

>>

>> Hi all,

>>

>> this small patch fix some unintentional fall-throughs in

>> `mve_vector_mem_operand'.

>>

>> Regtested and bootstraped on arm-linux-gnueabihf.

>>

>> Okay for trunk?

>

> Oops.

> Ok.

> Thanks,

> Kyrill

>


Installed as dd019ef07358.

Thanks

  Andrea

Patch

From 9b24746c356036c48cc5017942d565f5a786748e Mon Sep 17 00:00:00 2001
From: Andrea Corallo <andrea.corallo@arm.com>
Date: Wed, 27 May 2020 17:43:48 +0100
Subject: [PATCH] arm: Fix unwanted fall-throughs in arm.c

gcc/ChangeLog

2020-05-28  Andrea Corallo  <andrea.corallo@arm.com>

	* config/arm/arm.c (mve_vector_mem_operand): Fix unwanted
	fall-throughs.
---
 gcc/config/arm/arm.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 90cb1fb5f901..9257c7a51a40 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -13330,32 +13330,38 @@  mve_vector_mem_operand (machine_mode mode, rtx op, bool strict)
 	    if (abs (val) <= 127)
 	      return ((reg_no < LAST_ARM_REGNUM && reg_no != SP_REGNUM)
 		      || (!strict && reg_no >= FIRST_PSEUDO_REGISTER));
+	    return FALSE;
 	  case E_V8HImode:
 	  case E_V8HFmode:
 	    if (abs (val) <= 255)
 	      return ((reg_no < LAST_ARM_REGNUM && reg_no != SP_REGNUM)
 		      || (!strict && reg_no >= FIRST_PSEUDO_REGISTER));
+	    return FALSE;
 	  case E_V8QImode:
 	  case E_V4QImode:
 	    if (abs (val) <= 127)
 	      return (reg_no <= LAST_LO_REGNUM
 		      || (!strict && reg_no >= FIRST_PSEUDO_REGISTER));
+	    return FALSE;
 	  case E_V4HImode:
 	  case E_V4HFmode:
 	    if (val % 2 == 0 && abs (val) <= 254)
 	      return (reg_no <= LAST_LO_REGNUM
 		      || (!strict && reg_no >= FIRST_PSEUDO_REGISTER));
+	    return FALSE;
 	  case E_V4SImode:
 	  case E_V4SFmode:
 	    if (val % 4 == 0 && abs (val) <= 508)
 	      return ((reg_no < LAST_ARM_REGNUM && reg_no != SP_REGNUM)
 		      || (!strict && reg_no >= FIRST_PSEUDO_REGISTER));
+	    return FALSE;
 	  case E_V2DImode:
 	  case E_V2DFmode:
 	  case E_TImode:
 	    if (val % 4 == 0 && val >= 0 && val <= 1020)
 	      return ((reg_no < LAST_ARM_REGNUM && reg_no != SP_REGNUM)
 		      || (!strict && reg_no >= FIRST_PSEUDO_REGISTER));
+	    return FALSE;
 	  default:
 	    return FALSE;
 	}
-- 
2.17.1