Add MSVC-internal workaround for ARM64 popcount
intrinsics
#4733
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As mentioned in #4683, VS 2022 17.11 Preview 1 added ARM64 support for
__popcnt64
etc. intrinsics. When merging #4695, everything seemed to be okay during MSVC-internal PR checks, but post-merge CI noticed that the MSVC-internal build starts with a checked-in 17.10p4, which is too old to know about the new intrinsics.I missed this because I forgot that MSVC-internal PR checks don't build ARM64 (only the CI does) and I didn't build ARM64 locally.
The workaround is to check the compiler version. I'll be able to remove this after we update the internal toolset, which should happen very soon.