[AArch64][2/2] Add rtx cost function handling of clz, clrsb, rbit.

* config/aarch64/aarch64.c (aarch64_rtx_costs): Handle CLRSB, CLZ.
	(case UNSPEC): Handle UNSPEC_RBIT.

From-SVN: r212913
This commit is contained in:
Kyrylo Tkachov 2014-07-22 13:39:16 +00:00 committed by Kyrylo Tkachov
parent dfc98d99b6
commit 781aeb73bc
2 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2014-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.c (aarch64_rtx_costs): Handle CLRSB, CLZ.
(case UNSPEC): Handle UNSPEC_RBIT.
2014-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md: Delete UNSPEC_CLS.

View File

@ -5151,6 +5151,13 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED,
return false;
case CLRSB:
case CLZ:
if (speed)
*cost += extra_cost->alu.clz;
return false;
case COMPARE:
op0 = XEXP (x, 0);
op1 = XEXP (x, 1);
@ -5796,6 +5803,14 @@ cost_plus:
return false;
}
if (XINT (x, 1) == UNSPEC_RBIT)
{
if (speed)
*cost += extra_cost->alu.rev;
return false;
}
break;
case TRUNCATE: