This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][AArch64] Use popcount_hwi instead of homebrew version
- From: James Greenhalgh <james dot greenhalgh at arm dot com>
- To: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 19 Aug 2015 16:06:47 +0100
- Subject: Re: [PATCH][AArch64] Use popcount_hwi instead of homebrew version
- Authentication-results: sourceware.org; auth=none
- References: <55D49A91 dot 9070503 at arm dot com>
On Wed, Aug 19, 2015 at 04:02:41PM +0100, Kyrill Tkachov wrote:
> Hi all,
>
> I noticed we have a hand-crafted "bit_count" function in the aarch64 backend that implements the popcount operation.
> We already have a midend popcount_hwi function operating on HOST_WIDE_INTs which seems to be exactly what we need.
>
> This patch removes the aarch64-specific version and updates the one callsite where it's used, the '%P' output operand,
> which itself is only used by the *andim_ashift<mode>_bfiz pattern in aarch64.md.
>
> Bootstrapped and tested on aarch64.
>
> Ok for trunk?
OK. A change like this which performs useful cleanup is borderline
obvious.
Thanks,
James
>
> Thanks,
> Kyrill
>
> 2015-08-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * config/aarch64/aarch64.c (bit_count): Delete prototype
> and definition.
> (aarch64_print_operand): Use popcount_hwi instead of the above.