rust-lang / rust-lang/stdarch

_MM_SHUFFLE has incorrect return type

Open Beginner friendly
#522 26 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-x86 P-high
Dominant language
Rust
Stars
694
Forks
336
Avg merge
5d 14h
Merged PRs (30d)
9

Description

_MM_SHUFFLE was added recently in #479 . Currently _MM_SHUFFLE returns a u32, but the functions it's output is used with take an i32, eg _mm_shuffle_epi32.

Although normally this isn't an issue as you could just transmute the results, the input to _mm_shuffle_epi32 requires the shuffle argument to be constant.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked _MM_SHUFFLE and _mm_shuffle_epi32 API definitions, then trace how the macro's result is passed to the intrinsic. Confirm the type expected by the shuffle functions and verify that the corrected return type works for constant shuffle arguments in the relevant stdarch tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
performance
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.