Skip to content

Commit cff1bdb

Browse files
committed
Auto merge of #60588 - cuviper:be-simd-swap, r=alexcrichton
Revert "Disable big-endian simd in swap_nonoverlapping_bytes" This reverts commit 77bd4dc (#43159). Issue #42778 was formerly easy to reproduce on two big-endian targets, `powerpc64` and `s390x`, so we disabled SIMD on this function for all big-endian targets as a workaround. I have re-tested this code on `powerpc64` and `s390x`, each with the bundled LLVM 8 and with external LLVM 7 and LLVM 6, and the problems no longer appear. So it seems safe to remove this workaround, although I'm still a little uncomfortable that we never found a root-cause... Closes #42778. r? @arielb1
2 parents 0ac53da + 9a0a87a commit cff1bdb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libcore/ptr.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,7 @@ unsafe fn swap_nonoverlapping_bytes(x: *mut u8, y: *mut u8, len: usize) {
374374
// #[repr(simd)], even if we don't actually use this struct directly.
375375
//
376376
// FIXME repr(simd) broken on emscripten and redox
377-
// It's also broken on big-endian powerpc64 and s390x. #42778
378-
#[cfg_attr(not(any(target_os = "emscripten", target_os = "redox",
379-
target_endian = "big")),
380-
repr(simd))]
377+
#[cfg_attr(not(any(target_os = "emscripten", target_os = "redox")), repr(simd))]
381378
struct Block(u64, u64, u64, u64);
382379
struct UnalignedBlock(u64, u64, u64, u64);
383380

0 commit comments

Comments
 (0)