From b4eb90ce9bc43d9f3897bd13d6fd11f40f706b5a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 13 May 2019 16:55:06 -0700 Subject: wasm2js: precompute bitwise operations (#2101) This happens on e.g. an i32 load of a constant offset, then we have constant >> 2. --- test/wasm2js/conversions-modified.2asm.js.opt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/wasm2js/conversions-modified.2asm.js.opt') diff --git a/test/wasm2js/conversions-modified.2asm.js.opt b/test/wasm2js/conversions-modified.2asm.js.opt index fc6b306a7..f3e381382 100644 --- a/test/wasm2js/conversions-modified.2asm.js.opt +++ b/test/wasm2js/conversions-modified.2asm.js.opt @@ -172,16 +172,16 @@ function asmFunc(global, env, buffer) { } function legalstub$22($0, $1) { - wasm2js_scratch_store_i32(0 | 0, $0 | 0); - wasm2js_scratch_store_i32(1 | 0, $1 | 0); + wasm2js_scratch_store_i32(0, $0 | 0); + wasm2js_scratch_store_i32(1, $1 | 0); return +wasm2js_scratch_load_f64(); } function legalstub$24($0) { var $1 = 0, $2 = 0; wasm2js_scratch_store_f64(+$0); - $1 = wasm2js_scratch_load_i32(1 | 0) | 0; - $2 = wasm2js_scratch_load_i32(0 | 0) | 0; + $1 = wasm2js_scratch_load_i32(1) | 0; + $2 = wasm2js_scratch_load_i32(0) | 0; i64toi32_i32$HIGH_BITS = $1; $1 = $2; setTempRet0(i64toi32_i32$HIGH_BITS | 0); -- cgit v1.2.3