Skip to content

Commit 6326300

Browse files
committed
add regression test for 140207
1 parent 3ef8e64 commit 6326300

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//@ assembly-output: emit-asm
2+
// # avx has a dedicated instruction for this
3+
//@ compile-flags: --crate-type=lib -Ctarget-cpu=znver2 -Copt-level=3
4+
//@ only-x86_64
5+
//@ ignore-sgx
6+
// https://github.com/rust-lang/rust/issues/140207
7+
8+
#[unsafe(no_mangle)]
9+
pub fn array_min(a: &[u16; 8]) -> u16 {
10+
// CHECK: vphminposuw
11+
// CHECK: ret
12+
a.iter().copied().min().unwrap()
13+
}

0 commit comments

Comments
 (0)