tests/run-make/simd-ffi: use a generic LLVM intrinsics ...

... to do more comprehensive type checking
This commit is contained in:
liushuyu 2024-11-14 14:08:39 -07:00
parent ede8a74f1e
commit 0733ed77d1
No known key found for this signature in database
GPG key ID: 23D1CE4534419437

View file

@ -38,15 +38,13 @@ extern "C" {
#[link_name = "llvm.aarch64.neon.maxs.v4i32"]
fn integer(a: i32x4, b: i32x4) -> i32x4;
// just some substitute foreign symbol, not an LLVM intrinsic; so
// we still get type checking, but not as detailed as (ab)using
// LLVM.
// Use a generic LLVM intrinsic to do type checking on other platforms
#[cfg(not(any(
all(target_arch = "x86", target_feature = "sse2"),
target_arch = "x86-64",
all(any(target_arch = "x86", target_arch = "x86-64"), target_feature = "sse2"),
target_arch = "arm",
target_arch = "aarch64"
)))]
#[link_name = "llvm.smax.v4i32"]
fn integer(a: i32x4, b: i32x4) -> i32x4;
}