From: Kyrylo Tkachov Date: Wed, 23 Apr 2014 15:30:53 +0000 (+0000) Subject: [AArch64] Add handling of bswap operations in rtx costs X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18b42b2a9c7b632653801344329076b934861930;p=gcc.git [AArch64] Add handling of bswap operations in rtx costs * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle BSWAP. From-SVN: r209706 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e499b256f61..99f4b0d75e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-04-23 Kyrylo Tkachov + + * config/aarch64/aarch64.c (aarch64_rtx_costs): Handle BSWAP. + 2014-04-23 Kyrylo Tkachov * config/arm/arm.md (arm_rev16si2): New pattern. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 68c29aa0da7..277c0875032 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -4694,6 +4694,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: if (aarch_rev16_p (x)) {