Auto merge of #140925 - the8472:test-140207, r=compiler-errors

add regression test for 140207

Assembly test for #140207
This commit is contained in:
bors 2025-05-12 04:32:50 +00:00
commit ac9ac0e0f3

View File

@ -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()
}