Skip to content

[Basic] Manually implement popcount when not available #73384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 2, 2024

Conversation

Azoy
Copy link
Contributor

@Azoy Azoy commented May 1, 2024

MSVC doesn't provide the __popcnt intrinsic when targeting arm64 windows, so just manually implement popcount if neither intrinsic is available. Note, we can't include llvm/ADT/bit.h because this header doesn't exist for the runtime (yet?)

@Azoy
Copy link
Contributor Author

Azoy commented May 1, 2024

@swift-ci please smoke test

@Azoy Azoy merged commit c2a5028 into swiftlang:main May 2, 2024
@Azoy Azoy deleted the popcount-but-for-real branch May 2, 2024 05:03
Azoy added a commit to Azoy/swift that referenced this pull request May 30, 2024
[Basic] Manually implement popcount when not available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant