Skip to content

Commit 518ed2c

Browse files
authored
Update SIMD builtin names (#13708)
These builtin functions were renamed upstream to match the new names for the underlying instructions.
1 parent 101c208 commit 518ed2c

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

tests/test_wasm_builtin_simd.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -342,20 +342,20 @@ i8x16 TESTFN i8x16_shr_u(i8x16 vec, int32_t shift) {
342342
i8x16 TESTFN i8x16_add(i8x16 x, i8x16 y) {
343343
return x + y;
344344
}
345-
i8x16 TESTFN i8x16_add_saturate_s(i8x16 x, i8x16 y) {
346-
return __builtin_wasm_add_saturate_s_i8x16(x, y);
345+
i8x16 TESTFN i8x16_add_sat_s(i8x16 x, i8x16 y) {
346+
return __builtin_wasm_add_sat_s_i8x16(x, y);
347347
}
348-
u8x16 TESTFN i8x16_add_saturate_u(u8x16 x, u8x16 y) {
349-
return __builtin_wasm_add_saturate_u_i8x16(x, y);
348+
u8x16 TESTFN i8x16_add_sat_u(u8x16 x, u8x16 y) {
349+
return __builtin_wasm_add_sat_u_i8x16(x, y);
350350
}
351351
i8x16 TESTFN i8x16_sub(i8x16 x, i8x16 y) {
352352
return x - y;
353353
}
354-
i8x16 TESTFN i8x16_sub_saturate_s(i8x16 x, i8x16 y) {
355-
return __builtin_wasm_sub_saturate_s_i8x16(x, y);
354+
i8x16 TESTFN i8x16_sub_sat_s(i8x16 x, i8x16 y) {
355+
return __builtin_wasm_sub_sat_s_i8x16(x, y);
356356
}
357-
u8x16 TESTFN i8x16_sub_saturate_u(u8x16 x, u8x16 y) {
358-
return __builtin_wasm_sub_saturate_u_i8x16(x, y);
357+
u8x16 TESTFN i8x16_sub_sat_u(u8x16 x, u8x16 y) {
358+
return __builtin_wasm_sub_sat_u_i8x16(x, y);
359359
}
360360
// TODO: min_s / min_u / max_s / max_u
361361
u8x16 TESTFN i8x16_avgr_u(u8x16 x, u8x16 y) {
@@ -382,20 +382,20 @@ i16x8 TESTFN i16x8_shr_u(i16x8 vec, int32_t shift) {
382382
i16x8 TESTFN i16x8_add(i16x8 x, i16x8 y) {
383383
return x + y;
384384
}
385-
i16x8 TESTFN i16x8_add_saturate_s(i16x8 x, i16x8 y) {
386-
return __builtin_wasm_add_saturate_s_i16x8(x, y);
385+
i16x8 TESTFN i16x8_add_sat_s(i16x8 x, i16x8 y) {
386+
return __builtin_wasm_add_sat_s_i16x8(x, y);
387387
}
388-
u16x8 TESTFN i16x8_add_saturate_u(u16x8 x, u16x8 y) {
389-
return __builtin_wasm_add_saturate_u_i16x8(x, y);
388+
u16x8 TESTFN i16x8_add_sat_u(u16x8 x, u16x8 y) {
389+
return __builtin_wasm_add_sat_u_i16x8(x, y);
390390
}
391391
i16x8 TESTFN i16x8_sub(i16x8 x, i16x8 y) {
392392
return x - y;
393393
}
394-
i16x8 TESTFN i16x8_sub_saturate_s(i16x8 x, i16x8 y) {
395-
return __builtin_wasm_sub_saturate_s_i16x8(x, y);
394+
i16x8 TESTFN i16x8_sub_sat_s(i16x8 x, i16x8 y) {
395+
return __builtin_wasm_sub_sat_s_i16x8(x, y);
396396
}
397-
u16x8 TESTFN i16x8_sub_saturate_u(u16x8 x, u16x8 y) {
398-
return __builtin_wasm_sub_saturate_u_i16x8(x, y);
397+
u16x8 TESTFN i16x8_sub_sat_u(u16x8 x, u16x8 y) {
398+
return __builtin_wasm_sub_sat_u_i16x8(x, y);
399399
}
400400
i16x8 TESTFN i16x8_mul(i16x8 x, i16x8 y) {
401401
return x * y;
@@ -1059,14 +1059,14 @@ int EMSCRIPTEN_KEEPALIVE __attribute__((__optnone__)) main(int argc, char** argv
10591059
((i8x16){3, 17, 0, 0, 0, 135, 109, 46, 145, 225, 48, 184, 17, 249, 128, 215})
10601060
);
10611061
expect_vec(
1062-
i8x16_add_saturate_s(
1062+
i8x16_add_sat_s(
10631063
(i8x16){0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73},
10641064
(i8x16){3, 231, 1, 128, 129, 6, 103, 17, 42, 29, 73, 42, 0, 255, 127, 142}
10651065
),
10661066
((i8x16){3, 17, 0, 128, 0, 135, 109, 46, 127, 225, 48, 184, 17, 249, 127, 215})
10671067
);
10681068
expect_vec(
1069-
i8x16_add_saturate_u(
1069+
i8x16_add_sat_u(
10701070
(u8x16){0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73},
10711071
(u8x16){3, 231, 1, 128, 129, 6, 103, 17, 42, 29, 73, 42, 0, 255, 127, 142}
10721072
),
@@ -1080,14 +1080,14 @@ int EMSCRIPTEN_KEEPALIVE __attribute__((__optnone__)) main(int argc, char** argv
10801080
((i8x16){253, 67, 254, 0, 254, 123, 159, 12, 61, 167, 158, 100, 17, 251, 130, 187})
10811081
);
10821082
expect_vec(
1083-
i8x16_sub_saturate_s(
1083+
i8x16_sub_sat_s(
10841084
(i8x16){0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73},
10851085
(i8x16){3, 231, 1, 128, 129, 6, 103, 17, 42, 29, 73, 42, 0, 255, 127, 142}
10861086
),
10871087
((i8x16){253, 67, 254, 0, 127, 128, 159, 12, 61, 167, 158, 128, 17, 251, 130, 127})
10881088
);
10891089
expect_vec(
1090-
i8x16_sub_saturate_u(
1090+
i8x16_sub_sat_u(
10911091
(u8x16){0, 42, 255, 128, 127, 129, 6, 29, 103, 196, 231, 142, 17, 250, 1, 73},
10921092
(u8x16){3, 231, 1, 128, 129, 6, 103, 17, 42, 29, 73, 42, 0, 255, 127, 142}
10931093
),
@@ -1146,14 +1146,14 @@ int EMSCRIPTEN_KEEPALIVE __attribute__((__optnone__)) main(int argc, char** argv
11461146
((i16x8){768, -255, 0, 0, -30976, 12288, -1792, -32768})
11471147
);
11481148
expect_vec(
1149-
i16x8_add_saturate_s(
1149+
i16x8_add_sat_s(
11501150
(i16x8){0, -256, -32768, 32512, -32512, -6400, -1536, 32766},
11511151
(i16x8){768, 1, -32768, -32512, 1536, 18688, -256, 2}
11521152
),
11531153
((i16x8){768, -255, -32768, 0, -30976, 12288, -1792, 32767})
11541154
);
11551155
expect_vec(
1156-
i16x8_add_saturate_u(
1156+
i16x8_add_sat_u(
11571157
(u16x8){0, -256, -32768, 32512, -32512, -6400, -1536, 32766},
11581158
(u16x8){768, 1, -32768, -32512, 1536, 18688, -256, 2}
11591159
),
@@ -1167,14 +1167,14 @@ int EMSCRIPTEN_KEEPALIVE __attribute__((__optnone__)) main(int argc, char** argv
11671167
((i16x8){-768, -257, 0, -512, 31488, -25088, -1280, 32764})
11681168
);
11691169
expect_vec(
1170-
i16x8_sub_saturate_s(
1170+
i16x8_sub_sat_s(
11711171
(i16x8){0, -256, -32768, 32512, -32512, -6400, -1536, 32766},
11721172
(i16x8){768, 1, -32768, -32512, 1536, 18688, -256, 2}
11731173
),
11741174
((i16x8){-768, -257, 0, 32767, -32768, -25088, -1280, 32764})
11751175
);
11761176
expect_vec(
1177-
i16x8_sub_saturate_u(
1177+
i16x8_sub_sat_u(
11781178
(u16x8){0, -256, -32768, 32512, -32512, -6400, -1536, 32766},
11791179
(u16x8){768, 1, -32768, -32512, 1536, 18688, -256, 2}
11801180
),

0 commit comments

Comments
 (0)