This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][AArch64] Use popcount_hwi instead of homebrew version


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]