Skip to content
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

add the pext and pdep intrinsics #3676

Closed
wants to merge 3 commits into from

Conversation

folkertdev
Copy link
Contributor

Adds support for parallel bit extraction and deposition.

These are useful in low-level parsing code.

Wikipedia has an explanation of what these do.

match unprefixed_name {
"pdep.32" => {
// <https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#text=_pdep_u32>
this.expect_target_feature_for_intrinsic(link_name, "bmi2")?;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

llvm unhelpfully does not make a distinction between bmi1 and bmi2: all bmi intrinsics are in the bmi namespace. So I don't see another way than to in every branch check for the relevant target features, even though it is error-prone.

@folkertdev
Copy link
Contributor Author

whoops, #3674 exists

@folkertdev folkertdev closed this Jun 15, 2024
@RalfJung
Copy link
Member

RalfJung commented Jun 15, 2024 via email

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.

None yet

2 participants