Skip to content

Commit e18ac65

Browse files
authored
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
2 parents 315e956 + 60fc2be commit e18ac65

6 files changed

+9
-21
lines changed

tests/ui/simd/intrinsic/generic-arithmetic-pass.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
//@ run-pass
22
#![allow(non_camel_case_types)]
3-
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
43
#![feature(repr_simd, intrinsics)]
54

65
#[repr(simd)]
@@ -53,7 +52,6 @@ unsafe fn simd_or<T>(x: T, y: T) -> T;
5352
#[rustc_intrinsic]
5453
unsafe fn simd_xor<T>(x: T, y: T) -> T;
5554

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

tests/ui/simd/intrinsic/generic-cast-pass.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
//@ run-pass
2-
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
32

43
#![feature(repr_simd, intrinsics)]
54

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

tests/ui/simd/intrinsic/generic-comparison-pass.rs

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
32

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

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

@@ -39,11 +37,11 @@ macro_rules! cmp {
3937
let rhs = $rhs;
4038
let e: u32x4 = concat_idents!(simd_, $method)($lhs, $rhs);
4139
// assume the scalar version is correct/the behaviour we want.
42-
assert!((e.0[0] != 0) == lhs.0[0] .$method(&rhs.0[0]));
43-
assert!((e.0[1] != 0) == lhs.0[1] .$method(&rhs.0[1]));
44-
assert!((e.0[2] != 0) == lhs.0[2] .$method(&rhs.0[2]));
45-
assert!((e.0[3] != 0) == lhs.0[3] .$method(&rhs.0[3]));
46-
}}
40+
assert!((e.0[0] != 0) == lhs.0[0].$method(&rhs.0[0]));
41+
assert!((e.0[1] != 0) == lhs.0[1].$method(&rhs.0[1]));
42+
assert!((e.0[2] != 0) == lhs.0[2].$method(&rhs.0[2]));
43+
assert!((e.0[3] != 0) == lhs.0[3].$method(&rhs.0[3]));
44+
}};
4745
}
4846
macro_rules! tests {
4947
($($lhs: ident, $rhs: ident;)*) => {{
@@ -75,9 +73,9 @@ fn main() {
7573
let i2 = i32x4([5, -5, 20, -100]);
7674
let i3 = i32x4([10, -11, 20, -100]);
7775

78-
let u1 = u32x4([10, !11+1, 12, 13]);
79-
let u2 = u32x4([5, !5+1, 20, !100+1]);
80-
let u3 = u32x4([10, !11+1, 20, !100+1]);
76+
let u1 = u32x4([10, !11 + 1, 12, 13]);
77+
let u2 = u32x4([5, !5 + 1, 20, !100 + 1]);
78+
let u3 = u32x4([10, !11 + 1, 20, !100 + 1]);
8179

8280
let f1 = f32x4([10.0, -11.0, 12.0, 13.0]);
8381
let f2 = f32x4([5.0, -5.0, 20.0, -100.0]);

tests/ui/simd/intrinsic/generic-elements-pass.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-emscripten FIXME(#45351) hits an LLVM assert
32

43
#![feature(repr_simd, intrinsics)]
54

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

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

tests/ui/simd/issue-32947.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-emscripten FIXME(#45351)
32

43
#![feature(repr_simd, test)]
54

@@ -15,9 +14,7 @@ fn main() {
1514
// non-optimized builds
1615
unsafe {
1716
let memory = &mut [0u64; 8] as *mut _ as *mut u8;
18-
let misaligned_ptr: &mut [u8; 32] = {
19-
std::mem::transmute(memory.offset(1))
20-
};
17+
let misaligned_ptr: &mut [u8; 32] = { std::mem::transmute(memory.offset(1)) };
2118
*misaligned_ptr = std::mem::transmute(Mu64([1, 1, 1, 1]));
2219
test::black_box(memory);
2320
}

tests/ui/simd/issue-39720.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
//@ run-pass
2-
//@ ignore-emscripten FIXME(#45351)
32

43
#![feature(repr_simd, intrinsics)]
54

0 commit comments

Comments
 (0)