Use POPCNT on MSVC - Mailing list pgsql-hackers

From David Rowley
Subject Use POPCNT on MSVC
Date
Msg-id CAApHDvqL3cbbK=GzNcwzsNR9Gi+aUvTudKkC4XgnQfXirJ_oRQ@mail.gmail.com
Whole thread Raw
Responses Re: Use POPCNT on MSVC  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers
Going by [1], it looks like we can use the __popcnt and __popcnt64
intrinsic functions on MSVC if the CPU supports POPCNT.  We already
have code to check for that, we just need to enable it on MSVC.

The attached patch seems to be all that's needed.

David

[1] https://docs.microsoft.com/en-us/cpp/intrinsics/popcnt16-popcnt-popcnt64?view=msvc-140

Attachment

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Next
From: Amit Kapila
Date:
Subject: Re: Failed transaction statistics to measure the logical replication progress