diff options
Diffstat (limited to 'js/src/jit-test/tests/ion/dce-with-rinstructions.js')
-rw-r--r-- | js/src/jit-test/tests/ion/dce-with-rinstructions.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/dce-with-rinstructions.js b/js/src/jit-test/tests/ion/dce-with-rinstructions.js index 481a1279ec..5fd530fde4 100644 --- a/js/src/jit-test/tests/ion/dce-with-rinstructions.js +++ b/js/src/jit-test/tests/ion/dce-with-rinstructions.js @@ -1983,6 +1983,26 @@ function rnantozero_negzero(i) { return i; } +let uceFault_ratomicsislockfree_true = eval(`(${uceFault})`.replace('uceFault', 'uceFault_ratomicsislockfree_true')); +function ratomicsislockfree_true(i) { + var x = [1, 2, 4, 8][i & 3]; + var y = Atomics.isLockFree(x); + if (uceFault_ratomicsislockfree_true(i) || uceFault_ratomicsislockfree_true(i)) + assertEq(y, true); + assertRecoveredOnBailout(y, true); + return i; +} + +let uceFault_ratomicsislockfree_false = eval(`(${uceFault})`.replace('uceFault', 'uceFault_ratomicsislockfree_false')); +function ratomicsislockfree_false(i) { + var x = [-1, 0, 3, 1000][i & 3]; + var y = Atomics.isLockFree(x); + if (uceFault_ratomicsislockfree_false(i) || uceFault_ratomicsislockfree_false(i)) + assertEq(y, false); + assertRecoveredOnBailout(y, true); + return i; +} + for (j = 100 - max; j < 100; j++) { with({}){} // Do not Ion-compile this loop. let i = j < 2 ? (Math.abs(j) % 50) + 2 : j; @@ -2184,6 +2204,8 @@ for (j = 100 - max; j < 100; j++) { rnantozero_nan(i); rnantozero_poszero(i); rnantozero_negzero(i); + ratomicsislockfree_true(i); + ratomicsislockfree_false(i); } // Test that we can refer multiple time to the same recover instruction, as well |