Skip to content

Commit 0ea8070

Browse files
authored
Re-enable SIMD tests after renumbering (#11081)
1 parent 99041eb commit 0ea8070

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

tests/test_core.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6003,7 +6003,6 @@ def test_relocatable_void_function(self):
60036003
self.do_run_in_out_file_test('tests', 'core', 'test_relocatable_void_function')
60046004

60056005
@wasm_simd
6006-
@unittest.skip("Disabled to allow SIMD opcode renumbering to roll")
60076006
def test_wasm_builtin_simd(self, js_engines):
60086007
# Improves test readability
60096008
self.emcc_args.append('-Wno-c++11-narrowing')
@@ -6014,7 +6013,6 @@ def test_wasm_builtin_simd(self, js_engines):
60146013
self.get_dir(), os.path.join(self.get_dir(), 'src.cpp'))
60156014

60166015
@wasm_simd
6017-
@unittest.skip("Disabled to allow SIMD opcode renumbering to roll")
60186016
def test_wasm_intrinsics_simd(self, js_engines):
60196017
def run():
60206018
self.do_run(

tests/test_wasm_builtin_simd.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,15 @@ i8x16 TESTFN i8x16_sub_saturate_s(i8x16 x, i8x16 y) {
359359
i8x16 TESTFN i8x16_sub_saturate_u(i8x16 x, i8x16 y) {
360360
return __builtin_wasm_sub_saturate_u_i8x16(x, y);
361361
}
362+
363+
#ifdef __wasm_unimplemented_simd128__
364+
362365
i8x16 TESTFN i8x16_mul(i8x16 x, i8x16 y) {
363366
return x * y;
364367
}
368+
369+
#endif // __wasm_unimplemented_simd128__
370+
365371
// Skip {min,max}_{s,u} because they do not have short builtin equivalents
366372
i8x16 TESTFN i8x16_avgr_u(i8x16 x, i8x16 y) {
367373
return __builtin_wasm_avgr_u_i8x16(x, y);
@@ -1152,13 +1158,19 @@ int EMSCRIPTEN_KEEPALIVE __attribute__((__optnone__)) main(int argc, char** argv
11521158
),
11531159
((i8x16){0, 0, 254, 0, 0, 123, 0, 12, 61, 167, 158, 100, 17, 0, 0, 0})
11541160
);
1161+
1162+
#ifdef __wasm_unimplemented_simd128__
1163+
11551164
expect_vec(
11561165
i8x16_mul(
11571166
(i8x16){0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73},
11581167
(i8x16){3, 231, 1, 128, 129, 6, 103, 17, 42, 29, 73, 42, 0, 255, 127, 142}
11591168
),
11601169
((i8x16){0, 230, 255, 0, 255, 6, 106, 237, 230, 52, 223, 76, 0, 6, 127, 126})
11611170
);
1171+
1172+
#endif // __wasm_unimplemented_simd128__
1173+
11621174
expect_vec(
11631175
i8x16_avgr_u(
11641176
(i8x16){0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73},

tests/test_wasm_intrinsics_simd.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,15 @@ v128_t TESTFN i8x16_sub_saturate_s(v128_t x, v128_t y) {
413413
v128_t TESTFN i8x16_sub_saturate_u(v128_t x, v128_t y) {
414414
return wasm_u8x16_sub_saturate(x, y);
415415
}
416+
417+
#ifdef __wasm_unimplemented_simd128__
418+
416419
v128_t TESTFN i8x16_mul(v128_t x, v128_t y) {
417420
return wasm_i8x16_mul(x, y);
418421
}
422+
423+
#endif // __wasm_unimplemented_simd128__
424+
419425
v128_t TESTFN i8x16_min_s(v128_t x, v128_t y) {
420426
return wasm_i8x16_min(x, y);
421427
}
@@ -1371,13 +1377,19 @@ int EMSCRIPTEN_KEEPALIVE __attribute__((__optnone__)) main(int argc, char** argv
13711377
),
13721378
u8x16(0, 0, 254, 0, 0, 123, 0, 12, 61, 167, 158, 100, 17, 0, 0, 0)
13731379
);
1380+
1381+
#ifdef __wasm_unimplemented_simd128__
1382+
13741383
expect_vec(
13751384
i8x16_mul(
13761385
(v128_t)i8x16(0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73),
13771386
(v128_t)i8x16(3, 231, 1, 128, 129, 6, 103, 17, 42, 29, 73, 42, 0, 255, 127, 142)
13781387
),
13791388
i8x16(0, 230, 255, 0, 255, 6, 106, 237, 230, 52, 223, 76, 0, 6, 127, 126)
13801389
);
1390+
1391+
#endif // __wasm_unimplemented_simd128__
1392+
13811393
expect_vec(
13821394
i8x16_min_s(
13831395
(v128_t)i8x16(0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73),

0 commit comments

Comments
 (0)