rust/compiler/rustc_codegen_llvm/src
Jacob Pratt 816f098464
Rollup merge of #145626 - folkertdev:prefetch-fallback, r=Amanieu
add a fallback implementation for the `prefetch_*` intrinsics

related ACP: https://github.com/rust-lang/libs-team/issues/638

The fallback is to just ignore the arguments. That is a valid implementation because this intrinsic is just a hint.

I also added the `miri::intrinsic_fallback_is_spec` annotation, so that miri now supports these operations. A prefetch intrinsic call is valid on any pointer. (specifically LLVM guarantees this https://llvm.org/docs/LangRef.html#llvm-prefetch-intrinsic)

Next, I made the `LOCALITY` argument a const generic. That argument must be const (otherwise LLVM crashes), but that was not reflected in the type.

Finally, with these changes, the intrinsic can be safe and `const` (a prefetch at const evaluation time is just a no-op).

cc `@Amanieu`
r? `@RalfJung`
2025-08-20 00:46:02 -04:00
..
back Rollup merge of #145484 - Zalathar:archive-builder, r=bjorn3 2025-08-19 14:18:25 +10:00
builder Remove inlining for autodiff handling 2025-08-14 16:30:16 +00:00
coverageinfo coverage: Remove all unstable support for MC/DC instrumentation 2025-08-06 22:38:52 +10:00
debuginfo Cleanup assoc parent utils 2025-08-13 09:33:09 -05:00
llvm Rollup merge of #145484 - Zalathar:archive-builder, r=bjorn3 2025-08-19 14:18:25 +10:00
abi.rs Set dead_on_return attribute for indirect arguments 2025-08-11 12:39:23 +02:00
allocator.rs fix(compiler/rustc_codegen_llvm): apply target-cpu attribute 2025-08-13 17:49:06 +00:00
asm.rs emit .att_syntax when global/naked asm use that option 2025-07-09 01:09:55 +02:00
attributes.rs Rollup merge of #145429 - bjorn3:codegen_fn_attrs_improvements, r=jdonszelmann 2025-08-19 19:45:31 +08:00
base.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
builder.rs Rollup merge of #145420 - Zalathar:llvm-c, r=WaffleLapkin 2025-08-18 15:31:12 +10:00
callee.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
common.rs gpu host code generation 2025-07-18 16:30:42 -07:00
consts.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
context.rs Rollup merge of #140740 - ojeda:indirect-branch-cs-prefix, r=davidtwco 2025-08-19 19:42:01 +08:00
declare.rs make more builder functions generic 2025-07-18 16:23:54 -07:00
errors.rs Use the object crate rather than LLVM for extracting bitcode sections 2025-07-25 11:21:28 +00:00
intrinsic.rs make prefetch intrinsics safe 2025-08-20 00:35:42 +02:00
lib.rs Rollup merge of #145432 - Zalathar:target-machine, r=wesleywiser 2025-08-19 14:18:25 +10:00
llvm_util.rs Rollup merge of #145099 - heiher:loong-32s, r=folkertdev 2025-08-19 19:42:08 +08:00
mono_item.rs Port the #[linkage] attribute to the new attribute system 2025-08-13 21:01:37 +02:00
type_.rs Use LLVMGetTypeKind 2025-08-15 19:35:35 +10:00
type_of.rs rename BackendRepr::Vector → SimdVector 2025-02-28 17:17:45 +01:00
va_arg.rs Auto merge of #143182 - xdoardo:more-addrspace, r=workingjubilee 2025-07-07 17:28:14 +00:00
value.rs Add warn(unreachable_pub) to rustc_codegen_llvm. 2024-08-16 08:46:57 +10:00