Inline isNaN and isFinite

Looking at our existing tests it seems that inlining these can be performed by reusing locals most of the time, and sometimes enables erasing quite a bit of unnecessary code when optimizing.
This commit is contained in:
dcodeIO
2018-07-19 04:12:40 +02:00
parent cf8e3dfa12
commit 34839353fd
9 changed files with 570 additions and 625 deletions

View File

@ -8598,7 +8598,8 @@
)
)
(set_local $7
(call $~lib/builtins/isNaN<f64>
(f64.ne
(get_local $1)
(get_local $1)
)
)
@ -8994,14 +8995,18 @@
)
)
(set_local $3
(call $~lib/builtins/isNaN<f32>
(f32.ne
(get_local $1)
(get_local $1)
)
)
)
(if
(i32.eqz
(get_local $3)
(i32.and
(get_local $3)
(i32.const 1)
)
)
(set_local $3
(i32.eq
@ -9011,7 +9016,10 @@
)
)
(if
(get_local $3)
(i32.and
(get_local $3)
(i32.const 1)
)
(return
(f32.div
(tee_local $0