diff options
Diffstat (limited to 'test/wasm2js')
-rw-r--r-- | test/wasm2js/br_table_temp.2asm.js.opt | 2 | ||||
-rw-r--r-- | test/wasm2js/emscripten.2asm.js | 42 | ||||
-rw-r--r-- | test/wasm2js/emscripten.2asm.js.opt | 42 | ||||
-rw-r--r-- | test/wasm2js/emscripten.wast | 85 |
4 files changed, 170 insertions, 1 deletions
diff --git a/test/wasm2js/br_table_temp.2asm.js.opt b/test/wasm2js/br_table_temp.2asm.js.opt index 5620f829f..4633a99e3 100644 --- a/test/wasm2js/br_table_temp.2asm.js.opt +++ b/test/wasm2js/br_table_temp.2asm.js.opt @@ -12662,7 +12662,7 @@ function asmFunc(global, env, buffer) { function $63($0) { $0 = $0 | 0; - if ($0 - 1 | 0) { + if ($0 - 1) { $0 = 9 } else { $0 = 8 diff --git a/test/wasm2js/emscripten.2asm.js b/test/wasm2js/emscripten.2asm.js index 3cbb33a35..6304e9b9d 100644 --- a/test/wasm2js/emscripten.2asm.js +++ b/test/wasm2js/emscripten.2asm.js @@ -90,6 +90,48 @@ function asmFunc(global, env, buffer) { if ((HEAPU8[144 >> 0] | 0) >>> 0 < 3 >>> 0) { bar() } + if ((bools(314159 | 0) | 0) >>> 7 | 0) { + bar() + } + if ((bools(314159 | 0) | 0) >> 8 | 0) { + bar() + } + if (~~Math_fround(getf32()) >>> 0) { + bar() + } + if (~~Math_fround(getf32())) { + bar() + } + if (~~+getf64() >>> 0) { + bar() + } + if (~~+getf64()) { + bar() + } + if (((geti32() | 0) + (geti32() | 0) | 0) + (geti32() | 0) | 0) { + bar() + } + if ((geti32() | 0) + ((geti32() | 0) + (geti32() | 0) | 0) | 0) { + bar() + } + if (((geti32() | 0) + (geti32() | 0) | 0) + ((geti32() | 0) + (geti32() | 0) | 0) | 0) { + bar() + } + if ((((geti32() | 0) + (geti32() | 0) | 0) + ((geti32() | 0) + (geti32() | 0) | 0) | 0) + (((geti32() | 0) + (geti32() | 0) | 0) + ((geti32() | 0) + (geti32() | 0) | 0) | 0) | 0) { + bar() + } + } + + function geti32() { + return geti32() | 0 | 0; + } + + function getf32() { + return Math_fround(Math_fround(getf32())); + } + + function getf64() { + return +(+getf64()); } function __growWasmMemory($0) { diff --git a/test/wasm2js/emscripten.2asm.js.opt b/test/wasm2js/emscripten.2asm.js.opt index 682daaf85..69251d9bb 100644 --- a/test/wasm2js/emscripten.2asm.js.opt +++ b/test/wasm2js/emscripten.2asm.js.opt @@ -83,6 +83,48 @@ function asmFunc(global, env, buffer) { if (HEAPU8[144] < 3) { bar() } + if (bools(314159) >>> 7) { + bar() + } + if (bools(314159) >> 8) { + bar() + } + if (~~getf32()) { + bar() + } + if (~~getf32()) { + bar() + } + if (~~getf64()) { + bar() + } + if (~~getf64()) { + bar() + } + if ((geti32() + geti32() | 0) + geti32()) { + bar() + } + if (geti32() + (geti32() + geti32() | 0)) { + bar() + } + if (geti32() + geti32() + (geti32() + geti32())) { + bar() + } + if (geti32() + geti32() + (geti32() + geti32()) + (geti32() + geti32() + (geti32() + geti32()))) { + bar() + } + } + + function geti32() { + return geti32(); + } + + function getf32() { + return getf32(); + } + + function getf64() { + return getf64(); } function __growWasmMemory($0) { diff --git a/test/wasm2js/emscripten.wast b/test/wasm2js/emscripten.wast index f6ad7aae7..5b1b81507 100644 --- a/test/wasm2js/emscripten.wast +++ b/test/wasm2js/emscripten.wast @@ -110,6 +110,91 @@ (if (i32.lt_u (i32.load8_u (i32.const 144)) (i32.const 3)) (call $bar) ) + (if (i32.shr_u (call $bools (i32.const 314159)) (i32.const 7)) + (call $bar) + ) + (if (i32.shr_s (call $bools (i32.const 314159)) (i32.const 8)) + (call $bar) + ) + (if (i32.trunc_f32_u (call $getf32)) + (call $bar) + ) + (if (i32.trunc_f32_s (call $getf32)) + (call $bar) + ) + (if (i32.trunc_f64_u (call $getf64)) + (call $bar) + ) + (if (i32.trunc_f64_s (call $getf64)) + (call $bar) + ) + (if + (i32.add + (i32.add + (call $geti32) + (call $geti32) + ) + (call $geti32) + ) + (call $bar) + ) + (if + (i32.add + (call $geti32) + (i32.add + (call $geti32) + (call $geti32) + ) + ) + (call $bar) + ) + (if + (i32.add + (i32.add + (call $geti32) + (call $geti32) + ) + (i32.add + (call $geti32) + (call $geti32) + ) + ) + (call $bar) + ) + (if + (i32.add + (i32.add + (i32.add + (call $geti32) + (call $geti32) + ) + (i32.add + (call $geti32) + (call $geti32) + ) + ) + (i32.add + (i32.add + (call $geti32) + (call $geti32) + ) + (i32.add + (call $geti32) + (call $geti32) + ) + ) + ) + (call $bar) + ) + ) + (func $geti32 (result i32) + (call $geti32) + ) + (func $getf32 (result f32) + (call $getf32) + ) + (func $getf64 (result f64) + (call $getf64) ) (func $__growWasmMemory (param $0 i32) (result i32) (grow_memory |