* [PATCH][AArch64] Do not overwrite cost in bswap case
@ 2015-05-01 8:25 Kyrill Tkachov
2015-05-01 8:42 ` Marcus Shawcroft
0 siblings, 1 reply; 2+ messages in thread
From: Kyrill Tkachov @ 2015-05-01 8:25 UTC (permalink / raw)
To: GCC Patches; +Cc: Marcus Shawcroft, Richard Earnshaw, James Greenhalgh
[-- Attachment #1: Type: text/plain, Size: 450 bytes --]
Hi all,
This patch is trivial. We already initialise the cost to COSTS_N_INSNS (1) at the top of the function.
No need to overwrite it again. Just add the cost of a rev and recurse into the operands.
Bootstrapped and tested on aarch64-linux.
Ok for trunk?
Thanks,
Kyrill
2015-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_rtx_costs): Do not overwrite cost
with COSTS_N_INSNS (1).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: aarch64-costs-bswap-op.patch --]
[-- Type: text/x-patch; name=aarch64-costs-bswap-op.patch, Size: 561 bytes --]
commit 30857e8a8ff816244c49b3c76b6044c1d5cc9f2f
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Tue Mar 3 10:10:53 2015 +0000
[AArch64] Do not overwrite BSWAP rtx cost, let recursion handle the operand
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 6083fd4..e19b592 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -5995,7 +5995,6 @@ cost_plus:
}
case BSWAP:
- *cost = COSTS_N_INSNS (1);
if (speed)
*cost += extra_cost->alu.rev;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][AArch64] Do not overwrite cost in bswap case
2015-05-01 8:25 [PATCH][AArch64] Do not overwrite cost in bswap case Kyrill Tkachov
@ 2015-05-01 8:42 ` Marcus Shawcroft
0 siblings, 0 replies; 2+ messages in thread
From: Marcus Shawcroft @ 2015-05-01 8:42 UTC (permalink / raw)
To: Kyrill Tkachov
Cc: GCC Patches, Marcus Shawcroft, Richard Earnshaw, James Greenhalgh
On 1 May 2015 at 09:25, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> 2015-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/aarch64/aarch64.c (aarch64_rtx_costs): Do not overwrite cost
> with COSTS_N_INSNS (1).
OK /Marcus
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-05-01 8:42 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:25 [PATCH][AArch64] Do not overwrite cost in bswap case Kyrill Tkachov
2015-05-01 8:42 ` 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).