diff --git a/crates/core_arch/src/aarch64/neon/mod.rs b/crates/core_arch/src/aarch64/neon/mod.rs index 2c9ad9e2bb..43084a4b77 100644 --- a/crates/core_arch/src/aarch64/neon/mod.rs +++ b/crates/core_arch/src/aarch64/neon/mod.rs @@ -11,8 +11,9 @@ pub use self::generated::*; // FIXME: replace neon with asimd use crate::{ - core_arch::{arm_shared::*, simd::*, simd_llvm::*}, + core_arch::{arm_shared::*, simd::*}, hint::unreachable_unchecked, + intrinsics::simd::*, mem::{transmute, zeroed}, ptr::{read_unaligned, write_unaligned}, }; diff --git a/crates/core_arch/src/arm_shared/neon/mod.rs b/crates/core_arch/src/arm_shared/neon/mod.rs index 12da187067..3ebaa4d5ab 100644 --- a/crates/core_arch/src/arm_shared/neon/mod.rs +++ b/crates/core_arch/src/arm_shared/neon/mod.rs @@ -7,9 +7,7 @@ mod generated; #[cfg_attr(target_arch = "arm", unstable(feature = "stdarch_arm_neon_intrinsics", issue = "111800"))] pub use self::generated::*; -use crate::{ - core_arch::simd::*, core_arch::simd_llvm::*, hint::unreachable_unchecked, mem::transmute, -}; +use crate::{core_arch::simd::*, hint::unreachable_unchecked, intrinsics::simd::*, mem::transmute}; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/lib.rs b/crates/core_arch/src/lib.rs index 5dcd11fb68..9705c45236 100644 --- a/crates/core_arch/src/lib.rs +++ b/crates/core_arch/src/lib.rs @@ -7,7 +7,6 @@ #![feature( custom_inner_attributes, link_llvm_intrinsics, - platform_intrinsics, repr_simd, simd_ffi, proc_macro_hygiene, diff --git a/crates/core_arch/src/mod.rs b/crates/core_arch/src/mod.rs index e72d9abf9c..da3a0bb940 100644 --- a/crates/core_arch/src/mod.rs +++ b/crates/core_arch/src/mod.rs @@ -265,8 +265,6 @@ pub mod arch { } } -mod simd_llvm; - #[cfg(any(target_arch = "x86", target_arch = "x86_64", doc))] #[doc(cfg(any(target_arch = "x86", target_arch = "x86_64")))] mod x86; diff --git a/crates/core_arch/src/powerpc/altivec.rs b/crates/core_arch/src/powerpc/altivec.rs index 547cac4058..f55cb664e8 100644 --- a/crates/core_arch/src/powerpc/altivec.rs +++ b/crates/core_arch/src/powerpc/altivec.rs @@ -13,11 +13,7 @@ #![allow(non_camel_case_types)] -use crate::{ - core_arch::{simd::*, simd_llvm::*}, - mem, - mem::transmute, -}; +use crate::{core_arch::simd::*, intrinsics::simd::*, mem, mem::transmute}; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/powerpc/vsx.rs b/crates/core_arch/src/powerpc/vsx.rs index 8faca3d87b..d9f89a6dea 100644 --- a/crates/core_arch/src/powerpc/vsx.rs +++ b/crates/core_arch/src/powerpc/vsx.rs @@ -8,7 +8,7 @@ #![allow(non_camel_case_types)] -use crate::core_arch::simd_llvm::*; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/simd_llvm.rs b/crates/core_arch/src/simd_llvm.rs deleted file mode 100644 index 9498f4c504..0000000000 --- a/crates/core_arch/src/simd_llvm.rs +++ /dev/null @@ -1,16 +0,0 @@ -//! LLVM's SIMD platform intrinsics - -// This re-export is temporary; once libcore has all the required intrinsics, we can -// remove this entire file. -#[allow(unused_imports)] -pub use crate::intrinsics::simd::*; - -extern "platform-intrinsic" { - #[rustc_const_unstable(feature = "const_simd_insert", issue = "none")] - pub fn simd_insert(x: T, idx: u32, val: U) -> T; - #[rustc_const_unstable(feature = "const_simd_extract", issue = "none")] - pub fn simd_extract(x: T, idx: u32) -> U; - - pub fn simd_reduce_add_unordered(x: T) -> U; - pub fn simd_reduce_mul_unordered(x: T) -> U; -} diff --git a/crates/core_arch/src/v64.rs b/crates/core_arch/src/v64.rs index 631b76a859..0e64b32576 100644 --- a/crates/core_arch/src/v64.rs +++ b/crates/core_arch/src/v64.rs @@ -2,7 +2,7 @@ use crate::prelude::v1::*; -use crate::core_arch::simd_llvm::*; +use crate::intrinsics::simd::*; define_ty_doc! { f32x2, f32, f32 | diff --git a/crates/core_arch/src/wasm32/simd128.rs b/crates/core_arch/src/wasm32/simd128.rs index 9a7d93c4b1..ee3836c761 100644 --- a/crates/core_arch/src/wasm32/simd128.rs +++ b/crates/core_arch/src/wasm32/simd128.rs @@ -6,11 +6,7 @@ #![allow(non_camel_case_types)] #![allow(unused_imports)] -use crate::{ - core_arch::{simd, simd_llvm::*}, - marker::Sized, - mem, ptr, -}; +use crate::{core_arch::simd, intrinsics::simd::*, marker::Sized, mem, ptr}; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/avx.rs b/crates/core_arch/src/x86/avx.rs index 3098019aa2..a6167c7616 100644 --- a/crates/core_arch/src/x86/avx.rs +++ b/crates/core_arch/src/x86/avx.rs @@ -14,7 +14,8 @@ //! [wiki]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions use crate::{ - core_arch::{simd::*, simd_llvm::*, x86::*}, + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, mem, ptr, }; diff --git a/crates/core_arch/src/x86/avx2.rs b/crates/core_arch/src/x86/avx2.rs index cdb349eea3..26498b7f61 100644 --- a/crates/core_arch/src/x86/avx2.rs +++ b/crates/core_arch/src/x86/avx2.rs @@ -18,7 +18,8 @@ //! [wiki_avx]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/avx512bf16.rs b/crates/core_arch/src/x86/avx512bf16.rs index 527b1f7664..dbd8b4a6f3 100644 --- a/crates/core_arch/src/x86/avx512bf16.rs +++ b/crates/core_arch/src/x86/avx512bf16.rs @@ -2,7 +2,8 @@ //! //! [AVX512BF16 intrinsics]: https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=1769&avx512techs=AVX512_BF16 -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/avx512bitalg.rs b/crates/core_arch/src/x86/avx512bitalg.rs index 48494b2e45..3ea3938e72 100644 --- a/crates/core_arch/src/x86/avx512bitalg.rs +++ b/crates/core_arch/src/x86/avx512bitalg.rs @@ -13,7 +13,6 @@ use crate::core_arch::simd::i16x8; use crate::core_arch::simd::i8x16; use crate::core_arch::simd::i8x32; use crate::core_arch::simd::i8x64; -use crate::core_arch::simd_llvm::simd_select_bitmask; use crate::core_arch::x86::__m128i; use crate::core_arch::x86::__m256i; use crate::core_arch::x86::__m512i; @@ -27,6 +26,7 @@ use crate::core_arch::x86::_mm_setzero_si128; use crate::core_arch::x86::m128iExt; use crate::core_arch::x86::m256iExt; use crate::core_arch::x86::m512iExt; +use crate::intrinsics::simd::simd_select_bitmask; use crate::mem::transmute; #[cfg(test)] diff --git a/crates/core_arch/src/x86/avx512bw.rs b/crates/core_arch/src/x86/avx512bw.rs index c40ae0ea8d..936d4a0041 100644 --- a/crates/core_arch/src/x86/avx512bw.rs +++ b/crates/core_arch/src/x86/avx512bw.rs @@ -1,6 +1,7 @@ use crate::{ arch::asm, - core_arch::{simd::*, simd_llvm::*, x86::*}, + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, mem, ptr, }; diff --git a/crates/core_arch/src/x86/avx512cd.rs b/crates/core_arch/src/x86/avx512cd.rs index 0eae29a4e1..7b48c2c9b9 100644 --- a/crates/core_arch/src/x86/avx512cd.rs +++ b/crates/core_arch/src/x86/avx512cd.rs @@ -1,4 +1,5 @@ -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/avx512f.rs b/crates/core_arch/src/x86/avx512f.rs index 8c9d5d5760..57b8229409 100644 --- a/crates/core_arch/src/x86/avx512f.rs +++ b/crates/core_arch/src/x86/avx512f.rs @@ -1,6 +1,7 @@ use crate::{ arch::asm, - core_arch::{simd::*, simd_llvm::*, x86::*}, + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, mem, ptr, }; diff --git a/crates/core_arch/src/x86/avx512vbmi.rs b/crates/core_arch/src/x86/avx512vbmi.rs index 0bd3f26219..f1e29963c4 100644 --- a/crates/core_arch/src/x86/avx512vbmi.rs +++ b/crates/core_arch/src/x86/avx512vbmi.rs @@ -1,4 +1,5 @@ -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/avx512vbmi2.rs b/crates/core_arch/src/x86/avx512vbmi2.rs index 37007df7c5..979cad7284 100644 --- a/crates/core_arch/src/x86/avx512vbmi2.rs +++ b/crates/core_arch/src/x86/avx512vbmi2.rs @@ -1,6 +1,7 @@ use crate::{ arch::asm, - core_arch::{simd::*, simd_llvm::*, x86::*}, + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, }; #[cfg(test)] diff --git a/crates/core_arch/src/x86/avx512vnni.rs b/crates/core_arch/src/x86/avx512vnni.rs index 13512c9e36..67a626b7ed 100644 --- a/crates/core_arch/src/x86/avx512vnni.rs +++ b/crates/core_arch/src/x86/avx512vnni.rs @@ -1,4 +1,5 @@ -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/avx512vpopcntdq.rs b/crates/core_arch/src/x86/avx512vpopcntdq.rs index cedf72f7d8..4fafd9d682 100644 --- a/crates/core_arch/src/x86/avx512vpopcntdq.rs +++ b/crates/core_arch/src/x86/avx512vpopcntdq.rs @@ -13,7 +13,6 @@ use crate::core_arch::simd::i32x8; use crate::core_arch::simd::i64x2; use crate::core_arch::simd::i64x4; use crate::core_arch::simd::i64x8; -use crate::core_arch::simd_llvm::simd_select_bitmask; use crate::core_arch::x86::__m128i; use crate::core_arch::x86::__m256i; use crate::core_arch::x86::__m512i; @@ -25,6 +24,7 @@ use crate::core_arch::x86::_mm_setzero_si128; use crate::core_arch::x86::m128iExt; use crate::core_arch::x86::m256iExt; use crate::core_arch::x86::m512iExt; +use crate::intrinsics::simd::simd_select_bitmask; use crate::mem::transmute; #[cfg(test)] diff --git a/crates/core_arch/src/x86/fma.rs b/crates/core_arch/src/x86/fma.rs index f72c18c074..efa98ee422 100644 --- a/crates/core_arch/src/x86/fma.rs +++ b/crates/core_arch/src/x86/fma.rs @@ -18,8 +18,8 @@ //! [amd64_ref]: http://support.amd.com/TechDocs/24594.pdf //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate -use crate::core_arch::simd_llvm::simd_fma; use crate::core_arch::x86::*; +use crate::intrinsics::simd::simd_fma; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/gfni.rs b/crates/core_arch/src/x86/gfni.rs index 2a2cb72ce0..84dcf4203e 100644 --- a/crates/core_arch/src/x86/gfni.rs +++ b/crates/core_arch/src/x86/gfni.rs @@ -10,7 +10,6 @@ use crate::core_arch::simd::i8x16; use crate::core_arch::simd::i8x32; use crate::core_arch::simd::i8x64; -use crate::core_arch::simd_llvm::simd_select_bitmask; use crate::core_arch::x86::__m128i; use crate::core_arch::x86::__m256i; use crate::core_arch::x86::__m512i; @@ -23,6 +22,7 @@ use crate::core_arch::x86::_mm_setzero_si128; use crate::core_arch::x86::m128iExt; use crate::core_arch::x86::m256iExt; use crate::core_arch::x86::m512iExt; +use crate::intrinsics::simd::simd_select_bitmask; use crate::mem::transmute; #[cfg(test)] diff --git a/crates/core_arch/src/x86/sse.rs b/crates/core_arch/src/x86/sse.rs index 8ff6a3db47..4bbb3907ab 100644 --- a/crates/core_arch/src/x86/sse.rs +++ b/crates/core_arch/src/x86/sse.rs @@ -1,7 +1,8 @@ //! Streaming SIMD Extensions (SSE) use crate::{ - core_arch::{simd::*, simd_llvm::*, x86::*}, + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, mem, ptr, }; diff --git a/crates/core_arch/src/x86/sse2.rs b/crates/core_arch/src/x86/sse2.rs index b44eeefccb..8e4989008c 100644 --- a/crates/core_arch/src/x86/sse2.rs +++ b/crates/core_arch/src/x86/sse2.rs @@ -4,7 +4,8 @@ use stdarch_test::assert_instr; use crate::{ - core_arch::{simd::*, simd_llvm::*, x86::*}, + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, mem, ptr, }; diff --git a/crates/core_arch/src/x86/sse3.rs b/crates/core_arch/src/x86/sse3.rs index 889b90b561..94553844e1 100644 --- a/crates/core_arch/src/x86/sse3.rs +++ b/crates/core_arch/src/x86/sse3.rs @@ -1,6 +1,7 @@ //! Streaming SIMD Extensions 3 (SSE3) -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/sse41.rs b/crates/core_arch/src/x86/sse41.rs index 386bc51950..21f5051057 100644 --- a/crates/core_arch/src/x86/sse41.rs +++ b/crates/core_arch/src/x86/sse41.rs @@ -1,6 +1,7 @@ //! Streaming SIMD Extensions 4.1 (SSE4.1) -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::core_arch::{simd::*, x86::*}; +use crate::intrinsics::simd::*; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86/sse42.rs b/crates/core_arch/src/x86/sse42.rs index 96036df744..36350a1d93 100644 --- a/crates/core_arch/src/x86/sse42.rs +++ b/crates/core_arch/src/x86/sse42.rs @@ -5,7 +5,10 @@ #[cfg(test)] use stdarch_test::assert_instr; -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::{ + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, +}; /// String contains unsigned 8-bit characters *(Default)* #[stable(feature = "simd_x86", since = "1.27.0")] diff --git a/crates/core_arch/src/x86/ssse3.rs b/crates/core_arch/src/x86/ssse3.rs index a8cc21bfe3..05f79f231c 100644 --- a/crates/core_arch/src/x86/ssse3.rs +++ b/crates/core_arch/src/x86/ssse3.rs @@ -1,6 +1,9 @@ //! Supplemental Streaming SIMD Extensions 3 (SSSE3) -use crate::core_arch::{simd::*, simd_llvm::*, x86::*}; +use crate::{ + core_arch::{simd::*, x86::*}, + intrinsics::simd::*, +}; #[cfg(test)] use stdarch_test::assert_instr; diff --git a/crates/core_arch/src/x86_64/avx.rs b/crates/core_arch/src/x86_64/avx.rs index 5715097d72..77da2601fe 100644 --- a/crates/core_arch/src/x86_64/avx.rs +++ b/crates/core_arch/src/x86_64/avx.rs @@ -13,10 +13,7 @@ //! [amd64_ref]: http://support.amd.com/TechDocs/24594.pdf //! [wiki]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions -use crate::{ - core_arch::{simd_llvm::*, x86::*}, - mem::transmute, -}; +use crate::{core_arch::x86::*, intrinsics::simd::*, mem::transmute}; /// Copies `a` to result, and insert the 64-bit integer `i` into result /// at the location specified by `index`. diff --git a/crates/core_arch/src/x86_64/avx2.rs b/crates/core_arch/src/x86_64/avx2.rs index b3b1431e56..fb4ea2a56a 100644 --- a/crates/core_arch/src/x86_64/avx2.rs +++ b/crates/core_arch/src/x86_64/avx2.rs @@ -18,7 +18,8 @@ //! [wiki_avx]: https://en.wikipedia.org/wiki/Advanced_Vector_Extensions //! [wiki_fma]: https://en.wikipedia.org/wiki/Fused_multiply-accumulate -use crate::core_arch::{simd_llvm::*, x86::*}; +use crate::core_arch::x86::*; +use crate::intrinsics::simd::*; /// Extracts a 64-bit integer from `a`, selected with `INDEX`. /// diff --git a/crates/core_arch/src/x86_64/avx512f.rs b/crates/core_arch/src/x86_64/avx512f.rs index fa58a443dc..ce6bc89f5b 100644 --- a/crates/core_arch/src/x86_64/avx512f.rs +++ b/crates/core_arch/src/x86_64/avx512f.rs @@ -1,5 +1,6 @@ use crate::{ - core_arch::{simd::*, simd_llvm::*, x86::*, x86_64::*}, + core_arch::{simd::*, x86::*, x86_64::*}, + intrinsics::simd::*, mem::transmute, }; diff --git a/crates/core_arch/src/x86_64/sse2.rs b/crates/core_arch/src/x86_64/sse2.rs index 5013c1a3a5..a97688f7e9 100644 --- a/crates/core_arch/src/x86_64/sse2.rs +++ b/crates/core_arch/src/x86_64/sse2.rs @@ -1,8 +1,8 @@ //! `x86_64`'s Streaming SIMD Extensions 2 (SSE2) use crate::{ - core_arch::{simd_llvm::*, x86::*}, - intrinsics, + core_arch::x86::*, + intrinsics::{self, simd::*}, }; #[cfg(test)] diff --git a/crates/core_arch/src/x86_64/sse41.rs b/crates/core_arch/src/x86_64/sse41.rs index 49c6d95943..81d14de15e 100644 --- a/crates/core_arch/src/x86_64/sse41.rs +++ b/crates/core_arch/src/x86_64/sse41.rs @@ -1,9 +1,6 @@ //! `i686`'s Streaming SIMD Extensions 4.1 (SSE4.1) -use crate::{ - core_arch::{simd_llvm::*, x86::*}, - mem::transmute, -}; +use crate::{core_arch::x86::*, intrinsics::simd::*, mem::transmute}; #[cfg(test)] use stdarch_test::assert_instr;