Skip to content

Commit

Permalink
Unrolled build for rust-lang#137559
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#137559 - folkertdev:run-more-emscripten-tests, r=fmease

run some tests on emscripten again

these were ignored because of rust-lang#45351, but that issue has long been fixed. Let's see if these pass, or if there is some issue lurking still

I believe this is the try-job for emscripten? probably a good idea to run that first.

~~try-job: test-various~~
try-job: dist-various-1
  • Loading branch information
rust-timer authored Feb 26, 2025
2 parents a46c755 + 60fc2be commit 4a11057
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 21 deletions.
2 changes: 0 additions & 2 deletions tests/ui/simd/intrinsic/generic-arithmetic-pass.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//@ run-pass
#![allow(non_camel_case_types)]
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
#![feature(repr_simd, intrinsics)]

#[repr(simd)]
Expand Down Expand Up @@ -53,7 +52,6 @@ unsafe fn simd_or<T>(x: T, y: T) -> T;
#[rustc_intrinsic]
unsafe fn simd_xor<T>(x: T, y: T) -> T;


#[rustc_intrinsic]
unsafe fn simd_neg<T>(x: T) -> T;

Expand Down
2 changes: 0 additions & 2 deletions tests/ui/simd/intrinsic/generic-cast-pass.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
//@ run-pass
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert

#![feature(repr_simd, intrinsics)]


#[rustc_intrinsic]
unsafe fn simd_cast<T, U>(x: T) -> U;

Expand Down
18 changes: 8 additions & 10 deletions tests/ui/simd/intrinsic/generic-comparison-pass.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ run-pass
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert

#![feature(repr_simd, intrinsics, concat_idents)]
#![allow(non_camel_case_types)]
Expand All @@ -14,7 +13,6 @@ struct u32x4(pub [u32; 4]);
#[derive(Copy, Clone)]
struct f32x4(pub [f32; 4]);


#[rustc_intrinsic]
unsafe fn simd_eq<T, U>(x: T, y: T) -> U;

Expand All @@ -39,11 +37,11 @@ macro_rules! cmp {
let rhs = $rhs;
let e: u32x4 = concat_idents!(simd_, $method)($lhs, $rhs);
// assume the scalar version is correct/the behaviour we want.
assert!((e.0[0] != 0) == lhs.0[0] .$method(&rhs.0[0]));
assert!((e.0[1] != 0) == lhs.0[1] .$method(&rhs.0[1]));
assert!((e.0[2] != 0) == lhs.0[2] .$method(&rhs.0[2]));
assert!((e.0[3] != 0) == lhs.0[3] .$method(&rhs.0[3]));
}}
assert!((e.0[0] != 0) == lhs.0[0].$method(&rhs.0[0]));
assert!((e.0[1] != 0) == lhs.0[1].$method(&rhs.0[1]));
assert!((e.0[2] != 0) == lhs.0[2].$method(&rhs.0[2]));
assert!((e.0[3] != 0) == lhs.0[3].$method(&rhs.0[3]));
}};
}
macro_rules! tests {
($($lhs: ident, $rhs: ident;)*) => {{
Expand Down Expand Up @@ -75,9 +73,9 @@ fn main() {
let i2 = i32x4([5, -5, 20, -100]);
let i3 = i32x4([10, -11, 20, -100]);

let u1 = u32x4([10, !11+1, 12, 13]);
let u2 = u32x4([5, !5+1, 20, !100+1]);
let u3 = u32x4([10, !11+1, 20, !100+1]);
let u1 = u32x4([10, !11 + 1, 12, 13]);
let u2 = u32x4([5, !5 + 1, 20, !100 + 1]);
let u3 = u32x4([10, !11 + 1, 20, !100 + 1]);

let f1 = f32x4([10.0, -11.0, 12.0, 13.0]);
let f2 = f32x4([5.0, -5.0, 20.0, -100.0]);
Expand Down
2 changes: 0 additions & 2 deletions tests/ui/simd/intrinsic/generic-elements-pass.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ run-pass
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert

#![feature(repr_simd, intrinsics)]

Expand All @@ -22,7 +21,6 @@ unsafe fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
#[rustc_intrinsic]
unsafe fn simd_extract<T, E>(x: T, idx: u32) -> E;


#[rustc_intrinsic]
unsafe fn simd_shuffle<T, I, U>(x: T, y: T, idx: I) -> U;

Expand Down
5 changes: 1 addition & 4 deletions tests/ui/simd/issue-32947.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ run-pass
//@ ignore-emscripten FIXME(#45351)

#![feature(repr_simd, test)]

Expand All @@ -15,9 +14,7 @@ fn main() {
// non-optimized builds
unsafe {
let memory = &mut [0u64; 8] as *mut _ as *mut u8;
let misaligned_ptr: &mut [u8; 32] = {
std::mem::transmute(memory.offset(1))
};
let misaligned_ptr: &mut [u8; 32] = { std::mem::transmute(memory.offset(1)) };
*misaligned_ptr = std::mem::transmute(Mu64([1, 1, 1, 1]));
test::black_box(memory);
}
Expand Down
1 change: 0 additions & 1 deletion tests/ui/simd/issue-39720.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
//@ run-pass
//@ ignore-emscripten FIXME(#45351)

#![feature(repr_simd, intrinsics)]

Expand Down

0 comments on commit 4a11057

Please sign in to comment.