Files
rust/library/core/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
..
2025-08-12 13:18:48 +01:00
2025-08-06 16:55:50 +01:00
2025-08-07 00:08:11 +01:00
2025-08-06 16:55:50 +01:00
2025-08-06 16:55:50 +01:00
2025-08-06 13:22:38 +01:00
2025-08-20 00:35:42 +02:00
2025-08-12 09:43:17 +02:00
2025-07-03 20:03:49 +00:00
2025-08-06 16:55:50 +01:00
2025-08-13 12:27:44 -04:00
2025-08-14 21:13:06 +10:00
2025-05-12 15:33:30 +02:00
2024-07-29 08:26:52 +10:00
2025-07-04 11:35:00 +00:00
2024-06-11 15:47:00 +02:00
2025-07-04 11:52:17 +00:00
2025-06-15 22:08:41 +02:00
2025-04-09 12:29:59 +01:00
2025-07-04 11:52:17 +00:00
2025-08-06 16:55:50 +01:00