Skip to content

Commit 8162bc6

Browse files
committed
Auto merge of #145644 - jhpratt:rollup-ypo3zcd, r=jhpratt
Rollup of 13 pull requests Successful merges: - rust-lang/rust#139357 (Fix parameter order for `_by()` variants of `min` / `max`/ `minmax` in `std::cmp`) - rust-lang/rust#140314 (Rustdoc: typecheck scrape-examples.js) - rust-lang/rust#140794 (mention lint group in default level lint note) - rust-lang/rust#145006 (Clarify EOF handling for `BufRead::skip_until`) - rust-lang/rust#145252 (Demote x86_64-apple-darwin to Tier 2 with host tools) - rust-lang/rust#145359 (Fix bug where `rustdoc-js` tester would not pick the right `search.js` file if there is more than one) - rust-lang/rust#145381 (Implement feature `int_lowest_highest_one` for integer and NonZero types) - rust-lang/rust#145417 (std_detect: RISC-V platform guide documentation) - rust-lang/rust#145531 (Add runtime detection for APX-F and AVX10) - rust-lang/rust#145619 (`std_detect`: Use `rustc-std-workspace-*` to pull in `compiler-builtins`) - rust-lang/rust#145622 (Remove the std workspace patch for `compiler-builtins`) - rust-lang/rust#145623 (Pretty print the name of an future from calling async closure) - rust-lang/rust#145626 (add a fallback implementation for the `prefetch_*` intrinsics ) r? `@ghost` `@rustbot` modify labels: rollup
2 parents c69d274 + cf13767 commit 8162bc6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/pass/prefetch.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#![feature(core_intrinsics)]
2+
3+
// Test that these intrinsics work. Their behavior should be a no-op.
4+
5+
fn main() {
6+
static X: [u8; 8] = [0; 8];
7+
8+
::std::intrinsics::prefetch_read_data::<_, 1>(::std::ptr::null::<u8>());
9+
::std::intrinsics::prefetch_read_data::<_, 2>(::std::ptr::dangling::<u8>());
10+
::std::intrinsics::prefetch_read_data::<_, 3>(X.as_ptr());
11+
12+
::std::intrinsics::prefetch_write_data::<_, 1>(::std::ptr::null::<u8>());
13+
::std::intrinsics::prefetch_write_data::<_, 2>(::std::ptr::dangling::<u8>());
14+
::std::intrinsics::prefetch_write_data::<_, 3>(X.as_ptr());
15+
16+
::std::intrinsics::prefetch_read_instruction::<_, 1>(::std::ptr::null::<u8>());
17+
::std::intrinsics::prefetch_read_instruction::<_, 2>(::std::ptr::dangling::<u8>());
18+
::std::intrinsics::prefetch_read_instruction::<_, 3>(X.as_ptr());
19+
20+
::std::intrinsics::prefetch_write_instruction::<_, 1>(::std::ptr::null::<u8>());
21+
::std::intrinsics::prefetch_write_instruction::<_, 2>(::std::ptr::dangling::<u8>());
22+
::std::intrinsics::prefetch_write_instruction::<_, 3>(X.as_ptr());
23+
}

0 commit comments

Comments
 (0)