diff options
Diffstat (limited to 'deps/v8/test/mjsunit/regress/regress-1412629.js')
-rw-r--r-- | deps/v8/test/mjsunit/regress/regress-1412629.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/deps/v8/test/mjsunit/regress/regress-1412629.js b/deps/v8/test/mjsunit/regress/regress-1412629.js new file mode 100644 index 0000000000..03e67d12fd --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-1412629.js @@ -0,0 +1,18 @@ +// Copyright 2023 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Flags: --allow-natives-syntax + +function foo(x) { + return NaN ** x; +} + +%PrepareFunctionForOptimization(foo); +assertEquals(NaN, foo(1)); +assertEquals(1, foo(0)); +assertEquals(1, foo(-0)); +%OptimizeFunctionOnNextCall(foo); +assertEquals(NaN, foo(1)); +assertEquals(1, foo(0)); +assertEquals(1, foo(-0)); |