Commit 781aeb73 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[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
parent dfc98d99
2014-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com> 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. * config/aarch64/aarch64.md: Delete UNSPEC_CLS.
(clrsb<mode>2): Use clrsb RTL code instead of UNSPEC_CLS. (clrsb<mode>2): Use clrsb RTL code instead of UNSPEC_CLS.
......
...@@ -5151,6 +5151,13 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED, ...@@ -5151,6 +5151,13 @@ aarch64_rtx_costs (rtx x, int code, int outer ATTRIBUTE_UNUSED,
return false; return false;
case CLRSB:
case CLZ:
if (speed)
*cost += extra_cost->alu.clz;
return false;
case COMPARE: case COMPARE:
op0 = XEXP (x, 0); op0 = XEXP (x, 0);
op1 = XEXP (x, 1); op1 = XEXP (x, 1);
...@@ -5796,6 +5803,14 @@ cost_plus: ...@@ -5796,6 +5803,14 @@ cost_plus:
return false; return false;
} }
if (XINT (x, 1) == UNSPEC_RBIT)
{
if (speed)
*cost += extra_cost->alu.rev;
return false;
}
break; break;
case TRUNCATE: case TRUNCATE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment