Registry Mirror
Skip to content

Conversation

@RalfJung

Copy link
Copy Markdown
Member

This is my proposed alternative to #1457. It builds on the model I sketched here.

Changing the docs alone is not sufficient IMO, we also should stop using LLVM's non-temporal hint as LLVM passes do not properly take into account the non-standard nature of non-temporal stores. Originally I thought these all have to become inline assembly, but now I noticed that some of these operations are using different LLVM intrinsics:

    #[link_name = "llvm.x86.sse4a.movnt.sd"]
    fn movntsd(x: *mut f64, y: __m128d);
    #[link_name = "llvm.x86.sse4a.movnt.ss"]
    fn movntss(x: *mut f32, y: __m128);

Do these intrinsics exist for the other operations as well, e.g. for movntps? I found llvm.x86.avx.movnt.ps.256 but ofc for the SSE intrinsic we'd want the 128bit version of that. If that exists, using those might be better than using inline assembly? Though of course if LLVM passes treat these intrinsics like regular stores, that would still be wrong.

@rustbot

rustbot commented Feb 18, 2024

Copy link
Copy Markdown
Collaborator

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

Comment thread crates/core_arch/src/x86/sse.rs Resolved
Comment thread crates/core_arch/src/x86/sse.rs Resolved
@RalfJung
RalfJung force-pushed the non-temporal-store branch 2 times, most recently from 684844e to d236e1c Compare February 19, 2024 07:31
@RalfJung

Copy link
Copy Markdown
Member Author

CI failures seem unrelated to this PR.

@Amanieu
Amanieu merged commit c8ae80e into rust-lang:master Feb 21, 2024
@RalfJung
RalfJung deleted the non-temporal-store branch February 21, 2024 07:23
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