Patchwork [ARM] Add break in handling of comparisons in rtx costs function

login
register
mail settings
Submitter Kyrylo Tkachov
Date Nov. 8, 2013, 1:34 p.m.
Message ID <527CE874.8080708@arm.com>
Download mbox | patch
Permalink /patch/289837/
State New
Headers show

Comments

Kyrylo Tkachov - Nov. 8, 2013, 1:34 p.m.
Hi all,

In arm_new_rtx_costs we need a break; statement after handling the comparisons 
cases. Otherwise we fall through and compute garbage. This small patch adds that.

Tested arm-none-eabi on qemu.

Ok for trunk?

Thanks,
Kyrill


2013-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/arm/arm.c (arm_new_rtx_costs): Break after handling
     comparisons.
Ramana Radhakrishnan - Nov. 8, 2013, 4:52 p.m.
On 11/08/13 13:34, Kyrill Tkachov wrote:
> Hi all,
>
> In arm_new_rtx_costs we need a break; statement after handling the comparisons
> cases. Otherwise we fall through and compute garbage. This small patch adds that.
>
> Tested arm-none-eabi on qemu.
>
> Ok for trunk?

Ok - thanks.

Ramana

Patch

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index ed57134..242fa09 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -10148,6 +10148,7 @@  arm_new_rtx_costs (rtx x, enum rtx_code code, enum rtx_code outer_code,
 	  *cost = 0;
 	  return true;
 	}
+      break;
 
     case ABS:
       if (TARGET_HARD_FLOAT && GET_MODE_CLASS (mode) == MODE_FLOAT