[PATCH] [AArch64] Implement popcount pattern

James Greenhalgh james.greenhalgh@arm.com
Thu Feb 2 11:56:00 GMT 2017


On Thu, Feb 02, 2017 at 04:03:42AM +0000, Hurugalawadi, Naveen wrote:
> Hi James and Kyrill,
> 
> Thanks for the review and comments on the patch.
> 
> >> On ILP32 systems this would still use the SImode patterns, 
> >> so I suggest you use __builtin_popcountll and
> >> an unsigned long long return type to ensure you always exercise the 64-bit code.
> 
> Sorry for not commenting on this part.
> The issue is that code generates "__popcountdi2" for all the codes in testcase
> for LP64 and ILP32 variants.
> __builtin_popcount, __builtin_popcountl and __builtin_popcount.
> 
> Hence, modified the patch to check for "popcount".

I don't understand this comment and how it relates to your updated
patch (which still checks for CNT).

> Bootstrapped and regression tested on AArch64-Thunderx-Linux machine.
> 
> Please find attached the modified patch and let us know if its okay?

Could you please clarify what you meant above? The patch looks fine (though
possibly not for Stage 4), but I'm not sure of your intent.

Thanks,
James



More information about the Gcc-patches mailing list