summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js')
-rw-r--r--js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js b/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js
new file mode 100644
index 0000000000..4ba4b3b116
--- /dev/null
+++ b/js/src/jit-test/tests/wasm/multi-value/regress-1621645-2.js
@@ -0,0 +1,19 @@
+wasmFullPass(`
+ ;; Iterative factorial without locals.
+ (func $pick0 (param i64) (result i64 i64)
+ (local.get 0) (local.get 0)
+ )
+ (func $pick1 (param i64 i64) (result i64 i64 i64)
+ (local.get 0) (local.get 1) (local.get 0)
+ )
+ (func (export "run") (param i64) (result i64)
+ (i64.const 1) (local.get 0)
+ (loop $l (param i64 i64) (result i64)
+ (call $pick1) (call $pick1) (i64.mul)
+ (call $pick1) (i64.const 1) (i64.sub)
+ (call $pick0) (i64.const 0) (i64.gt_u)
+ (br_if $l)
+ (drop) (return)
+ )
+ )`,
+ 7034535277573963776n, {}, 25n);