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.tkac...@arm.com>

    * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle FLOAT and
    UNSIGNED_FLOAT.
commit 3a14409ce63cac482e48ab731cff0267f7b2ce53
Author: Kyrylo Tkachov <kyrylo.tkac...@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;

Reply via email to