Hi all,

This patch depends on the series started at http://gcc.gnu.org/ml/gcc-patches/2014-03/msg00933.html but is not really a part of it. It just adds costing of the bswap operation using the new rev field in the rtx cost tables since we have patterns in aarch64.md that handle bswap by generating rev16 instructions.

Tested aarch64-none-elf.

Ok for stage1 after that series goes in?

2014-03-19  Kyrylo Tkachov  <kyrylo.tkac...@arm.com>

    * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle BSWAP.
commit b9771a71dbf62522d423e16ce03353624c1ccd5a
Author: Kyrylo Tkachov <kyrylo.tkac...@arm.com>
Date:   Thu Feb 27 11:55:27 2014 +0000

    [AArch64] Cost bswap operations properly

diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 901ad3d..28c8841 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -4678,6 +4678,14 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED,
 
       return false;
 
+    case BSWAP:
+      *cost = COSTS_N_INSNS (1);
+
+      if (speed)
+        *cost += extra_cost->alu.rev;
+
+      return false;
+
     case IOR:
     case XOR:
     case AND:

Reply via email to