LLVM prefers vxorps to vpxor when out-of-context
Open
Nobody has claimed this yet.
A-llvm
A-x86
- Dominant language
- Rust
- Stars
- 694
- Forks
- 336
- Avg merge
- 5d 14h
- Merged PRs (30d)
- 9
Description
LLVM prefers to generate vxorps instructions to vpxor when out-of-context even though one might be using integer vectors because the encoding of that instruction is shorter.
There is an LLVM patch for this here: https://reviews.llvm.org/D7401
And a bug report with some more information here:
This affects following intrinsics (maybe incomplete):
-
_mm256_xor_si256(need to add a comment to the source code)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Find the source implementation for _mm256_xor_si256; read LLVM review D7401 and bug 36127 to understand the encoding choice. Add the requested explanatory comment, then confirm that the intrinsic's source clearly records why vxorps may be preferred.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers, performance
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100