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/func-ptr-offset.2asm.js.opt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/wasm2js/func-ptr-offset.2asm.js.opt') diff --git a/test/wasm2js/func-ptr-offset.2asm.js.opt b/test/wasm2js/func-ptr-offset.2asm.js.opt index 4237ffb05..3feda1f68 100644 --- a/test/wasm2js/func-ptr-offset.2asm.js.opt +++ b/test/wasm2js/func-ptr-offset.2asm.js.opt @@ -21,15 +21,15 @@ function asmFunc(global, env, buffer) { var nan = global.NaN; var infinity = global.Infinity; function t1() { - return 1 | 0; + return 1; } function t2() { - return 2 | 0; + return 2; } function t3() { - return 3 | 0; + return 3; } function $3($0) { -- cgit v1.2.3