Skip to content
Merged
Changes from all commits
Commits
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
14 changes: 1 addition & 13 deletions src/implementation/aarch64/neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,7 @@ impl SimdU8Value {

#[inline]
unsafe fn load_from(ptr: *const u8) -> Self {
// WORKAROUND for https://github.com/rust-lang/stdarch/issues/1148
// The vld1q_u8 intrinsic is currently broken, it treats it as individual
// byte loads so the compiler sometimes decides it is a better to load
// individual bytes to "optimize" a subsequent SIMD shuffle
//
// This code forces a full 128-bit load.
let mut dst = core::mem::MaybeUninit::<uint8x16_t>::uninit();
core::ptr::copy_nonoverlapping(
ptr.cast::<u8>(),
dst.as_mut_ptr().cast::<u8>(),
core::mem::size_of::<uint8x16_t>(),
);
Self::from(dst.assume_init())
Self::from(vld1q_u8(ptr))
}

#[inline]
Expand Down
Loading