summaryrefslogtreecommitdiff
path: root/test/wasm2js/block.2asm.js
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2019-04-30 20:30:03 -0700
committerGitHub <noreply@github.com>2019-04-30 20:30:03 -0700
commit8d4bcd6e02bb0df3ac87e4850896ba733525b055 (patch)
tree1f98b878c22fd23c918992b53fd8e9f4f78d3788 /test/wasm2js/block.2asm.js
parentfba743ca5bdfe4fb437a36503b8983c5f42e4575 (diff)
downloadbinaryen-8d4bcd6e02bb0df3ac87e4850896ba733525b055.tar.gz
binaryen-8d4bcd6e02bb0df3ac87e4850896ba733525b055.tar.bz2
binaryen-8d4bcd6e02bb0df3ac87e4850896ba733525b055.zip
wasm2js: run full optimizations during the pipeline (#2071)
We flatten for the i64 lowering etc. passes, and it is worth optimizing afterwards, to clean up stuff they created. That is run if the user ran wasm2js with an optimization level (like wasm2js -O3). Split the test files to check both optimized and unoptimized code.
Diffstat (limited to 'test/wasm2js/block.2asm.js')
-rw-r--r--test/wasm2js/block.2asm.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/wasm2js/block.2asm.js b/test/wasm2js/block.2asm.js
index b456a0a8c..ce6bd5b64 100644
--- a/test/wasm2js/block.2asm.js
+++ b/test/wasm2js/block.2asm.js
@@ -57,7 +57,7 @@ function asmFunc(global, env, buffer) {
function $6() {
dummy();
- return __wasm_ctz_i32(13) | 0;
+ return __wasm_ctz_i32(13 | 0) | 0 | 0;
}
function $7() {
@@ -159,10 +159,11 @@ function asmFunc(global, env, buffer) {
}
function __wasm_ctz_i32(var$0) {
+ var$0 = var$0 | 0;
if (var$0) {
- return 31 - Math_clz32(var$0 + -1 ^ var$0) | 0
+ return 31 - Math_clz32((var$0 + -1 | 0) ^ var$0 | 0) | 0 | 0
}
- return 32;
+ return 32 | 0;
}
var FUNCTION_TABLE = [];