public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][AArch64] Handle FLOAT and UNSIGNED_FLOAT in rtx costs
@ 2015-05-01  8:21 Kyrill Tkachov
  2015-05-01 12:30 ` Marcus Shawcroft
  0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2015-05-01  8:21 UTC (permalink / raw)
  To: GCC Patches; +Cc: Marcus Shawcroft, Richard Earnshaw, James Greenhalgh

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

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.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64-costs-float.patch --]
[-- Type: text/x-patch; name=aarch64-costs-float.patch, Size: 721 bytes --]

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH][AArch64] Handle FLOAT and UNSIGNED_FLOAT in rtx costs
  2015-05-01  8:21 [PATCH][AArch64] Handle FLOAT and UNSIGNED_FLOAT in rtx costs Kyrill Tkachov
@ 2015-05-01 12:30 ` Marcus Shawcroft
  0 siblings, 0 replies; 2+ messages in thread
From: Marcus Shawcroft @ 2015-05-01 12:30 UTC (permalink / raw)
  To: Kyrill Tkachov
  Cc: GCC Patches, Marcus Shawcroft, Richard Earnshaw, James Greenhalgh

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-01 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-01  8:21 [PATCH][AArch64] Handle FLOAT and UNSIGNED_FLOAT in rtx costs Kyrill Tkachov
2015-05-01 12:30 ` Marcus Shawcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).