Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
79b30d6
thread, grid, and block dim/idx can only return non-negative values
ZuseZ4 Dec 9, 2025
69c7a7e
Use a generic type to implement SIMD types in `core_arch::simd`
eduardosm Jan 1, 2026
dab5532
x86: avoid using `transmute` in some tests
eduardosm Jan 1, 2026
68701ff
arm_shared: avoid using `transmute` and `unsafe fn` in tests
eduardosm Jan 1, 2026
f9e6d4b
Merge pull request #1987 from eduardosm/generic-simd-type-avoid-unsaf…
sayantn Jan 5, 2026
d0204a3
remove `impl Neg` on s390x/powerpc vector types
folkertdev Jan 11, 2026
78952f6
Mark the neon intrinsics as inline(always).
JamieCunliffe Dec 9, 2025
5bf9ca7
stabilize `__jscvt`
folkertdev Jan 13, 2026
aaf31e7
Merge pull request #1973 from ZuseZ4/u32-threadidx
sayantn Jan 17, 2026
0d802f5
Merge pull request #1992 from folkertdev/remove-impl-neg
sayantn Jan 17, 2026
d251a38
Merge pull request #1974 from JamieCunliffe/inline-always-neon
sayantn Jan 20, 2026
bf7c1c2
test `vmulh_lane_f16` in intrinsic test
folkertdev Jan 21, 2026
b1ef655
use `simd_extract_dyn` for `extract`
folkertdev Jan 21, 2026
5829f21
Merge pull request #1997 from folkertdev/use-extract-dyn
sayantn Jan 22, 2026
cf08a11
s390x: add `nnp-assist` intrinsics
folkertdev Jan 17, 2026
84fc953
Merge pull request #1996 from folkertdev/s390x-nnp-assist
folkertdev Jan 22, 2026
5ec32b5
Merge pull request #1998 from folkertdev/test-vmulh_lane_f16
Amanieu Jan 22, 2026
464b309
Merge pull request #1993 from folkertdev/stabilize-jscvt
folkertdev Jan 24, 2026
a4f92e5
Prepare for merging from rust-lang/rust
invalid-email-address Jan 26, 2026
7168e5d
Merge ref '873d4682c7d2' from rust-lang/rust
invalid-email-address Jan 26, 2026
246399c
use `simd_splat`
folkertdev Jan 26, 2026
a45071b
Merge pull request #2002 from rust-lang/rustc-pull
folkertdev Jan 26, 2026
bf1c3f6
move `Types` from `with_api!` to `Server`
cyrgani Jan 26, 2026
5fef797
inline `Writer` and `Reader` type aliases
cyrgani Jan 26, 2026
f8d05b6
flatten the `api_tags` module
cyrgani Jan 26, 2026
d5328c5
introduce `MarkedX` type aliases
cyrgani Jan 26, 2026
356107e
remove some unneeded impls
cyrgani Jan 26, 2026
6e7a87c
merge `Mark` and `Unmark` traits
cyrgani Jan 26, 2026
0ef4c3a
use `simd_splat` for the `set1` functions
folkertdev Jan 26, 2026
f648ba2
Merge pull request #2003 from folkertdev/use-simd-splat
folkertdev Jan 26, 2026
fdad66a
enable `target_feature_inline_always` in `core` and `std`
folkertdev Jan 26, 2026
814d902
std: move time implementations to `sys` (preparation)
joboet Jan 15, 2026
29b16c0
std: move time implementations to `sys` (small platforms)
joboet Jan 15, 2026
5978e19
std: move time implementations to `sys` (VEX)
joboet Jan 15, 2026
bd754c7
std: move time implementations to `sys` (Solid)
joboet Jan 15, 2026
963f602
std: move time implementations to `sys` (UEFI)
joboet Jan 15, 2026
6cb343b
std: move time implementations to `sys` (Windows)
joboet Jan 15, 2026
05bbfa2
std: move time implementations to `sys` (UNIX)
joboet Jan 15, 2026
eec058e
std: move time implementations to `sys` (WASI/TEEOS)
joboet Jan 15, 2026
fe51f9d
std: move time implementations to `sys` (Hermit)
joboet Jan 15, 2026
5a98a51
hardcode some Windows constants in miri
joboet Jan 16, 2026
4039cef
Don't evaluate const blocks in constant promotion
dianne Dec 31, 2025
80102f3
Rollup merge of #151161 - joboet:move-pal-time, r=tgross35
JonathanBrouwer Jan 27, 2026
84bb764
Rollup merge of #151694 - cyrgani:more-pm-cleanup, r=petrochenkov
JonathanBrouwer Jan 27, 2026
7d11720
Rollup merge of #151711 - folkertdev:stdarch-sync-2026-01-26, r=folke…
JonathanBrouwer Jan 27, 2026
53fb684
Rollup merge of #150557 - dianne:no-const-block-eval-in-promotion, r=…
JonathanBrouwer Jan 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions library/stdarch/crates/core_arch/src/powerpc/altivec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4740,7 +4740,7 @@ mod tests {
for off in 0..16 {
let val: u8x16 = transmute(vec_xl(0, (pat.as_ptr() as *const u8).offset(off)));
for i in 0..16 {
let v = val.extract(i);
let v = val.extract_dyn(i);
assert_eq!(off as usize + i, v as usize);
}
}
Expand Down Expand Up @@ -4795,7 +4795,7 @@ mod tests {
)];
for off in 0..16 {
let v: u8x16 = transmute(vec_lde(off, pat.as_ptr() as *const u8));
assert_eq!(off as u8, v.extract(off as _));
assert_eq!(off as u8, v.extract_dyn(off as _));
}
}

