rust-lang / rust-lang/stdarch

LLVM prefers vxorps to vpxor when out-of-context

Open
#303 0 comments 0 reactions 0 assignees View on GitHub

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.