rust-lang / rust-lang/stdarch

Can non-temporal loads use the LLVM intrinsic instead?

Open
#2,155 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
694
Forks
336
Avg merge
5d 14h
Merged PRs (30d)
9

Description

According to @Amanieu:

I checked and only non-temporal stores have special memory orderings on x86. x86 non-temporal loads work just like normal loads.

Using inline assembly produces suboptimal code, see https://godbolt.org/z/os8bG3Efr.

References:

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 by locating the non-temporal load implementation and compare its generated code with the LLVM intrinsic approach discussed in the issue and linked references. Use the provided Godbolt example to verify that the change produces better code, then run the relevant existing tests and confirm non-temporal loads retain their expected behavior.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.