Commit 8d4fbc33 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

Reduce the number of ints tested

This reduces the runtime from ~20m to ~2m (very unscientific measure
based on running the entire asm-wasm-i32 test with and without this
change).

I removed most of the constants that looked uninteresting, e.g. testing
for 10, 20, 30, isn't that interesting. The edge cases are left
untouched, min/max signed positive/negative ints and +/- 1 from both.

Bug: v8:7783
Bug: v8:9396
Change-Id: Ice363fc3f786dd55ff118ffa42f9ecea07880338
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1791632Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63695}
parent e9730043
......@@ -192,28 +192,15 @@ function i32_invert(a) {
var inputs = [
0, 1, 2, 3, 4,
10, 20, 30, 31, 32, 33, 100, 2000,
30000, 400000, 5000000,
100000000, 2000000000,
2147483646,
2147483647,
2147483648,
2147483649,
0x273a798e, 0x187937a3, 0xece3af83, 0x5495a16b, 0x0b668ecc, 0x11223344,
2147483647, // max positive int32
2147483648, // overflow max positive int32
0x0000009e, 0x00000043, 0x0000af73, 0x0000116b, 0x00658ecc, 0x002b3b4c,
0x88776655, 0x70000000, 0x07200000, 0x7fffffff, 0x56123761, 0x7fffff00,
0x761c4761, 0x80000000, 0x88888888, 0xa0000000, 0xdddddddd, 0xe0000000,
0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x003fffff, 0x001fffff,
0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff,
0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff,
0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x0003ffff, 0x00001fff,
-1, -2, -3, -4,
-10, -20, -30, -31, -32, -33, -100, -2000,
-30000, -400000, -5000000,
-100000000, -2000000000,
-2147483646,
-2147483647,
-2147483648,
-2147483649,
-2147483648, // min negative int32
-2147483649, // overflow min negative int32
];
var funcs = [
......
......@@ -170,28 +170,15 @@ function u32_invert(a) {
var inputs = [
0, 1, 2, 3, 4,
10, 20, 30, 31, 32, 33, 100, 2000,
30000, 400000, 5000000,
100000000, 2000000000,
2147483646,
2147483647,
2147483648,
2147483649,
0x273a798e, 0x187937a3, 0xece3af83, 0x5495a16b, 0x0b668ecc, 0x11223344,
2147483647, // max positive int32
2147483648, // overflow max positive int32
0x0000009e, 0x00000043, 0x0000af73, 0x0000116b, 0x00658ecc, 0x002b3b4c,
0x88776655, 0x70000000, 0x07200000, 0x7fffffff, 0x56123761, 0x7fffff00,
0x761c4761, 0x80000000, 0x88888888, 0xa0000000, 0xdddddddd, 0xe0000000,
0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x003fffff, 0x001fffff,
0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff,
0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff,
0xeeeeeeee, 0xfffffffd, 0xf0000000, 0x007fffff, 0x0003ffff, 0x00001fff,
-1, -2, -3, -4,
-10, -20, -30, -31, -32, -33, -100, -2000,
-30000, -400000, -5000000,
-100000000, -2000000000,
-2147483646,
-2147483647,
-2147483648,
-2147483649,
-2147483648, // min negative int32
-2147483649, // overflow min negative int32
];
var funcs = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment