From a79edf4cfc54aad30a5630b217645c4b8274d8f7 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Mon, 10 Jul 2023 09:46:53 +0000 Subject: [PATCH] Stop using old-style `simd_shuffle` --- src/codegen/llvm.rs | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git third_party/rust/packed_simd_2/src/codegen/llvm.rs third_party/rust/packed_simd_2/src/codegen/llvm.rs index b4c09849..bb482fac 100644 --- third_party/rust/packed_simd_2/src/codegen/llvm.rs +++ third_party/rust/packed_simd_2/src/codegen/llvm.rs @@ -5,14 +5,8 @@ use crate::sealed::Shuffle; #[allow(unused_imports)] // FIXME: spurious warning? use crate::sealed::Simd; -// Shuffle intrinsics: expanded in users' crates, therefore public. extern "platform-intrinsic" { - pub fn simd_shuffle2(x: T, y: T, idx: [u32; 2]) -> U; - pub fn simd_shuffle4(x: T, y: T, idx: [u32; 4]) -> U; - pub fn simd_shuffle8(x: T, y: T, idx: [u32; 8]) -> U; - pub fn simd_shuffle16(x: T, y: T, idx: [u32; 16]) -> U; - pub fn simd_shuffle32(x: T, y: T, idx: [u32; 32]) -> U; - pub fn simd_shuffle64(x: T, y: T, idx: [u32; 64]) -> U; + fn simd_shuffle(x: T, y: T, idx: I) -> U; } #[allow(clippy::missing_safety_doc)] @@ -22,7 +16,7 @@ where T: Simd, ::Element: Shuffle<[u32; 2], Output = U>, { - simd_shuffle2(x, y, IDX) + simd_shuffle(x, y, IDX) } #[allow(clippy::missing_safety_doc)] @@ -32,7 +26,7 @@ where T: Simd, ::Element: Shuffle<[u32; 4], Output = U>, { - simd_shuffle4(x, y, IDX) + simd_shuffle(x, y, IDX) } #[allow(clippy::missing_safety_doc)] @@ -42,7 +36,7 @@ where T: Simd, ::Element: Shuffle<[u32; 8], Output = U>, { - simd_shuffle8(x, y, IDX) + simd_shuffle(x, y, IDX) } #[allow(clippy::missing_safety_doc)] @@ -52,7 +46,7 @@ where T: Simd, ::Element: Shuffle<[u32; 16], Output = U>, { - simd_shuffle16(x, y, IDX) + simd_shuffle(x, y, IDX) } #[allow(clippy::missing_safety_doc)] @@ -62,7 +56,7 @@ where T: Simd, ::Element: Shuffle<[u32; 32], Output = U>, { - simd_shuffle32(x, y, IDX) + simd_shuffle(x, y, IDX) } #[allow(clippy::missing_safety_doc)] @@ -72,7 +66,7 @@ where T: Simd, ::Element: Shuffle<[u32; 64], Output = U>, { - simd_shuffle64(x, y, IDX) + simd_shuffle(x, y, IDX) } extern "platform-intrinsic" {