Expand All @@ -4804,7 +4804,7 @@ mod tests {
let pat = [u16x8::new(0, 1, 2, 3, 4, 5, 6, 7)];
for off in 0..8 {
let v: u16x8 = transmute(vec_lde(off * 2, pat.as_ptr() as *const u16));
assert_eq!(off as u16, v.extract(off as _));
assert_eq!(off as u16, v.extract_dyn(off as _));
}
}

Expand All @@ -4813,7 +4813,7 @@ mod tests {
let pat = [u32x4::new(0, 1, 2, 3)];
for off in 0..4 {
let v: u32x4 = transmute(vec_lde(off * 4, pat.as_ptr() as *const u32));
assert_eq!(off as u32, v.extract(off as _));
assert_eq!(off as u32, v.extract_dyn(off as _));
}
}

Expand Down
15 changes: 8 additions & 7 deletions library/stdarch/crates/core_arch/src/simd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ impl<T: SimdElement, const N: usize> Simd<T, N> {
unsafe { simd_shuffle!(one, one, [0; N]) }
}

/// Extract the element at position `index`.
/// `index` is not a constant so this is not efficient!
/// Use for testing only.
// FIXME: Workaround rust@60637
#[inline(always)]
pub(crate) const fn extract(&self, index: usize) -> T {
self.as_array()[index]
/// Extract the element at position `index`. Note that `index` is not a constant so this
/// operation is not efficient on most platforms. Use for testing only.
#[inline]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn extract_dyn(&self, index: usize) -> T {
assert!(index < N);
// SAFETY: self is a vector, T its element type.
unsafe { crate::intrinsics::simd::simd_extract_dyn(*self, index as u32) }
}

#[inline]
Expand Down
21 changes: 14 additions & 7 deletions library/stdarch/crates/core_arch/src/x86/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,38 +78,45 @@ pub(crate) const fn assert_eq_m512h(a: __m512h, b: __m512h) {
}

#[target_feature(enable = "sse2")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m128d(a: __m128d, idx: usize) -> f64 {
a.as_f64x2().extract(idx)
a.as_f64x2().extract_dyn(idx)
}

#[target_feature(enable = "sse")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m128(a: __m128, idx: usize) -> f32 {
a.as_f32x4().extract(idx)
a.as_f32x4().extract_dyn(idx)
}

#[target_feature(enable = "avx")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m256d(a: __m256d, idx: usize) -> f64 {
a.as_f64x4().extract(idx)
a.as_f64x4().extract_dyn(idx)
}

#[target_feature(enable = "avx")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m256(a: __m256, idx: usize) -> f32 {
a.as_f32x8().extract(idx)
a.as_f32x8().extract_dyn(idx)
}

#[target_feature(enable = "avx512f")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m512(a: __m512, idx: usize) -> f32 {
a.as_f32x16().extract(idx)
a.as_f32x16().extract_dyn(idx)
}

#[target_feature(enable = "avx512f")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m512d(a: __m512d, idx: usize) -> f64 {
a.as_f64x8().extract(idx)
a.as_f64x8().extract_dyn(idx)
}

#[target_feature(enable = "avx512f")]
#[rustc_const_unstable(feature = "stdarch_const_helpers", issue = "none")]
pub(crate) const fn get_m512i(a: __m512i, idx: usize) -> i64 {
a.as_i64x8().extract(idx)
a.as_i64x8().extract_dyn(idx)
}

// not actually an intrinsic but useful in various tests as we ported from
Expand Down