rust/compiler/rustc_codegen_llvm/src
Guillaume Gomez 095ca33bb6
Rollup merge of #128149 - RalfJung:nontemporal_store, r=jieyouxu,Amanieu,Jubilee
nontemporal_store: make sure that the intrinsic is truly just a hint

The `!nontemporal` flag for stores in LLVM *sounds* like it is just a hint, but actually, it is not -- at least on x86, non-temporal stores need very special treatment by the programmer or else the Rust memory model breaks down. LLVM still treats these stores as-if they were normal stores for optimizations, which is [highly dubious](https://github.com/llvm/llvm-project/issues/64521). Let's avoid all that dubiousness by making our own non-temporal stores be truly just a hint, which is possible on some targets (e.g. ARM). On all other targets, non-temporal stores become regular stores.

~~Blocked on https://github.com/rust-lang/stdarch/pull/1541 propagating to the rustc repo, to make sure the `_mm_stream` intrinsics are unaffected by this change.~~

Fixes https://github.com/rust-lang/rust/issues/114582
Cc `@Amanieu` `@workingjubilee`
2024-08-12 17:09:14 +02:00
..
back Rollup merge of #128221 - calebzulawski:implied-target-features, r=Amanieu 2024-08-07 20:28:16 +02:00
coverageinfo Reformat use declarations. 2024-07-29 08:26:52 +10:00
debuginfo Rename struct_tail_erasing_lifetimes to struct_tail_for_codegen 2024-08-08 12:15:16 -04:00
llvm Add range attribute to scalar function results and arguments 2024-08-11 19:40:44 +02:00
abi.rs Auto merge of #128371 - andjo403:rangeAttribute, r=nikic 2024-08-12 10:20:00 +00:00
allocator.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
asm.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
attributes.rs Rollup merge of #128679 - RalfJung:codegen-fn-attrs, r=nikic 2024-08-07 20:28:18 +02:00
base.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
builder.rs Rollup merge of #128149 - RalfJung:nontemporal_store, r=jieyouxu,Amanieu,Jubilee 2024-08-12 17:09:14 +02:00
callee.rs codegen: better centralize function attribute computation 2024-08-07 19:49:48 +02:00
common.rs Move is_mingw_gnu_toolchain and i686_decorated_name to cg_ssa 2024-07-30 10:30:09 +00:00
consts.rs Move is_mingw_gnu_toolchain and i686_decorated_name to cg_ssa 2024-07-30 10:30:09 +00:00
context.rs Rollup merge of #128221 - calebzulawski:implied-target-features, r=Amanieu 2024-08-07 20:28:16 +02:00
declare.rs codegen: better centralize function attribute computation 2024-08-07 19:49:48 +02:00
errors.rs Move mingw dlltool invocation to cg_ssa 2024-07-30 10:33:33 +00:00
intrinsic.rs Specify the integer type of the powi LLVM intrinsic 2024-08-01 15:36:15 -04:00
lib.rs Don't use LLVM to compute -Ctarget-feature 2024-08-07 00:41:48 -04:00
llvm_util.rs Disallow enabling features without their implied features 2024-08-07 00:45:00 -04:00
mono_item.rs codegen: better centralize function attribute computation 2024-08-07 19:49:48 +02:00
type_.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
type_of.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
va_arg.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
value.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00