mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
Auto merge of #140925 - the8472:test-140207, r=compiler-errors
add regression test for 140207 Assembly test for #140207
This commit is contained in:
commit
ac9ac0e0f3
13
tests/assembly/libs/issue-140207-slice-min-simd.rs
Normal file
13
tests/assembly/libs/issue-140207-slice-min-simd.rs
Normal 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()
|
||||
}
|
Loading…
Reference in New Issue
Block a user