diff mbox

[AArch64] Handle FLOAT and UNSIGNED_FLOAT in rtx costs

Message ID 5543378B.2090600@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov May 1, 2015, 8:21 a.m. UTC
Hi all,

This patch adds handling of the FLOAT and UNSIGNED_FLOAT cases in rtx costs that map down to
the scvtf and ucvtf instructions respectively. We use the fromint cost field for them.

Tested on aarch64-none-elf.

Ok for trunk?

Thanks,
Kyrill

2015-05-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle FLOAT and
     UNSIGNED_FLOAT.

Comments

Marcus Shawcroft May 1, 2015, 12:30 p.m. UTC | #1
On 1 May 2015 at 09:21, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:

> 2015-05-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>     * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle FLOAT and
>     UNSIGNED_FLOAT.

OK /Marcus
diff mbox

Patch

commit 3a14409ce63cac482e48ab731cff0267f7b2ce53
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Wed Mar 11 12:04:13 2015 +0000

    [AArch64] Handle FLOAT and UNSIGNED_FLOAT in rtx costs

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index d1635f4..8661896 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6497,6 +6497,12 @@  cost_plus:
       *cost += rtx_cost (op2, FMA, 2, speed);
       return true;
 
+    case FLOAT:
+    case UNSIGNED_FLOAT:
+      if (speed)
+	*cost += extra_cost->fp[mode == DFmode].fromint;
+      return false;
+
     case FLOAT_EXTEND:
       if (speed)
 	*cost += extra_cost->fp[mode == DFmode].widen;