diff options
| author | bors <bors@rust-lang.org> | 2025-05-12 04:32:50 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-05-12 04:32:50 +0000 |
| commit | ac9ac0e0f36dcd7f8a8f0405cd003585fe4e4426 (patch) | |
| tree | 4497cbb6200e28bc73baac2ede778d9dac9e77ec | |
| parent | 718ddf660e6a1802c39b4962cf7eaa4db57025ef (diff) | |
| parent | 632630086e99bc165f997ec0a17134e716489b9e (diff) | |
| download | rust-ac9ac0e0f36dcd7f8a8f0405cd003585fe4e4426.tar.gz rust-ac9ac0e0f36dcd7f8a8f0405cd003585fe4e4426.zip | |
Auto merge of #140925 - the8472:test-140207, r=compiler-errors
add regression test for 140207 Assembly test for #140207
| -rw-r--r-- | tests/assembly/libs/issue-140207-slice-min-simd.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/assembly/libs/issue-140207-slice-min-simd.rs b/tests/assembly/libs/issue-140207-slice-min-simd.rs new file mode 100644 index 00000000000..86f067cac08 --- /dev/null +++ b/tests/assembly/libs/issue-140207-slice-min-simd.rs @@ -0,0 +1,13 @@ +//@ assembly-output: emit-asm +// # avx has a dedicated instruction for this +//@ compile-flags: --crate-type=lib -Ctarget-cpu=znver2 -Copt-level=3 +//@ only-x86_64 +//@ ignore-sgx +// https://github.com/rust-lang/rust/issues/140207 + +#[unsafe(no_mangle)] +pub fn array_min(a: &[u16; 8]) -> u16 { + // CHECK: vphminposuw + // CHECK: ret + a.iter().copied().min().unwrap() +} |
