Skip to content

Refactor avx512bw #1602

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 6 commits into from
Jul 6, 2024
Merged

Refactor avx512bw #1602

merged 6 commits into from
Jul 6, 2024

Conversation

TDecking
Copy link
Contributor

@TDecking TDecking commented Jun 30, 2024

  • The following operations have been rewritten and can now be consumed by miri:
    • Saturating arithmetic
    • Comparison operations
    • Maximum/Minimum
    • Byte average
    • High multiplication
    • Integer abs
  • Masked comparison operations now properly use the mask registers
  • All missing intrinsics are added

@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2024

r? @Amanieu

rustbot has assigned @Amanieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@TDecking TDecking marked this pull request as draft June 30, 2024 14:29
@TDecking TDecking force-pushed the avx512bw branch 11 times, most recently from 5ff9ecd to 2896bd0 Compare July 1, 2024 00:45
@TDecking TDecking marked this pull request as ready for review July 1, 2024 00:55
@bors
Copy link
Contributor

bors commented Jul 6, 2024

☔ The latest upstream changes (presumably 3dd9579) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Member

@Amanieu Amanieu left a comment

Choose a reason for hiding this comment

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

LGTM, I will merge once conflicts are resolved.

#[target_feature(enable = "avx512bw")]
#[unstable(feature = "stdarch_x86_avx512", issue = "111137")]
pub unsafe fn _knot_mask32(a: __mmask32) -> __mmask32 {
a ^ 0b11111111_11111111_11111111_11111111
Copy link
Member

Choose a reason for hiding this comment

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

This would be much more readable as !a.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. It might be worth pointing out that _knot_mask16 in avx512f.rs and _knot_mask8 in avx512dq.rs are written in the same way and should be changed in the future.

@Amanieu Amanieu enabled auto-merge (rebase) July 6, 2024 09:19
@Amanieu Amanieu merged commit 09215ac into rust-lang:master Jul 6, 2024
30 checks passed
@TDecking TDecking deleted the avx512bw branch July 6, 2024 10:20
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.

4 participants