summaryrefslogtreecommitdiff
path: root/test/emcc_hello_world.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-04-08 17:20:17 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-04-08 18:52:10 -0700
commit6efa130aaf02ef6b5ae838308eb2a85e70db2858 (patch)
treec0e568ef9fe4cf691536f3153a50ebe3c6143681 /test/emcc_hello_world.asm.js
parentd30b98d47697daa167333db66ac0fe3d8a693eae (diff)
downloadbinaryen-6efa130aaf02ef6b5ae838308eb2a85e70db2858.tar.gz
binaryen-6efa130aaf02ef6b5ae838308eb2a85e70db2858.tar.bz2
binaryen-6efa130aaf02ef6b5ae838308eb2a85e70db2858.zip
optimize llvm.cttz.i32 into i32.ctz
Diffstat (limited to 'test/emcc_hello_world.asm.js')
-rw-r--r--test/emcc_hello_world.asm.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/test/emcc_hello_world.asm.js b/test/emcc_hello_world.asm.js
index 6b904c741..3a47a258b 100644
--- a/test/emcc_hello_world.asm.js
+++ b/test/emcc_hello_world.asm.js
@@ -77,6 +77,7 @@ Module["asm"] = (function(global, env, buffer) {
var _pthread_cleanup_push=env._pthread_cleanup_push;
var _sysconf=env._sysconf;
var ___syscall146=env.___syscall146;
+ var _llvm_cttz_i32=env._llvm_cttz_i32;
var tempFloat = 0.0;
// EMSCRIPTEN_START_FUNCS
@@ -6757,17 +6758,6 @@ function _bitshift64Ashr(low, high, bits) {
tempRet0 = (high|0) < 0 ? -1 : 0;
return (high >> (bits - 32))|0;
}
-function _llvm_cttz_i32(x) {
- x = x|0;
- var ret = 0;
- ret = ((HEAP8[(((cttz_i8)+(x & 0xff))>>0)])|0);
- if ((ret|0) < 8) return ret|0;
- ret = ((HEAP8[(((cttz_i8)+((x >> 8)&0xff))>>0)])|0);
- if ((ret|0) < 8) return (ret + 8)|0;
- ret = ((HEAP8[(((cttz_i8)+((x >> 16)&0xff))>>0)])|0);
- if ((ret|0) < 8) return (ret + 16)|0;
- return (((HEAP8[(((cttz_i8)+(x >>> 24))>>0)])|0) + 24)|0;
- }
// ======== compiled code from system/lib/compiler-rt , see readme therein
function ___muldsi3($a, $b) {