Skip to content

Commit

Permalink
tests/run-make/simd-ffi: use a generic LLVM intrinsics ...
Browse files Browse the repository at this point in the history
... to do more comprehensive type checking
  • Loading branch information
liushuyu committed Nov 14, 2024
1 parent ede8a74 commit 0733ed7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/run-make/simd-ffi/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 0733ed7

Please sign in to comment.