diff mbox

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

Message ID 527CE874.8080708@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Nov. 8, 2013, 1:34 p.m. UTC
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.

Comments

Ramana Radhakrishnan Nov. 8, 2013, 4:52 p.m. UTC | #1
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
diff mbox

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