diff options
author | Alon Zakai <azakai@google.com> | 2020-07-29 12:51:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 12:51:25 -0700 |
commit | 95a33d7e3233c0f00b0043bb2225d514ae1cd10e (patch) | |
tree | 78224aecefe8b8aa18c61966efd64af3f1fba0c3 /test/wasm2js | |
parent | 74f0eeff6f9cedf40e32e60595475ec243e8c35e (diff) | |
download | binaryen-95a33d7e3233c0f00b0043bb2225d514ae1cd10e.tar.gz binaryen-95a33d7e3233c0f00b0043bb2225d514ae1cd10e.tar.bz2 binaryen-95a33d7e3233c0f00b0043bb2225d514ae1cd10e.zip |
wasm2js: Remove an incorrect optimization (#3004)
optimizeBoolean does not receive a boolean, it is done when the
output flows into a boolean context.
Diffstat (limited to 'test/wasm2js')
-rw-r--r-- | test/wasm2js/emscripten.2asm.js.opt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/wasm2js/emscripten.2asm.js.opt b/test/wasm2js/emscripten.2asm.js.opt index 35f2958e0..2661d3c1d 100644 --- a/test/wasm2js/emscripten.2asm.js.opt +++ b/test/wasm2js/emscripten.2asm.js.opt @@ -155,13 +155,13 @@ function asmFunc(global, env, buffer) { bools(HEAP32[0] & 1); bools(HEAPU8[0] & 2); bools($0 ^ 1); - if (!$0) { + if ($0 ^ 1) { bools(2) } if ($0 ^ 2) { bools(2) } - bools(!!$0); + bools(!($0 ^ 1)); abort(); } |